PR #25351 opened by romainhedouin URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25351 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25351.patch
The chroma intra quantiser matrix was read into and written from intra_quantiser_matrix. It overwrote the luma matrix and left chroma_intra_quantiser_matrix empty. Found during a code review sweep of ffmpeg using an LLM. Signed-off-by: romainhedouin <[email protected]> <!-- If this PR requires new FATE test samples, attach them to the PR and list their target paths below (relative to the fate-suite root). Attached filenames must match the sample's filename: ```fate-samples # e.g. vorbis/new-sample.ogg ``` --> >From 2269275f9f5be6c1982fea05435758ba157892cd Mon Sep 17 00:00:00 2001 From: romainhedouin <[email protected]> Date: Thu, 22 Oct 2026 12:37:45 +0200 Subject: [PATCH] avcodec/cbs_mpeg2: use the chroma intra matrix in quant_matrix_extension The chroma intra quantiser matrix was read into and written from intra_quantiser_matrix. It overwrote the luma matrix and left chroma_intra_quantiser_matrix empty. Found during a code review sweep of ffmpeg using an LLM. Signed-off-by: romainhedouin <[email protected]> --- libavcodec/cbs_mpeg2_syntax_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_mpeg2_syntax_template.c b/libavcodec/cbs_mpeg2_syntax_template.c index 5165a14cd50..f9364a2ed1e 100644 --- a/libavcodec/cbs_mpeg2_syntax_template.c +++ b/libavcodec/cbs_mpeg2_syntax_template.c @@ -317,7 +317,7 @@ static int FUNC(quant_matrix_extension)(CodedBitstreamContext *ctx, RWContext *r ui(1, load_chroma_intra_quantiser_matrix); if (current->load_chroma_intra_quantiser_matrix) { for (i = 0; i < 64; i++) - uirs(8, intra_quantiser_matrix[i], 1, i); + uirs(8, chroma_intra_quantiser_matrix[i], 1, i); } ui(1, load_chroma_non_intra_quantiser_matrix); -- 2.54.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
