mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-09 08:39:41 +00:00
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>
This commit is contained in:
parent
aea82dfe22
commit
a76a516e76
@ -168,7 +168,7 @@ static void apply_delogo(uint8_t *dst, int dst_linesize,
|
|||||||
botleft[x-logo_x1-1] +
|
botleft[x-logo_x1-1] +
|
||||||
botleft[x-logo_x1+1]) * weightb;
|
botleft[x-logo_x1+1]) * weightb;
|
||||||
weight = (weightl + weightr + weightt + weightb) * 3U;
|
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 &&
|
if (y >= logo_y+band && y < logo_y+logo_h-band &&
|
||||||
x >= logo_x+band && x < logo_x+logo_w-band) {
|
x >= logo_x+band && x < logo_x+logo_w-band) {
|
||||||
|
Loading…
Reference in New Issue
Block a user