From: Hendrik Leppkes <h.leppkes@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Hendrik Leppkes <h.leppkes@gmail.com> Subject: [FFmpeg-devel] [PATCH 3/4] avcodec/vdpau_mpeg12: fix order of quant matrix coefficients Date: Mon, 15 May 2023 13:39:10 +0200 Message-ID: <20230515113911.1232-3-h.leppkes@gmail.com> (raw) In-Reply-To: <20230515113911.1232-1-h.leppkes@gmail.com> The matrix coefficients are stored permutated for the IDCT, rather then in plain raster order, and need to be un-permutated for the hardware. --- libavcodec/vdpau_mpeg12.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c index 354239cad5..79007aa1a8 100644 --- a/libavcodec/vdpau_mpeg12.c +++ b/libavcodec/vdpau_mpeg12.c @@ -75,8 +75,9 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, info->f_code[1][0] = s->mpeg_f_code[1][0]; info->f_code[1][1] = s->mpeg_f_code[1][1]; 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]; } return ff_vdpau_common_start_frame(pic_ctx, buffer, size); -- 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".
next prev parent reply other threads:[~2023-05-15 11:41 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-15 10:51 [FFmpeg-devel] [PATCH] avcodec/nvdec_mpeg2: " 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 ` Hendrik Leppkes [this message] 2023-05-15 11:39 ` [FFmpeg-devel] [PATCH 4/4] avcodec/vdpau_mpeg4: " Hendrik Leppkes
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230515113911.1232-3-h.leppkes@gmail.com \ --to=h.leppkes@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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