Commit 060ea526 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/r210dec: fix r10x decoding

parent 5487560a
...@@ -73,10 +73,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -73,10 +73,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
} else { } else {
pixel = av_be2ne32(*src++); pixel = av_be2ne32(*src++);
} }
if (avctx->codec_id == AV_CODEC_ID_R210 || r10) { if (avctx->codec_id == AV_CODEC_ID_R210) {
b = pixel & 0x3ff; b = pixel & 0x3ff;
g = (pixel >> 10) & 0x3ff; g = (pixel >> 10) & 0x3ff;
r = (pixel >> 20) & 0x3ff; r = (pixel >> 20) & 0x3ff;
} else if (r10) {
r = pixel & 0x3ff;
g = (pixel >> 10) & 0x3ff;
b = (pixel >> 20) & 0x3ff;
} else { } else {
b = (pixel >> 2) & 0x3ff; b = (pixel >> 2) & 0x3ff;
g = (pixel >> 12) & 0x3ff; g = (pixel >> 12) & 0x3ff;
......
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