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).
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -2787,14 +2787,12 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 2786 unmodified lines | |||
| 2787 | last = v; | 2787 | last = v; |
| 2788 | j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; | 2788 | j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; |
| 2789 | s->intra_matrix[j] = last; | 2789 | s->intra_matrix[j] = last; |
| 2790 | s->chroma_intra_matrix[j] = last; | ||
| 2791 | } | 2790 | } |
| 2792 | 2791 | ||
| 2793 | /* replicate last value */ | 2792 | /* replicate last value */ |
| 2794 | for (; i < 64; i++) { | 2793 | for (; i < 64; i++) { |
| 2795 | int j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; | 2794 | int j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; |
| 2796 | s->intra_matrix[j] = last; | 2795 | s->intra_matrix[j] = last; |
| 2797 | s->chroma_intra_matrix[j] = last; | ||
| 2798 | } | 2796 | } |
| 2799 | } | 2797 | } |
| 2800 | 2798 | ||
| @@ -2814,14 +2812,12 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) · 13 unmodified lines | |||
| 2814 | last = v; | 2812 | last = v; |
| 2815 | j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; | 2813 | j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; |
| 2816 | s->inter_matrix[j] = v; | 2814 | s->inter_matrix[j] = v; |
| 2817 | s->chroma_inter_matrix[j] = v; | ||
| 2818 | } | 2815 | } |
| 2819 | 2816 | ||
| 2820 | /* replicate last value */ | 2817 | /* replicate last value */ |
| 2821 | for (; i < 64; i++) { | 2818 | for (; i < 64; i++) { |
| 2822 | int j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; | 2819 | int j = s->idsp.idct_permutation[ff_zigzag_direct[i]]; |
| 2823 | s->inter_matrix[j] = last; | 2820 | s->inter_matrix[j] = last; |
| 2824 | s->chroma_inter_matrix[j] = last; | ||
| 2825 | } | 2821 | } |
| 2826 | } | 2822 | } |
| 2827 | 2823 | ||