aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-28 21:46:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-03 17:20:40 +0100
commitc30e59383b0fd958cd45ade28485543589c61a31 (patch)
tree05e09c562194f2ae80ce9f5d089536bc7bf9386d /libavcodec
parentb9e09c9eab3f1fdbc93043908a23092c8a691491 (diff)
downloadffmpeg-c30e59383b0fd958cd45ade28485543589c61a31.tar.gz
cljrdec: improve scaling somewhat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 7e5cbb3c2d96c27d526aa69cbdbd1ab23739d7e5) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cljr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index 0d87f3d7e5..d36e0a0a12 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -82,10 +82,10 @@ static int decode_frame(AVCodecContext *avctx,
uint8_t *cb = &a->picture.data[1][y * a->picture.linesize[1]];
uint8_t *cr = &a->picture.data[2][y * a->picture.linesize[2]];
for (x = 0; x < avctx->width; x += 4) {
- luma[3] = get_bits(&gb, 5) << 3;
- luma[2] = get_bits(&gb, 5) << 3;
- luma[1] = get_bits(&gb, 5) << 3;
- luma[0] = get_bits(&gb, 5) << 3;
+ luma[3] = (get_bits(&gb, 5)*33) >> 2;
+ luma[2] = (get_bits(&gb, 5)*33) >> 2;
+ luma[1] = (get_bits(&gb, 5)*33) >> 2;
+ luma[0] = (get_bits(&gb, 5)*33) >> 2;
luma += 4;
*(cb++) = get_bits(&gb, 6) << 2;
*(cr++) = get_bits(&gb, 6) << 2;