summaryrefslogtreecommitdiff
path: root/libavcodec/scpr.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-04-02 16:03:03 +0200
committerPaul B Mahol <onemda@gmail.com>2018-04-02 16:05:23 +0200
commit324954cf960eb098929f4c610f60f5e1547609f6 (patch)
tree1142ab087e737654bab357c2a507c4854402e7bb /libavcodec/scpr.c
parentf9d3841ae6147eaa51c57c574cd81e9ce9566e3a (diff)
avcodec/scpr: fix decoding of prev+top-topleft prediction in keyframes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/scpr.c')
-rw-r--r--libavcodec/scpr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index 3c797d55f5..72f59d5917 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -446,13 +446,13 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
}
r = odst[(ly * linesize + lx) * 4] +
- odst[((y * linesize + x) + off - z) * 4 + 4] -
+ odst[((y * linesize + x) + off) * 4 + 4] -
odst[((y * linesize + x) + off - z) * 4];
g = odst[(ly * linesize + lx) * 4 + 1] +
- odst[((y * linesize + x) + off - z) * 4 + 5] -
+ odst[((y * linesize + x) + off) * 4 + 5] -
odst[((y * linesize + x) + off - z) * 4 + 1];
b = odst[(ly * linesize + lx) * 4 + 2] +
- odst[((y * linesize + x) + off - z) * 4 + 6] -
+ odst[((y * linesize + x) + off) * 4 + 6] -
odst[((y * linesize + x) + off - z) * 4 + 2];
clr = ((b & 0xFF) << 16) + ((g & 0xFF) << 8) + (r & 0xFF);
dst[y * linesize + x] = clr;