From: Marth64 <marth64@proxyid.net>
To: Marth64 <marth64@proxyid.net>
Cc: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/3] avformat/dvdvideodec: add CLUT utilities and subtitle palette support
Date: Wed, 6 Mar 2024 09:43:26 -0600
Message-ID: <CA+28BfDL6Np3WGCv+X5WDhh0eOtcE_ALB3N7zWr=kKpqbB3JMw@mail.gmail.com> (raw)
In-Reply-To: <CA+28BfCiTk+TSmVy7nfujuRQ3o8C_rUBy7TLw93oLS=BEj-kmw@mail.gmail.com>
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.
On Wed, Mar 6, 2024 at 09:36 Marth64 <marth64@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!
>
> On Wed, Mar 6, 2024 at 09:18 Timo Rothenpieler <timo@rothenpieler.org>
> wrote:
>
>> On 06/03/2024 16:09, Stefano Sabatini wrote:
>> > On date Wednesday 2024-03-06 01:19:11 -0600, Marth64 wrote:
>> >> Since last iteration: removes unused variable in dvdclut.c
>> >>
>> >> Signed-off-by: Marth64 <marth64@proxyid.net>
>> >> ---
>> >> doc/demuxers.texi | 5 +++
>> >> libavformat/Makefile | 2 +-
>> >> libavformat/dvdclut.c | 75
>> +++++++++++++++++++++++++++++++++++++++
>> >> libavformat/dvdclut.h | 37 +++++++++++++++++++
>> >> libavformat/dvdvideodec.c | 15 ++++++++
>> >> 5 files changed, 133 insertions(+), 1 deletion(-)
>> >> create mode 100644 libavformat/dvdclut.c
>> >> create mode 100644 libavformat/dvdclut.h
>> >>
>> >> diff --git a/doc/demuxers.texi b/doc/demuxers.texi
>> >> index f4bac8f3b3..1a17c6db16 100644
>> >> --- a/doc/demuxers.texi
>> >> +++ b/doc/demuxers.texi
>> >> @@ -394,6 +394,11 @@ often with junk data intended for controlling a
>> real DVD player's
>> >> buffering speed and with no other material data value.
>> >> Default is 1, true.
>> >>
>> >
>> >> +@item clut_rgb @var{bool}
>> >> +Output subtitle palettes (CLUTs) as RGB, required for Matroska.
>> >> +Disable to output the palette in its original YUV colorspace.
>> >> +Default is 1, true.
>> >
>> > Can you expand about this? When is matroska used in a DVD?
>>
>> Sounds to me like muxing _to_ matroska needs RGB palettes, but DVDs
>> bring YUV ones.
>>
>> > Can we make the setting automatic in case matroska is detected?
>> >
>> > [...]
>> >
>> > LGTM otherwise.
>> > _______________________________________________
>> > ffmpeg-devel mailing list
>> > ffmpeg-devel@ffmpeg.org
>> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> >
>> > To unsubscribe, visit link above, or email
>> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-03-06 15:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 7:19 Marth64
2024-03-06 7:19 ` [FFmpeg-devel] [PATCH 2/3] avformat/dvdvideodec: add menu demuxing support Marth64
2024-03-06 15:41 ` Stefano Sabatini
2024-03-06 16:35 ` Marth64
2024-03-06 7:19 ` [FFmpeg-devel] [PATCH 3/3] avformat/dvdvideodec: assign mono channel layout explicitly Marth64
2024-03-06 15:10 ` Stefano Sabatini
2024-03-06 15:37 ` Marth64
2024-03-06 15:09 ` [FFmpeg-devel] [PATCH 1/3] avformat/dvdvideodec: add CLUT utilities and subtitle palette support Stefano Sabatini
2024-03-06 15:17 ` Timo Rothenpieler
2024-03-06 15:36 ` Marth64
2024-03-06 15:43 ` Marth64 [this message]
2024-03-06 16:00 ` Stefano Sabatini
2024-03-07 9:53 ` Anton Khirnov
2024-03-07 10:36 ` Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+28BfDL6Np3WGCv+X5WDhh0eOtcE_ALB3N7zWr=kKpqbB3JMw@mail.gmail.com' \
--to=marth64@proxyid.net \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git