[FFmpeg-devel] [PATCH] [h264] Use small padding with the checked bitstream reader.

Dale Curtis dalecurtis at chromium.org
Thu Aug 15 02:32:36 EEST 2024


MAX_MBPAIR_SIZE was added in 23f5cff92cdcfa55a735c458fcb5f95c0e0f3b1f
to prevent CABAC/CAVLC overread issues. It adds 256kb of padding to
RBSP allocations. AFAICT it seems unnecessary with the checked
bitstream reader. Dropping this padding is a substantial memory
improvement for constrained devices.

782865bf3094e36cbb4bd9cfacda252307e6589d removed the small padding
when AV_CODEC_FLAG2_FAST was set, but I don't have access to that
fuzzer test case to check this patch. Does anyone have this for testing?

This didn't trigger any fuzzer warnings in Chrome with our existing corpus,
but please yell if I've done something silly.

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_padding.patch
Type: application/octet-stream
Size: 1489 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240814/63c7238c/attachment.obj>


More information about the ffmpeg-devel mailing list