From 1bb29b373f590b62191353b390fe2e83f15c71d9 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 30 Apr 2025 15:54:50 +0200 Subject: [PATCH 37/44] avcodec/mpeg4videodec: Don't set chroma matrices unnecessarily Only the studio profile uses chroma_inter/intra matrices; the ordinary profile has only inter/intra matrices. And our code (namely the MPEG-2 unquantize functions) only use these two matrices (the MPEG-2 decoder unquantizes on its own while parsing). Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4videodec.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 4e1c4e31d8..b4a1e2ffba 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2781,14 +2781,12 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) last = v; j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; s->intra_matrix[j] = last; - s->chroma_intra_matrix[j] = last; } /* replicate last value */ for (; i < 64; i++) { int j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; s->intra_matrix[j] = last; - s->chroma_intra_matrix[j] = last; } } @@ -2808,14 +2806,12 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) last = v; j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; s->inter_matrix[j] = v; - s->chroma_inter_matrix[j] = v; } /* replicate last value */ for (; i < 64; i++) { int j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; s->inter_matrix[j] = last; - s->chroma_inter_matrix[j] = last; } } -- 2.45.2