aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/diracdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-25 16:22:49 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-25 19:32:39 +0200
commit6d6fc4105b871490068958ded491dbb8b19c65be (patch)
treecf651c0075597e417cebb04dfceb5a5881d88f10 /libavcodec/diracdec.c
parentd98f34d7d440ab3671be4e55c00d2cc7bf007eab (diff)
downloadffmpeg-6d6fc4105b871490068958ded491dbb8b19c65be.tar.gz
avcodec/diracdec: Factor quant matrix reads
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r--libavcodec/diracdec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index 3573298ca1..601d701bc8 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1257,11 +1257,10 @@ static int dirac_unpack_idwt_params(DiracContext *s)
if (get_bits1(gb)) {
av_log(s->avctx,AV_LOG_DEBUG,"Low Delay: Has Custom Quantization Matrix!\n");
/* custom quantization matrix */
- s->lowdelay.quant[0][0] = get_interleaved_ue_golomb(gb);
for (level = 0; level < s->wavelet_depth; level++) {
- s->lowdelay.quant[level][1] = get_interleaved_ue_golomb(gb);
- s->lowdelay.quant[level][2] = get_interleaved_ue_golomb(gb);
- s->lowdelay.quant[level][3] = get_interleaved_ue_golomb(gb);
+ for (i = !!level; i < 4; i++) {
+ s->lowdelay.quant[level][i] = get_interleaved_ue_golomb(gb);
+ }
}
} else {
if (s->wavelet_depth > 4) {