This histogram index was not correctly downshifted to 8-bit.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -189,7 +189,7 @@ static void get_hist16(int *hist, const uint8_t *p, ptrdiff_t stride, · 188 unmodified lines | |||
| 189 | } | 189 | } |
| 190 | /* handle tail */ | 190 | /* handle tail */ |
| 191 | for (int x = width4; x < width; x++) | 191 | for (int x = width4; x < width; x++) |
| 192 | hist[p16[x]]++; | 192 | hist[(uint8_t) (p16[x] >> shift)]++; |
| 193 | p += stride; | 193 | p += stride; |
| 194 | } | 194 | } |
| 195 | 195 | ||