From fc3546becec8da6c62d12f2e2174d84355731820 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 9 Aug 2020 13:02:46 +0200 Subject: [PATCH] avcodec/cfhd: read prescale table tag Currently unused. Remove prescale shift tag as it is not part of this codec. --- libavcodec/cfhd.c | 9 ++++----- libavcodec/cfhd.h | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 2d3c402e39..94eaccc733 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -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"); diff --git a/libavcodec/cfhd.h b/libavcodec/cfhd.h index 09c570c06b..fa4a2d28f5 100644 --- a/libavcodec/cfhd.h +++ b/libavcodec/cfhd.h @@ -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;