[FFmpeg-devel] [PATCH 1/3] avcodec/encode: add checks for custom inter/intra/chroma matrices

Michael Niedermayer michael at niedermayer.cc
Thu Jan 9 20:11:35 EET 2025


Hi

On Tue, Jan 07, 2025 at 12:08:39AM +0100, Marton Balint wrote:
> All elements should be within 1-255.
> ---
>  libavcodec/encode.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

this breaks:

./ffmpeg -i lena.pnm -qscale 4 -intra_matrix 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 -chroma_intra_matrix 400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400 -bitexact custommatrix10,400.jpg

I have not double checked the spec, but the resulting file worked fine
before the patch

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250109/3c993504/attachment.sig>


More information about the ffmpeg-devel mailing list