METADATA_BLOCK_PICTURE contains this field:

<32> For indexed-color pictures (e.g. GIF), the number of colors used, or 0 for non-indexed pictures.

I'm not clear on the utility of this. Do any programs made use of it? What do they use it for?

While I'm not very experienced in FFmpeg development, from what I can tell fully implementing this would be pretty difficult, though I could easily hardcode 256 (since FFmpeg technically only supports 256-color palettes, though I'd expect encoders to remove unused colors).

Additionally, for the specific case of animated GIFs, it seems unclear how to handle this since the palette can be changed each frame. Should it be the number of unique colors across all palettes in the animation? This would mean that for a non-animated GIF the FLAC field might not match up with the actual GIF, though, if there are duplicate colors...
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to