[FFmpeg-devel] [PATCH] avcodec/ffv1: Allocate unit only when needed and only as large as needed

Michael Niedermayer michael at niedermayer.cc
Fri Apr 4 20:49:36 EEST 2025


On Wed, Apr 02, 2025 at 02:51:54AM +0200, Michael Niedermayer wrote:
> That is instead of a fixed 65536, we now allocate only as many as there
> are pixels.
> We also allocate only for the encoder and only when remapping is enabled
> and only for 32bit per sample
> 
> This should reduce memory consumption, the 2nd array will be
> dealt with in a future commit
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavcodec/ffv1.h    |  2 +-
>  libavcodec/ffv1enc.c | 17 +++++++++++++++++
>  2 files changed, 18 insertions(+), 1 deletion(-)

will apply

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin
-------------- 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/20250404/768381cb/attachment.sig>


More information about the ffmpeg-devel mailing list