aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-11 22:45:40 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:39 +0200
commitc41818dc5dc14eb944761204e7b0ac179a6dcd1a (patch)
tree0d0b50dba25dbd10c5e39f1695667da811f4f2b5 /libavcodec
parent0f92fecebb783d8d9e86473a12a0f724a0f78f34 (diff)
downloadffmpeg-c41818dc5dc14eb944761204e7b0ac179a6dcd1a.tar.gz
avcodec/mpeg4videodec: Don't initialize unused inter_scantable
inter_scantable is only used by the dct_unquantize_h263_inter functions, yet this is not used by the MPEG-4 decoder at all (in case H.263 quantization is used, the unquantization already happens in mpeg4_decode_block()). Also move the common initialization of ff_permute_scantable() out of the if. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg4videodec.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 130cde7a9d..77bd3e9947 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -3251,22 +3251,17 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb,
} else
s->alternate_scan = 0;
}
-
if (s->alternate_scan) {
- ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_alternate_vertical_scan);
ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_alternate_vertical_scan);
ff_permute_scantable(s->permutated_intra_h_scantable, ff_alternate_vertical_scan,
s->idsp.idct_permutation);
- ff_permute_scantable(s->permutated_intra_v_scantable, ff_alternate_vertical_scan,
- s->idsp.idct_permutation);
} else {
- ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_zigzag_direct);
ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
ff_permute_scantable(s->permutated_intra_h_scantable, ff_alternate_horizontal_scan,
s->idsp.idct_permutation);
- ff_permute_scantable(s->permutated_intra_v_scantable, ff_alternate_vertical_scan,
- s->idsp.idct_permutation);
}
+ ff_permute_scantable(s->permutated_intra_v_scantable, ff_alternate_vertical_scan,
+ s->idsp.idct_permutation);
/* Skip at this point when only parsing since the remaining
* data is not useful for a parser and requires the