diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2023-05-15 13:35:42 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2023-05-15 18:41:30 +0200 |
commit | 549430e14da798e776ac6543351c5b98aecf2d1a (patch) | |
tree | d998ac6f6adac75d3c3875636c56f7aa17b7684e | |
parent | bfa8a4a44b747df2d0caebece6f5e53bac2b0aef (diff) | |
download | ffmpeg-549430e14da798e776ac6543351c5b98aecf2d1a.tar.gz |
avcodec/vdpau_mpeg4: fix order of quant matrix coefficients
The matrix coefficients are stored permutated for the IDCT,
rather then in plain raster order, and need to be un-permutated
for the hardware.
-rw-r--r-- | libavcodec/vdpau_mpeg4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c index 6e082eefc6..1211b1df2c 100644 --- a/libavcodec/vdpau_mpeg4.c +++ b/libavcodec/vdpau_mpeg4.c @@ -74,8 +74,9 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, info->alternate_vertical_scan_flag = s->alternate_scan; info->top_field_first = s->top_field_first; for (i = 0; i < 64; ++i) { - info->intra_quantizer_matrix[i] = s->intra_matrix[i]; - info->non_intra_quantizer_matrix[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + info->intra_quantizer_matrix[i] = s->intra_matrix[n]; + info->non_intra_quantizer_matrix[i] = s->inter_matrix[n]; } ff_vdpau_common_start_frame(pic_ctx, buffer, size); |