summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-08-09 13:02:46 +0200
committerPaul B Mahol <onemda@gmail.com>2020-08-09 18:47:29 +0200
commitfc3546becec8da6c62d12f2e2174d84355731820 (patch)
tree831c74d8607dcb6f41affb230a5123d52846672a
parent3ff7171a8524cf1e49bbfc6528c02a205b0f4fac (diff)
avcodec/cfhd: read prescale table tag
Currently unused. Remove prescale shift tag as it is not part of this codec.
-rw-r--r--libavcodec/cfhd.c9
-rw-r--r--libavcodec/cfhd.h3
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;