History

avfilter/vf_hqx: Fix undefined left shifts of negative numbers

Affected every usage of this filter; in particular, it affected the FATE-tests filter-2xbr, filter-3xbr and filter-4xbr.

Andreas Rheinhardt committed 7 years ago

Commit fa211941 parent 5cf593a1 file · +1 −1Browse files

Unified · Split

libavfilter/vf_hqx.c+1−1
@@ -523,7 +523,7 @@ static av_cold int init(AVFilterContext *ctx) · 522 unmodified lines
523 int startg = FFMAX3(-bg, -rg, 0);523 int startg = FFMAX3(-bg, -rg, 0);
524 int endg = FFMIN3(255-bg, 255-rg, 255);524 int endg = FFMIN3(255-bg, 255-rg, 255);
525 uint32_t y = (uint32_t)(( 299*rg + 1000*startg + 114*bg)/1000);525 uint32_t y = (uint32_t)(( 299*rg + 1000*startg + 114*bg)/1000);
526 c = bg + (rg<<16) + 0x010101 * startg;526 c = bg + rg * (1 << 16) + 0x010101 * startg;
527 for (g = startg; g <= endg; g++) {527 for (g = startg; g <= endg; g++) {
528 hqx->rgbtoyuv[c] = ((y++) << 16) + (u << 8) + v;528 hqx->rgbtoyuv[c] = ((y++) << 16) + (u << 8) + v;
529 c+= 0x010101;529 c+= 0x010101;

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