diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-26 17:13:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-16 19:17:57 +0200 |
commit | 3e6682931b482e7c6ca0d62cacbf8744e5d9ee47 (patch) | |
tree | 5343e29f7475e66ba097aaf30fa17301abe37438 /libswscale | |
parent | 4f4ca675e59795c743ab1d0ec9b4f3ece883f650 (diff) | |
download | ffmpeg-3e6682931b482e7c6ca0d62cacbf8744e5d9ee47.tar.gz |
swscale/output: Correct Alpha in yuv2ya16_X_c_template()
Untested, no testcase
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/output.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index 60a9bdfe82..ed8a69287c 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -905,7 +905,7 @@ yuv2ya16_X_c_template(SwsContext *c, const int16_t *lumFilter, for (i = 0; i < dstW; i++) { int j; int Y = -0x40000000; - int64_t A = 0xffff<<14; + int64_t A = 0xffff; for (j = 0; j < lumFilterSize; j++) Y += lumSrc[j][i] * lumFilter[j]; @@ -915,6 +915,7 @@ yuv2ya16_X_c_template(SwsContext *c, const int16_t *lumFilter, Y = av_clip_uint16(Y); if (hasAlpha) { + A = 1<<14; for (j = 0; j < lumFilterSize; j++) A += alpSrc[j][i] * lumFilter[j]; @@ -923,7 +924,7 @@ yuv2ya16_X_c_template(SwsContext *c, const int16_t *lumFilter, } output_pixel(&dest[2 * i ], Y); - output_pixel(&dest[2 * i + 1], hasAlpha ? A : 65535); + output_pixel(&dest[2 * i + 1], A); } } |