Fix R10k blue channel output.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 28 Dec 2014 20:07:56 +0000 (21:07 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sun, 28 Dec 2014 20:07:56 +0000 (21:07 +0100)
Makes R10k -> gbrp10 ffv1 -> R10k roundtrip bit-identical.

libavcodec/r210dec.c

index cbebf7c..5dd2f0d 100644 (file)
@@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                 g = (pixel >>  4) & 0xffc0;
                 r = (pixel >> 14) & 0xffc0;
             } else {
-                b =  pixel <<  4;
+                b = (pixel <<  4) & 0xffc0;
                 g = (pixel >>  6) & 0xffc0;
                 r = (pixel >> 16) & 0xffc0;
             }