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 3FAA8402D9 for ; Mon, 20 Dec 2021 10:02:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DFE2B68AF55; Mon, 20 Dec 2021 12:02:43 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3690568AEEB for ; Mon, 20 Dec 2021 12:02:37 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id DC9B024017C; Mon, 20 Dec 2021 11:02:36 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 8Z0CtdT0PAZV; Mon, 20 Dec 2021 11:02:36 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 51071240179; Mon, 20 Dec 2021 11:02:36 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id 47FDB16008E; Mon, 20 Dec 2021 11:02:36 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20211212115546.119662-1-ffmpeg@haasn.xyz> References: <20211212115546.119662-1-ffmpeg@haasn.xyz> Mail-Followup-To: FFmpeg development discussions and patches , Niklas Haas Date: Mon, 20 Dec 2021 11:02:36 +0100 Message-ID: <163999455620.13029.4664456819716811959@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v5 1/6] lavu/frame: Add Dolby Vision metadata side data type 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 Cc: Niklas Haas 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: Quoting Niklas Haas (2021-12-12 12:55:41) > From: Niklas Haas > > Signed-off-by: Niklas Haas > --- > doc/APIchanges | 3 + > libavutil/dovi_meta.c | 12 ++++ > libavutil/dovi_meta.h | 132 ++++++++++++++++++++++++++++++++++++++++++ > libavutil/frame.c | 1 + > libavutil/frame.h | 9 ++- > libavutil/version.h | 2 +- > 6 files changed, 157 insertions(+), 2 deletions(-) > > diff --git a/doc/APIchanges b/doc/APIchanges > index 17aa664ca3..0ddde40bdf 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -14,6 +14,9 @@ libavutil: 2021-04-27 > > API changes, most recent first: > > +2021-12-xx - xxxxxxxxxx - lavu 57.12.100 - frame.h > + Add AV_FRAME_DATA_DOVI_RESHAPING. Doesn't match the actual name. > + > 2021-12-xx - xxxxxxxxxx - lavf 59.10.100 - avformat.h > Add AVFormatContext io_close2 which returns an int > > diff --git a/libavutil/dovi_meta.c b/libavutil/dovi_meta.c > index 7bd08f6c54..60b4cb2376 100644 > --- a/libavutil/dovi_meta.c > +++ b/libavutil/dovi_meta.c > @@ -33,3 +33,15 @@ AVDOVIDecoderConfigurationRecord *av_dovi_alloc(size_t *size) > > return dovi; > } > + > +AVDOVIMetadata *av_dovi_metadata_alloc(size_t *size) > +{ > + AVDOVIMetadata *dovi = av_mallocz(sizeof(AVDOVIMetadata)); > + if (!dovi) > + return NULL; > + > + if (size) > + *size = sizeof(*dovi); > + > + return dovi; > +} > diff --git a/libavutil/dovi_meta.h b/libavutil/dovi_meta.h > index 299911d434..20efd41676 100644 > --- a/libavutil/dovi_meta.h > +++ b/libavutil/dovi_meta.h > @@ -29,6 +29,7 @@ > > #include > #include > +#include "rational.h" > > /* > * DOVI configuration > @@ -67,4 +68,135 @@ typedef struct AVDOVIDecoderConfigurationRecord { > */ > AVDOVIDecoderConfigurationRecord *av_dovi_alloc(size_t *size); > > +/** > + * Dolby Vision RPU data header. > + */ > +typedef struct AVDOVIRpuDataHeader { > + uint8_t rpu_type; > + uint16_t rpu_format; > + uint8_t vdr_rpu_profile; > + uint8_t vdr_rpu_level; > + int chroma_resampling_explicit_filter_flag; Why are flags ints, while other things can be uint8_t? > + > +/** > + * Combined struct representing a combination of header, mapping and color > + * metadata, for attaching to frames as side data. > + * > + * @note The struct must be allocated with av_dovi_metadata_alloc() and > + * its size is not a part of the public ABI. Maybe mention that the individual structs (header, mapping, color) CANNOT be extended without a major bump. > + */ > + > +typedef struct AVDOVIMetadata { > + AVDOVIRpuDataHeader header; > + AVDOVIDataMapping mapping; > + AVDOVIColorMetadata color; > +} AVDOVIMetadata; > + > +/** > + * Allocate an AVDOVIMetadata structure and initialize its > + * fields to default values. + * @param size If this parameter is non-NULL, the size in bytes of the allocated struct will be written here on success -- Anton Khirnov _______________________________________________ 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".