Commit 8b9a153e authored by Clément Bœsch's avatar Clément Bœsch Committed by Anton Khirnov

lavfi/gradfun: do not increment DC pointer for odd values.

First DC is only used once otherwise. This also makes the code
consistent with ASM versions.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent f2a59722
......@@ -56,7 +56,7 @@ DECLARE_ALIGNED(16, static const uint16_t, dither)[8][8] = {
void ff_gradfun_filter_line_c(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers)
{
int x;
for (x = 0; x < width; x++, dc += x & 1) {
for (x = 0; x < width; dc += x & 1, x++) {
int pix = src[x] << 7;
int delta = dc[0] - pix;
int m = abs(delta) * thresh >> 16;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment