aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-07 22:43:10 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:38 +0200
commit7bccf63de5d89f21561456613cf58f44ef87edbd (patch)
tree81da44def1e56977563480c2d69917a1730e05f6 /libavcodec
parentd197a8d6b63aced7e544b1341336c57d612460d1 (diff)
downloadffmpeg-7bccf63de5d89f21561456613cf58f44ef87edbd.tar.gz
avcodec/mpeg4videodec: Don't initialize unused stuff
Only the intra scantable is used for studio profile. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg4videodec.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index f1b542cebf..18329132aa 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -3430,21 +3430,8 @@ static int decode_studio_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s->q_scale_type = get_bits1(gb);
}
- 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_init_scantable(s->idsp.idct_permutation, &s->intra_scantable,
+ s->alternate_scan ? ff_alternate_vertical_scan : ff_zigzag_direct);
mpeg4_load_default_matrices(s);