|
|
@ -280,17 +280,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) |
|
|
|
width * sizeof(float), height); |
|
|
|
width * sizeof(float), height); |
|
|
|
} else if (s->depth == 8) { |
|
|
|
} else if (s->depth == 8) { |
|
|
|
for (y = 0; y < height; y++) { |
|
|
|
for (y = 0; y < height; y++) { |
|
|
|
for (x = 0; x < width; x++) { |
|
|
|
for (x = 0; x < width; x++) |
|
|
|
dst[x] = bptr[x]; |
|
|
|
dst[x] = lrintf(bptr[x]); |
|
|
|
} |
|
|
|
|
|
|
|
bptr += width; |
|
|
|
bptr += width; |
|
|
|
dst += out->linesize[plane]; |
|
|
|
dst += out->linesize[plane]; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
for (y = 0; y < height; y++) { |
|
|
|
for (y = 0; y < height; y++) { |
|
|
|
for (x = 0; x < width; x++) { |
|
|
|
for (x = 0; x < width; x++) |
|
|
|
dst16[x] = bptr[x]; |
|
|
|
dst16[x] = lrintf(bptr[x]); |
|
|
|
} |
|
|
|
|
|
|
|
bptr += width; |
|
|
|
bptr += width; |
|
|
|
dst16 += out->linesize[plane] / 2; |
|
|
|
dst16 += out->linesize[plane] / 2; |
|
|
|
} |
|
|
|
} |
|
|
|