diff options
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index 0e20a0a6b8..60a9bdfe82 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -904,13 +904,14 @@ yuv2ya16_X_c_template(SwsContext *c, const int16_t *lumFilter, for (i = 0; i < dstW; i++) { int j; - int64_t Y = 1 << 18; + int Y = -0x40000000; int64_t A = 0xffff<<14; for (j = 0; j < lumFilterSize; j++) Y += lumSrc[j][i] * lumFilter[j]; Y >>= 15; + Y += (1<<3) + 0x8000; Y = av_clip_uint16(Y); if (hasAlpha) { |