[FFmpeg-cvslog] avcodec/sheervideo: fix order of operations for raw lines
Paul B Mahol
git at videolan.org
Tue Jun 7 23:15:52 CEST 2016
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Jun 7 23:14:07 2016 +0200| [c206a3243566eb42c726d605987da90f62300a21] | committer: Paul B Mahol
avcodec/sheervideo: fix order of operations for raw lines
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c206a3243566eb42c726d605987da90f62300a21
---
libavcodec/sheervideo.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c
index 80c450f..792cca5 100644
--- a/libavcodec/sheervideo.c
+++ b/libavcodec/sheervideo.c
@@ -887,12 +887,12 @@ static void decode_ca2p(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
if (get_bits1(gb)) {
for (x = 0; x < avctx->width; x += 2) {
+ dst_a[x ] = get_bits(gb, 10);
dst_y[x ] = get_bits(gb, 10);
dst_u[x / 2] = get_bits(gb, 10);
+ dst_a[x + 1] = get_bits(gb, 10);
dst_y[x + 1] = get_bits(gb, 10);
- dst_a[x ] = get_bits(gb, 10);
dst_v[x / 2] = get_bits(gb, 10);
- dst_a[x + 1] = get_bits(gb, 10);
}
} else {
int pred[4] = { 502, 512, 512, 502 };
@@ -924,12 +924,12 @@ static void decode_ca2p(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
for (y = 1; y < avctx->height; y++) {
if (get_bits1(gb)) {
for (x = 0; x < avctx->width; x += 2) {
+ dst_a[x ] = get_bits(gb, 10);
dst_y[x ] = get_bits(gb, 10);
dst_u[x / 2] = get_bits(gb, 10);
+ dst_a[x + 1] = get_bits(gb, 10);
dst_y[x + 1] = get_bits(gb, 10);
- dst_a[x ] = get_bits(gb, 10);
dst_v[x / 2] = get_bits(gb, 10);
- dst_a[x + 1] = get_bits(gb, 10);
}
} else {
int pred_TL[6], pred_L[6], pred_T[6];
@@ -989,12 +989,12 @@ static void decode_c82p(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
if (get_bits1(gb)) {
for (x = 0; x < avctx->width; x += 2) {
+ dst_a[x ] = get_bits(gb, 8);
dst_y[x ] = get_bits(gb, 8);
dst_u[x / 2] = get_bits(gb, 8);
+ dst_a[x + 1] = get_bits(gb, 8);
dst_y[x + 1] = get_bits(gb, 8);
- dst_a[x ] = get_bits(gb, 8);
dst_v[x / 2] = get_bits(gb, 8);
- dst_a[x + 1] = get_bits(gb, 8);
}
} else {
int pred[4] = { -125, 128, 128, 125 };
@@ -1026,12 +1026,12 @@ static void decode_c82p(AVCodecContext *avctx, AVFrame *p, GetBitContext *gb)
for (y = 1; y < avctx->height; y++) {
if (get_bits1(gb)) {
for (x = 0; x < avctx->width; x += 2) {
+ dst_a[x ] = get_bits(gb, 8);
dst_y[x ] = get_bits(gb, 8);
dst_u[x / 2] = get_bits(gb, 8);
+ dst_a[x + 1] = get_bits(gb, 8);
dst_y[x + 1] = get_bits(gb, 8);
- dst_a[x ] = get_bits(gb, 8);
dst_v[x / 2] = get_bits(gb, 8);
- dst_a[x + 1] = get_bits(gb, 8);
}
} else {
int pred_TL[6], pred_L[6], pred_T[6];
More information about the ffmpeg-cvslog
mailing list