int16_t sample, int16_t *prev_y, int intensity)
{
int k;
- const int h = av_rescale(abs(sample), height, UINT16_MAX);
+ const int h = av_rescale(abs(sample), height, INT16_MAX);
const int start = (height - h) / 2;
const int end = start + h;
for (k = start; k < end; k++)