X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_normalize.c;h=9675c8ac2c3d9b2fa9450c1b4a16f4bfb4683438;hb=bebea787554fe4481847afabf7107171d6523323;hp=e2e00b12349ee252a2a2f9c1b73c4510948084c6;hpb=d64cbd4fda01c6e33e9e5e6f859e81c47bdb1760;p=ffmpeg diff --git a/libavfilter/vf_normalize.c b/libavfilter/vf_normalize.c index e2e00b12349..9675c8ac2c3 100644 --- a/libavfilter/vf_normalize.c +++ b/libavfilter/vf_normalize.c @@ -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;