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

Michael Niedermayer michael at niedermayer.cc
Thu Apr 3 03:07:36 EEST 2025


Hi Jerome

On Wed, Apr 02, 2025 at 11:31:53PM +0200, Jerome Martinez wrote:
> 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?

yes, in fact with version 4 that issue is fixed with this patch without remap too

and its not just the luminance plane, its alpha too

thx

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

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20250403/af8f0a06/attachment.sig>


More information about the ffmpeg-devel mailing list