lavc/ffv1dec: Scale output for msb-packed compression to full 16bit.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 17 Nov 2016 12:00:47 +0000 (13:00 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 17 Nov 2016 12:00:47 +0000 (13:00 +0100)
2% slowdown for existing decode-line timer.

libavcodec/ffv1dec.c
libavcodec/version.h

index d8f35c3..0719e28 100644 (file)
@@ -142,7 +142,7 @@ static void decode_plane(FFV1Context *s, uint8_t *src,
                 }
             } else {
                 for (x = 0; x < w; x++) {
-                    ((uint16_t*)(src + stride*y))[x*pixel_stride] = sample[1][x] << (16 - s->avctx->bits_per_raw_sample);
+                    ((uint16_t*)(src + stride*y))[x*pixel_stride] = sample[1][x] << (16 - s->avctx->bits_per_raw_sample) | ((uint16_t **)sample)[1][x] >> (2 * s->avctx->bits_per_raw_sample - 16);
                 }
             }
         }
index b5e9ad7..d7819e4 100644 (file)
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  57
 #define LIBAVCODEC_VERSION_MINOR  66
-#define LIBAVCODEC_VERSION_MICRO 104
+#define LIBAVCODEC_VERSION_MICRO 105
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \