avcodec/jpeg2000dec: Fix shift for RGB(A)48/64
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jun 2015 02:19:38 +0000 (04:19 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jun 2015 02:19:38 +0000 (04:19 +0200)
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index 24cb8a1..0d9eca3 100644 (file)
@@ -1331,6 +1331,8 @@ static int jpeg2000_decode_tile(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
         }
     } else {
         int precision = picture->format == AV_PIX_FMT_XYZ12 ||
+                        picture->format == AV_PIX_FMT_RGB48 ||
+                        picture->format == AV_PIX_FMT_RGBA64 ||
                         picture->format == AV_PIX_FMT_GRAY16 ? 16 : s->precision;
 
         for (compno = 0; compno < s->ncomponents; compno++) {