On date Wednesday 2024-03-06 09:43:26 -0600, Marth64 wrote:
> It is true that this is necessary when muxing to Matroska, but it is also
> the case for MOV - the MOV muxer expects RGB prior to converting to YUV
> again. So this would be needed for MOV also, despite the awkward conversion
> circle. I should update the document to reflect this.

So we might drop the reference to Matroska, or change to something as:

Output subtitle palettes (CLUTs) as RGB, as required for example when
for subtitles rendering in Matroska or MP4 video.
...

I assume there is no heuristic to distinguish RGB/YUV (one trick might
be to add some custom metadata for the colorspace so that it can then
be read by the encoder).

Also I wonder if this is should not rather be an option for the
Matroska/MP4 renderer, to avoid duplicating the code.

> On Wed, Mar 6, 2024 at 09:36 Marth64 <mart...@proxyid.net> wrote:
> 
> > Good morning,
> >
> > DVD subtitle palettes, which are natively YUV, are currently carried as
> > a hex string in their respective subtitle streams and have
> > no concept of colorspace tagging (even predating dvd demuxer). The
> > convention is to convert
> > them to RGB prior to storage. Common players will only render
> > the palettes properly if they are stored as RGB. Even ffmpeg itself
> > expects this, and already does -in libavformat- the YUV-RGB conversions,
> > specifically in mov.c and movenc.c.
> >
> > The point of this patch is to provide a consolidation of the code
> > that deals with creating the extradata as well as the RGB conversion.
> > That can then (1) enable usable palette support for DVD demuxer if it is
> > merged
> > and (2) start the process of consolidating the related conversions in
> > MOV muxer/demuxer and eventually find a way to properly tag
> > the colorspace.
> >
> > Thank you!
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to