From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B206247FAD for ; Wed, 6 Mar 2024 15:36:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B7C0068CBCB; Wed, 6 Mar 2024 17:36:52 +0200 (EET) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AECD868C92A for ; Wed, 6 Mar 2024 17:36:46 +0200 (EET) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-55b5a37acb6so2603076a12.0 for ; Wed, 06 Mar 2024 07:36:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709739404; x=1710344204; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s8NrOmKGC2eAG3ckk7u/hfDwUCErjOkRonElUegEVG8=; b=Hz+K3F/Ct47I6bm0lY4hihfMu81JFCb3jTyjicHU6vkWfbsyhvsI8DrAHdrunlPZuf mfcBmehS+ZcGISNUXzkNLLhq1fO1UvXmQg+UZ319CmwJN17UzdEdiCERbCInkXRchfth 93Z9UrTiheRtZv4o2SFm03sW+ylfnchpK/21y2YF+sQlO4SgnhT5P4uUmrnAM/gDR1Gv ODxA+s12RLf7Svd51llfwF1k7RJvJEgVx9aXH4XqXU9lQuLHa9YFI69gtkMGc8K81JXb GCuUgOX6ZHEWyP6ePOPCEYHjSwCyOQ9dMJxbgbnBHtQ00TPqS6LZrbMEWfkW4XAi9u9Y cFsA== X-Gm-Message-State: AOJu0Yz9PzAy04egz/wcG1OXUcO+K1oK+re0uPkvNWTL6VKKpwawRvs5 QpCAJMy6HNDru/2KjW4KaiIFDivq4oqgjd4XJGEGU8952Mdq5l0sqBBV+ReXLYd0RzjA8I8BmHS NiW2nwQXs97/LtA7g7F3u81Qe0uceBsHE1fyRoIaAe7lGD1beitI= X-Google-Smtp-Source: AGHT+IFcHscM0Xbc3lIY4bGlppDlxD0eHpLPJZvKek88iNwO7JSdGLI/VTN8XIaYhXmoEKdCqjQ1yh+2k5ZXFkM5zjo= X-Received: by 2002:a17:90b:106:b0:29b:7669:1dfa with SMTP id p6-20020a17090b010600b0029b76691dfamr1880317pjz.2.1709739403493; Wed, 06 Mar 2024 07:36:43 -0800 (PST) MIME-Version: 1.0 References: <20240306071913.2735832-1-marth64@proxyid.net> In-Reply-To: From: Marth64 Date: Wed, 6 Mar 2024 09:36:32 -0600 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH 1/3] avformat/dvdvideodec: add CLUT utilities and subtitle palette support X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 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 > >> --- > >> 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".