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 97821493CE for ; Tue, 9 Apr 2024 16:01:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0DD9568CF46; Tue, 9 Apr 2024 19:01:21 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B4CB068C25D for ; Tue, 9 Apr 2024 19:01:14 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1712678474; bh=RagoykF1JmmLpkbhmJtOj+Ff9rXUc7/j4cJMo/y9mJA=; h=Date:From:To:Subject:In-Reply-To:References:From; b=BlrTCiKYnwXnKNVhjecs1mpNNqTWDeVxPZ6wnsfNHrTfYcNvCxcQBt/PIbZPgUCps apOq1PO0qAcPo0sQjUT74TyQSpa2k/RmlhTOwsQnprR9QASXIHl0TfDZxcJJsDR9yv lI/mQI+PYdtYo9sYSDCjDnrITqJnBAkAPQflAfBM= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 66F4F40006 for ; Tue, 9 Apr 2024 18:01:14 +0200 (CEST) Date: Tue, 9 Apr 2024 18:01:14 +0200 Message-ID: <20240409180114.GB30630@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: References: <20240409125914.61149-1-ffmpeg@haasn.xyz> <20240409125914.61149-5-ffmpeg@haasn.xyz> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH v2 04/11] avcodec/dovi_rpu: clarify semantics of guess_profile() 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: On Tue, 09 Apr 2024 17:37:32 +0200 Andreas Rheinhardt wrote: > Niklas Haas: > > From: Niklas Haas > > > > This is based on HEVC only, H.264/AV1 use their own (hopefully correctly > > signalled) profiles. > > --- > > libavcodec/dovi_rpu.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c > > index 267e52ceb66..4da711d763e 100644 > > --- a/libavcodec/dovi_rpu.c > > +++ b/libavcodec/dovi_rpu.c > > @@ -121,7 +121,8 @@ int ff_dovi_attach_side_data(DOVIContext *s, AVFrame *frame) > > return 0; > > } > > > > -static int guess_profile(const AVDOVIRpuDataHeader *hdr) > > +/* Note: Only works for HEVC */ > > +static int guess_hevc_profile(const AVDOVIRpuDataHeader *hdr) > > { > > switch (hdr->vdr_rpu_profile) { > > case 0: > > @@ -510,7 +511,7 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, > > use_prev_vdr_rpu = get_bits1(gb); > > use_nlq = (hdr->rpu_format & 0x700) == 0 && !hdr->disable_residual_flag; > > > > - profile = s->cfg.dv_profile ? s->cfg.dv_profile : guess_profile(hdr); > > + profile = s->cfg.dv_profile ? s->cfg.dv_profile : guess_hevc_profile(hdr); > > if (profile == 5 && use_nlq) { > > av_log(s->logctx, AV_LOG_ERROR, "Profile 5 RPUs should not use NLQ\n"); > > goto fail; > > Is guess_hevc_profile only called for HEVC? Yes. All non-HEVC codecs explicitly override s->cfg.dv_profile before calling into this function. But probably we should document that more clearly somewhere. > > - Andreas > > _______________________________________________ > 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".