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 DE67D433C2 for ; Sun, 10 Jul 2022 23:37:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2CC1168B687; Mon, 11 Jul 2022 02:37:47 +0300 (EEST) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3903D68B5F5 for ; Mon, 11 Jul 2022 02:37:41 +0300 (EEST) Received: by mail-qt1-f177.google.com with SMTP id w1so5442544qtv.9 for ; Sun, 10 Jul 2022 16:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:date:mime-version:user-agent:to:references:subject :content-language:in-reply-to:content-transfer-encoding; bh=2t/5GnqwmkDA/4uV83Ff1DBQM6vvi3mToL7/YYFultk=; b=lKF2VTX1h8ce7DO8J6QbjAoAkQqiPetkvmGaU1c4q4J/+3MApb8Fr5CW/J1hrRwyQO ORCO6TUDwH08Gd87SZDlLjBehwYAOsKx9UJYk108YvPIx1BC+Xi2w7N7dH/UNIP3MHsI fpYT0N7szxLZubKkdmwDSYa6rTTiXkA/6ZOjevLtdMSKLPD66krvVYxAhOUOPN6ULAGU jHTyzeuaODZX6e4WpsHGei8TLtHKfwxDzH0FIFfWhCozMI+xV+RTtf2OcX+TiUi7NmAo jRLR14rVDIrhQcyaKdJ1IUvSlrijU19sDq+ZQKZ5xfyzrzIhSXZAI7OtUCo6l8A8Tok0 9dcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:date:mime-version:user-agent:to :references:subject:content-language:in-reply-to :content-transfer-encoding; bh=2t/5GnqwmkDA/4uV83Ff1DBQM6vvi3mToL7/YYFultk=; b=ePJLpT0UNMSJeSxwuhsHqgnDsypRJXni+Q7989r5lXvtVwdJg9dHv46yFF4VVyy6dh CBik33l1eaAuCSIkdQA0bgx2mVNc13zg0NPFyhz/wa9/Jyu9OuPd5Nd5RH7iPjUMiHCk w2z0t7Y7iJCHBYvKFo4+SsMTEXI9SwN1F3xQfc7dYZGxncfMYik7pUbejHNJgqYxWoZg KobxICtkCVWLI9LwNZtTtYT0F7YbNFd3wKCmR17bzbaDq5swm6POu2h8s+iMMS39ggKF T3YfhH5MSp/jQuhDlxgXOMdqbBe+d4UCBFtJfisePsR413GIQX/6VWV4zih0jpBH4I9i q77g== X-Gm-Message-State: AJIora99r/ZrsW4PI4hJxJgVHVUkoT2V298Y2hTz3B4xy702hAahTF9L /cx/MtmZuCsIPBvKFbY4UBBQt69qJwo= X-Google-Smtp-Source: AGRyM1sC3OVH57pHmwdQmsi0oE+1G4O7oPnwXFXQYBqdpNY5dATn2UMU59/c9f2/9OoL15H9ZGn6Kg== X-Received: by 2002:a05:6214:e87:b0:473:129e:224a with SMTP id hf7-20020a0562140e8700b00473129e224amr11466892qvb.29.1657496259291; Sun, 10 Jul 2022 16:37:39 -0700 (PDT) Received: from [10.65.5.141] ([89.36.78.10]) by smtp.gmail.com with ESMTPSA id k188-20020a37a1c5000000b006a73ad95d40sm4207611qke.55.2022.07.10.16.37.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Jul 2022 16:37:38 -0700 (PDT) From: quietvoid X-Google-Original-From: quietvoid Message-ID: Date: Sun, 10 Jul 2022 19:37:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-US In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v3 1/4] libavutil/dovi_meta: Add nlq_pivots to AVDOVIDataMapping 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 10/07/2022 19.12, Andreas Rheinhardt wrote: > quietvoid: >> The NLQ pivots are not documented but should be present >> in the header for profile 7 RPU format. >> It has been verified using Dolby's verification toolkit. >> >> Signed-off-by: quietvoid >> --- >> libavcodec/dovi_rpu.c | 9 ++++++++- >> libavutil/dovi_meta.h | 1 + >> 2 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c >> index a87562c8a3..31e87cfbcc 100644 >> --- a/libavcodec/dovi_rpu.c >> +++ b/libavcodec/dovi_rpu.c >> @@ -117,7 +117,7 @@ int ff_dovi_attach_side_data(DOVIContext *s, AVFrame *frame) >> /* Copy only the parts of these structs known to us at compiler-time. */ >> #define COPY(t, a, b, last) memcpy(a, b, offsetof(t, last) + sizeof((b)->last)) >> COPY(AVDOVIRpuDataHeader, av_dovi_get_header(dovi), &s->header, disable_residual_flag); >> - COPY(AVDOVIDataMapping, av_dovi_get_mapping(dovi), s->mapping, nlq[2].linear_deadzone_threshold); >> + COPY(AVDOVIDataMapping, av_dovi_get_mapping(dovi), s->mapping, nlq_pivots[1]); > Do we need the [1] here? I think not. It does indeed seem to be equivalent to just have `nlq_pivots`. >> COPY(AVDOVIColorMetadata, av_dovi_get_color(dovi), s->color, source_diagonal); >> return 0; >> } >> @@ -315,7 +315,14 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size) >> } >> >> if (use_nlq) { >> + int nlq_pivot = 0; >> vdr->mapping.nlq_method_idc = get_bits(gb, 3); >> + >> + for (int i = 0; i < 2; i++) { >> + nlq_pivot += get_bits(gb, hdr->bl_bit_depth); >> + vdr->mapping.nlq_pivots[i] = av_clip_uint16(nlq_pivot); >> + } >> + >> /** >> * The patent mentions another legal value, NLQ_MU_LAW, but it's >> * not documented anywhere how to parse or apply that type of NLQ. >> diff --git a/libavutil/dovi_meta.h b/libavutil/dovi_meta.h >> index 3d11e02bff..6afc7b055a 100644 >> --- a/libavutil/dovi_meta.h >> +++ b/libavutil/dovi_meta.h >> @@ -147,6 +147,7 @@ typedef struct AVDOVIDataMapping { >> uint32_t num_x_partitions; >> uint32_t num_y_partitions; >> AVDOVINLQParams nlq[3]; /* per component */ >> + uint16_t nlq_pivots[2]; /* nlq_pred_pivot_value */ >> } AVDOVIDataMapping; >> >> /** > _______________________________________________ > 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".