History

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).

Andreas Rheinhardt committed 1 year ago

Commit dfb44771 parent bd6e6491 file · +0 −4Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mpeg4videodec.c+0−4
@@ -2787,14 +2787,12 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 2786 unmodified lines
27872787 last = v;
27882788 j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
27892789 s->intra_matrix[j] = last;
2790− s->chroma_intra_matrix[j] = last;
27912790 }
27922791
27932792 /* replicate last value */
27942793 for (; i < 64; i++) {
27952794 int j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
27962795 s->intra_matrix[j] = last;
2797− s->chroma_intra_matrix[j] = last;
27982796 }
27992797 }
28002798
@@ -2814,14 +2812,12 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 13 unmodified lines
28142812 last = v;
28152813 j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
28162814 s->inter_matrix[j] = v;
2817− s->chroma_inter_matrix[j] = v;
28182815 }
28192816
28202817 /* replicate last value */
28212818 for (; i < 64; i++) {
28222819 int j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
28232820 s->inter_matrix[j] = last;
2824− s->chroma_inter_matrix[j] = last;
28252821 }
28262822 }
28272823

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t