]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/cfhd: read prescale table tag
authorPaul B Mahol <onemda@gmail.com>
Sun, 9 Aug 2020 11:02:46 +0000 (13:02 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 9 Aug 2020 16:47:29 +0000 (18:47 +0200)
Currently unused. Remove prescale shift tag as it
is not part of this codec.

libavcodec/cfhd.c
libavcodec/cfhd.h

index 2d3c402e39633301f0c16deb7a2ec948f8c57580..94eaccc733fc29242a8758163194ba090ba97438 100644 (file)
@@ -517,11 +517,10 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
         else if (tag == Quantization) {
             s->quantisation = data;
             av_log(avctx, AV_LOG_DEBUG, "Quantisation: %"PRIu16"\n", data);
-        } else if (tag == PrescaleShift) {
-            s->prescale_shift[0] = (data >> 0) & 0x7;
-            s->prescale_shift[1] = (data >> 3) & 0x7;
-            s->prescale_shift[2] = (data >> 6) & 0x7;
-            av_log(avctx, AV_LOG_DEBUG, "Prescale shift (VC-5): %x\n", data);
+        } else if (tag == PrescaleTable) {
+            for (i = 0; i < 8; i++)
+                s->prescale_table[i] = (data >> (14 - i * 2)) & 0x3;
+            av_log(avctx, AV_LOG_DEBUG, "Prescale table: %x\n", data);
         } else if (tag == BandEncoding) {
             if (!data || data > 5) {
                 av_log(avctx, AV_LOG_ERROR, "Invalid band encoding\n");
index 09c570c06b0b4a79ca1cc1909d707455db97f38b..fa4a2d28f54e94ecaaf65e6d9a29d5f2007570c6 100644 (file)
@@ -83,7 +83,6 @@ enum CFHDParam {
     EncodedFormat    =  84,
     ChannelWidth     = 104,
     ChannelHeight    = 105,
-    PrescaleShift    = 109,
 };
 
 #define VLC_BITS       9
@@ -171,7 +170,7 @@ typedef struct CFHDContext {
     int level;
     int subband_num_actual;
 
-    uint8_t prescale_shift[3];
+    uint8_t prescale_table[8];
     Plane plane[4];
     Peak peak;
 } CFHDContext;