[FFmpeg-cvslog] avcodec/r210dec: fix r10x decoding

Paul B Mahol git at videolan.org
Tue Dec 4 00:37:27 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Dec  3 23:34:05 2018 +0100| [060ea5261df52ff1ce20e87d1ddd0645fc58c2ca] | committer: Paul B Mahol

avcodec/r210dec: fix r10x decoding

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=060ea5261df52ff1ce20e87d1ddd0645fc58c2ca
---

 libavcodec/r210dec.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index 22b95e9092..407684c7fc 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -73,10 +73,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
             } else {
                 pixel = av_be2ne32(*src++);
             }
-            if (avctx->codec_id == AV_CODEC_ID_R210 || r10) {
+            if (avctx->codec_id == AV_CODEC_ID_R210) {
                 b =  pixel & 0x3ff;
                 g = (pixel >> 10) & 0x3ff;
                 r = (pixel >> 20) & 0x3ff;
+            } else if (r10) {
+                r =  pixel & 0x3ff;
+                g = (pixel >> 10) & 0x3ff;
+                b = (pixel >> 20) & 0x3ff;
             } else {
                 b = (pixel >>  2) & 0x3ff;
                 g = (pixel >> 12) & 0x3ff;



More information about the ffmpeg-cvslog mailing list