History

avfilter/vf_paletteuse: do not use in dithering transparent palette

Paul B Mahol committed 5 years ago

Commit 79934cc1 parent 6d09de91 file · +7 −3Browse files

Unified · Split

libavfilter/vf_paletteuse.c+7−3
@@ -380,9 +380,13 @@ static av_always_inline int get_dst_color_err(PaletteUseContext *s, · 379 unmodified lines
380 if (dstx < 0)380 if (dstx < 0)
381 return dstx;381 return dstx;
382 dstc = s->palette[dstx];382 dstc = s->palette[dstx];
383 *er = (int)r - (int)(dstc >> 16 & 0xff);383 if (dstx == s->transparency_index) {
384 *eg = (int)g - (int)(dstc >> 8 & 0xff);384 *er = *eg = *eb = 0;
385 *eb = (int)b - (int)(dstc & 0xff);385 } else {
386 *er = (int)r - (int)(dstc >> 16 & 0xff);
387 *eg = (int)g - (int)(dstc >> 8 & 0xff);
388 *eb = (int)b - (int)(dstc & 0xff);
389 }
386 return dstx;390 return dstx;
387}391}
388 392

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t