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 E94B1492E5 for ; Fri, 12 Jul 2024 11:40:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 633C268D9FA; Fri, 12 Jul 2024 14:40:28 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1B0F268D9FA for ; Fri, 12 Jul 2024 14:40:21 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1720784419; bh=5bniIBaU/9lED+WPQzyfg/3nb7Bnh7cKer28xLJzcOA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bZFHzAJs+3kiMt5fFjPi2tHD9CudeAo5rYCONmnuxK4F3d4QwjrvIWLCxigjvbztj +03W31ZKtaTKiyss6IkvszFJddCF/YXi8z+nFxnYpuZhIcberlBsaXY9jBYgYJE0DM /68+kTZk1AC4N9XbrMwT0odo4xJ+0koZ/Hintb8U= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 6140940BD5; Fri, 12 Jul 2024 13:40:19 +0200 (CEST) Date: Fri, 12 Jul 2024 13:40:19 +0200 Message-ID: <20240712134019.GB9570@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20240624172044.101722-1-ffmpeg@haasn.xyz> References: <20240624172044.101722-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH 1/9] avcodec/dovi_rpudec: clarify semantics 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: On Mon, 24 Jun 2024 19:20:36 +0200 Niklas Haas wrote: > From: Niklas Haas > > ff_dovi_rpu_parse() and ff_dovi_rpu_generate() are a bit inconsistent in > that they expect different levels of encapsulation, due to the nature of > how this is handled in the context of different APIs. Clarify the status > quo. (And fix an incorrect reference to the RPU payload bytes as 'RBSP') > --- > libavcodec/dovi_rpu.h | 5 +++-- > libavcodec/dovi_rpudec.c | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/dovi_rpu.h b/libavcodec/dovi_rpu.h > index bfb118d6b5..205d16ffbc 100644 > --- a/libavcodec/dovi_rpu.h > +++ b/libavcodec/dovi_rpu.h > @@ -95,8 +95,9 @@ void ff_dovi_ctx_unref(DOVIContext *s); > void ff_dovi_ctx_flush(DOVIContext *s); > > /** > - * Parse the contents of a Dovi RPU NAL and update the parsed values in the > - * DOVIContext struct. > + * Parse the contents of a Dolby Vision RPU and update the parsed values in the > + * DOVIContext struct. This function should receive the decoded unit payload, > + * without any T.35 or NAL unit headers. > * > * Returns 0 or an error code. > * > diff --git a/libavcodec/dovi_rpudec.c b/libavcodec/dovi_rpudec.c > index c025800206..375e6e560b 100644 > --- a/libavcodec/dovi_rpudec.c > +++ b/libavcodec/dovi_rpudec.c > @@ -360,7 +360,7 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, > emdf_protection = get_bits(gb, 5 + 12); > VALIDATE(emdf_protection, 0x400, 0x400); > } else { > - /* NAL RBSP with prefix and trailing zeroes */ > + /* NAL unit with prefix and trailing zeroes */ > VALIDATE(rpu[0], 25, 25); /* NAL prefix */ > rpu++; > rpu_size--; > -- > 2.45.1 > Confirmed working via the official Dolby Bitstream validator tool. I'll merge it shortly if nobody objects. I made one more minor local change, renaming the default "all" compression preset to "limited", corresponding to the limited metadata compression scheme described in chapter 9 of the dolby vision bitstream specification. Specifically, we want to discourage the use of potential compression modes that go beyond "limited" because they are not broadly compatible with real devices, so having an "all" preset is a bit pointless. _______________________________________________ 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".