History

avfilter/vf_hqdn3d: fix left shift of negative numbers

Valerii Zapodovnikov committed 5 years ago

Commit ff0d70c1 parent 3ac7d991 file · +1 −1Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_hqdn3d.c+1−1
@@ -179,7 +179,7 @@ static void precalc_coefs(double dist25, int depth, int16_t *ct) · 178 unmodified lines
179179
180180 gamma = log(0.25) / log(1.0 - FFMIN(dist25,252.0)/255.0 - 0.00001);
181181
182− for (i = -256<<LUT_BITS; i < 256<<LUT_BITS; i++) {
182+ for (i = -(256<<LUT_BITS); i < 256<<LUT_BITS; i++) {
183183 double f = ((i<<(9-LUT_BITS)) + (1<<(8-LUT_BITS)) - 1) / 512.0; // midpoint of the bin
184184 simil = FFMAX(0, 1.0 - fabs(f) / 255.0);
185185 C = pow(simil, gamma) * 256.0 * f;

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