mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 06:58:45 +08:00
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.rheinhardt@outlook.com>
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user