]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_normalize.c
avfilter: Constify all AVFilters
[ffmpeg] / libavfilter / vf_normalize.c
index e2e00b12349ee252a2a2f9c1b73c4510948084c6..3a2127ade32c007ac9c51959c1ba48dc3805b461 100644 (file)
@@ -448,8 +448,8 @@ static int config_input(AVFilterLink *inlink)
     for (c = 0; c < 3; c++) {
         s->min[c].history = s->history_mem + (c*2)   * s->history_len;
         s->max[c].history = s->history_mem + (c*2+1) * s->history_len;
-        s->sblackpt[c] = scale * s->blackpt[c] + (s->blackpt[c] >> (s->depth - 8));
-        s->swhitept[c] = scale * s->whitept[c] + (s->whitept[c] >> (s->depth - 8));
+        s->sblackpt[c] = scale * s->blackpt[c] + (s->blackpt[c] & (1 << (s->depth - 8)));
+        s->swhitept[c] = scale * s->whitept[c] + (s->whitept[c] & (1 << (s->depth - 8)));
     }
 
     planar = desc->flags & AV_PIX_FMT_FLAG_PLANAR;
@@ -530,7 +530,7 @@ static const AVFilterPad outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_normalize = {
+const AVFilter ff_vf_normalize = {
     .name          = "normalize",
     .description   = NULL_IF_CONFIG_SMALL("Normalize RGB video."),
     .priv_size     = sizeof(NormalizeContext),