summaryrefslogtreecommitdiffstats
path: root/libavcodec/sheervideo.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-06-23 12:55:30 +0200
committerPaul B Mahol <onemda@gmail.com>2016-06-23 12:59:20 +0200
commitdccea0ed0d993792b58dab8f232509c62f0522fd (patch)
treecf021adf27e7c4418c963e31960560f544bfeab2 /libavcodec/sheervideo.c
parentabb3cc46d595dcb186ae30ec7339a56cd9803f45 (diff)
downloadffmpeg-streaming-dccea0ed0d993792b58dab8f232509c62f0522fd.zip
ffmpeg-streaming-dccea0ed0d993792b58dab8f232509c62f0522fd.tar.gz
avcodec/sheervideo: fix YbYr format decoding
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/sheervideo.c')
-rw-r--r--libavcodec/sheervideo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c
index 7ae5479..2f08b7b 100644
--- a/libavcodec/sheervideo.c
+++ b/libavcodec/sheervideo.c
@@ -1794,9 +1794,9 @@ static void decode_ybyr(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
if (get_bits1(gb)) {
for (x = 0; x < avctx->width; x += 2) {
dst_y[x ] = get_bits(gb, 8);
- dst_u[x / 2] = get_bits(gb, 8);
+ dst_u[x / 2] = get_bits(gb, 8) + 128;
dst_y[x + 1] = get_bits(gb, 8);
- dst_v[x / 2] = get_bits(gb, 8);
+ dst_v[x / 2] = get_bits(gb, 8) + 128;
}
} else {
int pred[4] = { -128, 128, 128, 0 };
@@ -1824,9 +1824,9 @@ static void decode_ybyr(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
if (get_bits1(gb)) {
for (x = 0; x < avctx->width; x += 2) {
dst_y[x ] = get_bits(gb, 8);
- dst_u[x / 2] = get_bits(gb, 8);
+ dst_u[x / 2] = get_bits(gb, 8) + 128;
dst_y[x + 1] = get_bits(gb, 8);
- dst_v[x / 2] = get_bits(gb, 8);
+ dst_v[x / 2] = get_bits(gb, 8) + 128;
}
} else {
int pred_TL[4], pred_L[4], pred_T[4];
OpenPOWER on IntegriCloud