diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2019-10-08 11:45:33 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2019-10-10 10:27:00 +0800 |
commit | a76a516e761ae950d2f5ccd4469ea8d3416718f2 (patch) | |
tree | 2ee0193904b33b2e69e4d32e9bf675e8dbfa6083 /libavfilter/vf_delogo.c | |
parent | aea82dfe225ef195f558df0350b20175a82be901 (diff) | |
download | ffmpeg-a76a516e761ae950d2f5ccd4469ea8d3416718f2.tar.gz |
avfilter/vf_delogo: make the interp value compute method simple
because the interp >= 0UL comparison of an unsigned value is always true
fix CID: 1454642
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavfilter/vf_delogo.c')
-rw-r--r-- | libavfilter/vf_delogo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 9c58418e11..a5692b0c62 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -168,7 +168,7 @@ static void apply_delogo(uint8_t *dst, int dst_linesize, botleft[x-logo_x1-1] + botleft[x-logo_x1+1]) * weightb; weight = (weightl + weightr + weightt + weightb) * 3U; - interp = ROUNDED_DIV(interp, weight); + interp = (interp + (weight >> 1)) / weight; if (y >= logo_y+band && y < logo_y+logo_h-band && x >= logo_x+band && x < logo_x+logo_w-band) { |