mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avfilter/vf_paletteuse: do not use in dithering transparent palette
This commit is contained in:
parent
6d09de90d1
commit
79934cc702
@ -380,9 +380,13 @@ static av_always_inline int get_dst_color_err(PaletteUseContext *s,
|
|||||||
if (dstx < 0)
|
if (dstx < 0)
|
||||||
return dstx;
|
return dstx;
|
||||||
dstc = s->palette[dstx];
|
dstc = s->palette[dstx];
|
||||||
*er = (int)r - (int)(dstc >> 16 & 0xff);
|
if (dstx == s->transparency_index) {
|
||||||
*eg = (int)g - (int)(dstc >> 8 & 0xff);
|
*er = *eg = *eb = 0;
|
||||||
*eb = (int)b - (int)(dstc & 0xff);
|
} else {
|
||||||
|
*er = (int)r - (int)(dstc >> 16 & 0xff);
|
||||||
|
*eg = (int)g - (int)(dstc >> 8 & 0xff);
|
||||||
|
*eb = (int)b - (int)(dstc & 0xff);
|
||||||
|
}
|
||||||
return dstx;
|
return dstx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user