Commit 324954cf authored by Paul B Mahol's avatar Paul B Mahol

avcodec/scpr: fix decoding of prev+top-topleft prediction in keyframes

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent f9d3841a
...@@ -446,13 +446,13 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize) ...@@ -446,13 +446,13 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
} }
r = odst[(ly * linesize + lx) * 4] + 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]; odst[((y * linesize + x) + off - z) * 4];
g = odst[(ly * linesize + lx) * 4 + 1] + 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]; odst[((y * linesize + x) + off - z) * 4 + 1];
b = odst[(ly * linesize + lx) * 4 + 2] + 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]; odst[((y * linesize + x) + off - z) * 4 + 2];
clr = ((b & 0xFF) << 16) + ((g & 0xFF) << 8) + (r & 0xFF); clr = ((b & 0xFF) << 16) + ((g & 0xFF) << 8) + (r & 0xFF);
dst[y * linesize + x] = clr; dst[y * linesize + x] = clr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment