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 1242443025 for ; Fri, 17 Jun 2022 19:35:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E317468B8E7; Fri, 17 Jun 2022 22:35:44 +0300 (EEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8857368B821 for ; Fri, 17 Jun 2022 22:35:38 +0300 (EEST) Received: by mail-pj1-f48.google.com with SMTP id t3-20020a17090a510300b001ea87ef9a3dso4970413pjh.4 for ; Fri, 17 Jun 2022 12:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=BIEekVWAYcx+nWvbLi4w3N0Ae2KPasYwpVsqku+1gmk=; b=mNzFzMr3+VqPEFA25TZYuy0v1TbnLhFoMeZBaq/t2D+1EOOmY1V5q/Kw7pJgHkL3to LEvnUM7FN9MIe7KSq1eXwqv05YGwZt+RguGelZWo7Zku9LfBiwAIFf6p5J3DZyuX6Gqy LLZFmAU7HbDttfrAwrqcs8MI6tAaMOeBfaxcvNUEnDkJuHEC9yWi3G7LdUo/KrxyKA5l 3llA+f9FMO5sgyb32tWJWhaKT/nBV/ZHoEJ1kEFJPKdrB2mxT28MsrGTMGSqYE9uzk3V RGXOwQK3AJ4NzvH+yJViOOEt0NBQC//mameF7lsNnPUz7bAUMG2/OtKf12CZfcaSrLbu s8og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=BIEekVWAYcx+nWvbLi4w3N0Ae2KPasYwpVsqku+1gmk=; b=mxSMywGkhLC4xukqamkUrb3Q0g5hL42tJkawBuVHsgfP0VNh3udu5nzSDD3hVn185h i7xwE6GiByEXyajuWCE75VLy9d+C52/yYh4Rl8433mDgIUGZ9rwkbfu3lh+XOEB0vnvN aF7TFATQ0JsdFugF6VcCQLdaFXszzEuI4/EmhqKYlX+7XOUtqk/8NROHlvTL9yhtuZ1q 0Bibh6knXzkYYe2pdlEKeVcZbwmPobjwhjMeMTsptTraZ8Clq9NbXhTiK6MvlbWqUbte yHj99b73nodNpc/Sx/kw+fXgL/Ql2pImOOlWneMkCIktZIY6IOYlqo02wAqxUisi+3sk +IdQ== X-Gm-Message-State: AJIora9T2VLQpT0CCO+O/ktzpHrexWlnD5TWSgFASfwT2r8+FiX/mEYM N3SwSEMf5E4V6lk4PtJb6mT6i4yf+NR+k4RnjRBaRzyz X-Google-Smtp-Source: AGRyM1u9kgfG8WHIv++C9MFCpVgnyl/ACr1DPfb205+2EirE8S48+15hQDpH9Kc+9NiTXwuhNKcEpe8hPZNwOv1WgA0= X-Received: by 2002:a17:902:c402:b0:163:fa50:b345 with SMTP id k2-20020a170902c40200b00163fa50b345mr11385565plk.94.1655494536509; Fri, 17 Jun 2022 12:35:36 -0700 (PDT) MIME-Version: 1.0 References: <20220611164530.157-1-tcChlisop0@gmail.com> <20220611164530.157-2-tcChlisop0@gmail.com> In-Reply-To: From: quietvoid Date: Fri, 17 Jun 2022 15:35:25 -0400 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 1/2] 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-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 Sat, Jun 11, 2022 at 12:48 PM 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. > > > > Also implemented the parsing in libavcodec/dovi_rpu.c. > > And added the info to ffprobe and showinfo. > > --- > > fftools/ffprobe.c | 4 ++++ > > libavcodec/dovi_rpu.c | 7 +++++++ > > libavfilter/vf_showinfo.c | 8 ++++++++ > > libavutil/dovi_meta.h | 1 + > > 4 files changed, 20 insertions(+) > > > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > > index c44297c1fa..63eb9b32ae 100644 > > --- a/fftools/ffprobe.c > > +++ b/fftools/ffprobe.c > > @@ -1934,6 +1934,10 @@ static void print_dovi_metadata(WriterContext *w, const AVDOVIMetadata *dovi) > > break; > > } > > > > + if (mapping->nlq_method_idc != AV_DOVI_NLQ_NONE) { > > + print_list_fmt("nlq_pivots", "%"PRIu16, 2, mapping->nlq_pivots[idx]); > > + } > > + > > print_int("num_x_partitions", mapping->num_x_partitions); > > print_int("num_y_partitions", mapping->num_y_partitions); > > > > diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c > > index a87562c8a3..17837eb845 100644 > > --- a/libavcodec/dovi_rpu.c > > +++ b/libavcodec/dovi_rpu.c > > @@ -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/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c > > index 12d39310ef..2148d202b1 100644 > > --- a/libavfilter/vf_showinfo.c > > +++ b/libavfilter/vf_showinfo.c > > @@ -543,6 +543,14 @@ static void dump_dovi_metadata(AVFilterContext *ctx, const AVFrameSideData *sd) > > av_log(ctx, AV_LOG_INFO, "mapping_color_space=%"PRIu8"; ", mapping->mapping_color_space); > > av_log(ctx, AV_LOG_INFO, "mapping_chroma_format_idc=%"PRIu8"; ", mapping->mapping_chroma_format_idc); > > av_log(ctx, AV_LOG_INFO, "nlq_method_idc=%d; ", (int) mapping->nlq_method_idc); > > + > > + if (mapping->nlq_method_idc != AV_DOVI_NLQ_NONE) { > > + av_log(ctx, AV_LOG_INFO, "nlq_pivots={ "); > > + for (int i = 0; i < 2; i++) > > + av_log(ctx, AV_LOG_INFO, "%"PRIu16" ", mapping->nlq_pivots[i]); > > + av_log(ctx, AV_LOG_INFO, "}; "); > > + } > > + > > av_log(ctx, AV_LOG_INFO, "num_x_partitions=%"PRIu32"; ", mapping->num_x_partitions); > > av_log(ctx, AV_LOG_INFO, "num_y_partitions=%"PRIu32"\n", mapping->num_y_partitions); > > > > diff --git a/libavutil/dovi_meta.h b/libavutil/dovi_meta.h > > index 3d11e02bff..c7c5ba721f 100644 > > --- a/libavutil/dovi_meta.h > > +++ b/libavutil/dovi_meta.h > > @@ -144,6 +144,7 @@ typedef struct AVDOVIDataMapping { > > > > /* Non-linear inverse quantization */ > > enum AVDOVINLQMethod nlq_method_idc; > > + uint16_t nlq_pivots[2]; /* nlq_pred_pivot_value */ > > uint32_t num_x_partitions; > > uint32_t num_y_partitions; > > AVDOVINLQParams nlq[3]; /* per component */ > > This breaks ABI. New fields must be added at the end. Thanks. Fixed in v2: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-June/297723.html > > - 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".