Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/nvdec_mpeg2: fix order of quant matrix coefficients
@ 2023-05-15 10:51 Hendrik Leppkes
  2023-05-15 11:30 ` Hendrik Leppkes
  2023-05-15 11:39 ` [FFmpeg-devel] [PATCH 1/4] " Hendrik Leppkes
  0 siblings, 2 replies; 7+ messages in thread
From: Hendrik Leppkes @ 2023-05-15 10:51 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Hendrik Leppkes

mpeg2dec stores them permutated for the IDCT, nvdec expects them in
plain raster order.
---
 libavcodec/nvdec_mpeg12.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/nvdec_mpeg12.c b/libavcodec/nvdec_mpeg12.c
index e10735587d..3b9ff60734 100644
--- a/libavcodec/nvdec_mpeg12.c
+++ b/libavcodec/nvdec_mpeg12.c
@@ -83,8 +83,9 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer
     };
 
     for (i = 0; i < 64; ++i) {
-        ppc->QuantMatrixIntra[i] = s->intra_matrix[i];
-        ppc->QuantMatrixInter[i] = s->inter_matrix[i];
+        int n = s->idsp.idct_permutation[i];
+        ppc->QuantMatrixIntra[i] = s->intra_matrix[n];
+        ppc->QuantMatrixInter[i] = s->inter_matrix[n];
     }
 
     return 0;
-- 
2.40.1.windows.1

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-15 12:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15 10:51 [FFmpeg-devel] [PATCH] avcodec/nvdec_mpeg2: fix order of quant matrix coefficients Hendrik Leppkes
2023-05-15 11:30 ` Hendrik Leppkes
2023-05-15 12:01   ` Hendrik Leppkes
2023-05-15 11:39 ` [FFmpeg-devel] [PATCH 1/4] " Hendrik Leppkes
2023-05-15 11:39   ` [FFmpeg-devel] [PATCH 2/4] avcodec/nvdec_mpeg4: " Hendrik Leppkes
2023-05-15 11:39   ` [FFmpeg-devel] [PATCH 3/4] avcodec/vdpau_mpeg12: " Hendrik Leppkes
2023-05-15 11:39   ` [FFmpeg-devel] [PATCH 4/4] avcodec/vdpau_mpeg4: " Hendrik Leppkes

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git