Instead of rounding toward zero and thus producing
darker output.
int j;
for (j = 0; j < rw; j++)
- dst[j] = av_clip_uint8(src[j].re * scale);
+ dst[j] = av_clip_uint8(src[j].re * scale + 0.5f);
}
static void import_row16(FFTComplex *dst, uint8_t *srcp, int rw)
int j;
for (j = 0; j < rw; j++)
- dst[j] = av_clip_uintp2_c(src[j].re * scale, depth);
+ dst[j] = av_clip_uintp2_c(src[j].re * scale + 0.5f, depth);
}
static int config_input(AVFilterLink *inlink)