summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-03 00:33:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-11 03:51:10 +0200
commitd2c910b9a4ff6cd8bff0da1b6dd9098c70c01189 (patch)
treed28a1792be11c256144b263a28ecd1024c80c80b
parent947020541400bbef27a6a2858e725d234758c384 (diff)
downloadffmpeg-streaming-d2c910b9a4ff6cd8bff0da1b6dd9098c70c01189.zip
ffmpeg-streaming-d2c910b9a4ff6cd8bff0da1b6dd9098c70c01189.tar.gz
sws: fix gray16_1
-rw-r--r--libswscale/swscale.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 471526f..d1cb371 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -578,8 +578,8 @@ yuv2gray16_1_c_template(SwsContext *c, const int32_t *buf0,
int i;
for (i = 0; i < (dstW >> 1); i++) {
- int Y1 = buf0[i * 2 ] << 1;
- int Y2 = buf0[i * 2 + 1] << 1;
+ int Y1 = (buf0[i * 2 ]+4)>>3;
+ int Y2 = (buf0[i * 2 + 1]+4)>>3;
output_pixel(&dest[i * 2 + 0], Y1);
output_pixel(&dest[i * 2 + 1], Y2);
OpenPOWER on IntegriCloud