summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1dec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2016-11-17 13:00:47 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2016-11-17 13:00:47 +0100
commit55a424c5a836523828b3b2f02b7db610e898b3fc (patch)
tree355184f6e53a52698153006f939c6205af742299 /libavcodec/ffv1dec.c
parentf8247c0ccebc2a153eb76a82961e4f6ca81e6f82 (diff)
downloadffmpeg-55a424c5a836523828b3b2f02b7db610e898b3fc.tar.gz
lavc/ffv1dec: Scale output for msb-packed compression to full 16bit.
2% slowdown for existing decode-line timer.
Diffstat (limited to 'libavcodec/ffv1dec.c')
-rw-r--r--libavcodec/ffv1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index d8f35c34b9..0719e2822d 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -142,7 +142,7 @@ static void decode_plane(FFV1Context *s, uint8_t *src,
}
} else {
for (x = 0; x < w; x++) {
- ((uint16_t*)(src + stride*y))[x*pixel_stride] = sample[1][x] << (16 - s->avctx->bits_per_raw_sample);
+ ((uint16_t*)(src + stride*y))[x*pixel_stride] = sample[1][x] << (16 - s->avctx->bits_per_raw_sample) | ((uint16_t **)sample)[1][x] >> (2 * s->avctx->bits_per_raw_sample - 16);
}
}
}