[FFmpeg-devel] [PATCH 5/5] [RFC] libavcodec/ffv1enc: Support storing LSB raw

Jerome Martinez jerome at mediaarea.net
Fri Oct 11 11:29:50 EEST 2024


Le 10/10/2024 à 22:45, Michael Niedermayer a écrit :
> This makes a 16bit RGB raw sample 25% faster at a 2% loss of compression with rawlsb=4
>
> Please test and comment, especially if you are an archivist caring about compression and speed
> Id like to know if this is a direction (that is trading compression against speed) that
> is wanted

This is something I was having in mind for a long time but never spent 
the time to implement it, great that this is done!
Definitely something useful as lsb at 16-bit can not really be compressed.


> [...]
> +//         put_symbol(c, state, f->rawlsb, 0);

I was having in mind to add the count of zeroed lsb and to not store them, sometimes the lsb are upscale with zeroes but we need to keep the hint that it is 16-bit.


> [...]

In practice the 16-bit version of the compressor could be used also for 
16-bit RGB content, it may be a bit faster especially on huge frames 
with a bit less memory usage, but this adaptation can be made in a later 
step.




More information about the ffmpeg-devel mailing list