ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Wed Apr 30 15:54:50 2025 +0200| [dfb4477191d53d4e28a9d2979a197d169c5928da] | 
committer: Andreas Rheinhardt

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 <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dfb4477191d53d4e28a9d2979a197d169c5928da
---

 libavcodec/mpeg4videodec.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index ad2dfbd0fb..1ece371bdb 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2787,14 +2787,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;
                 }
             }
 
@@ -2814,14 +2812,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;
                 }
             }
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to