[FFmpeg-devel] [PATCH] libavcodec/gifenc: Only write palette entries that actually used

Derek Buitenhuis derek.buitenhuis at gmail.com
Thu Feb 4 19:15:07 EET 2021


On 04/02/2021 17:09, Derek Buitenhuis wrote:
> Accidentally left it in, removed it now.
> 
> Further, I forgot to add re-mapping of the frame values
> for the case where the user-provided palette is not
> front-loaded (e.g. it has gaps), so I'll send a v2.

Another case to consider is that we should not shrink the
global palette at all because later frames may reference
indicies not used in the first frame.

That however, loses us compression efficiency for cases
where it doesn't, or where each frame has a its own
palette anyway.

How do we feel about adding an AVOption to force the
use or not-use of a global palette?

- Derek


More information about the ffmpeg-devel mailing list