[FFmpeg-devel] [PATCH] avcodec/ffv1: Store slices*planes with the minimum bits needed after remap

Jerome Martinez jerome at mediaarea.net
Thu Apr 3 00:31:53 EEST 2025


Le 02/04/2025 à 23:13, Michael Niedermayer a écrit :
> [...]
>
> This improves compression as wrap around can be cheaper to reach a
> value.


There is an issue in FFV1 version <=3 with RCT, bit depth of resulting 
luminance plane was 1 more than needed (RCT adds 1 bit to chrominance 
but not to luminance, but with current spec all planes have 1 additional 
bit), preventing in practice the wrap around for luminance, do I 
understand well that the remap would mitigate such issue?
I wonder if with remap it would still be interesting to have a specific 
code for having luminance without this additional useless bit, or if we 
just go with the remap.
Maybe it needs tests (performance impact of remap when not really useful 
vs just keeping the right bit depth of luminance? would remap be faster 
if we keep the right bit depth of luminance?).

Jérôme



More information about the ffmpeg-devel mailing list