summaryrefslogtreecommitdiff
path: root/libavcodec/cfhd.c
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 /libavcodec/cfhd.c
parent3ff7171a8524cf1e49bbfc6528c02a205b0f4fac (diff)
avcodec/cfhd: read prescale table tag
Currently unused. Remove prescale shift tag as it is not part of this codec.
Diffstat (limited to 'libavcodec/cfhd.c')
-rw-r--r--libavcodec/cfhd.c9
1 files changed, 4 insertions, 5 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");