From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3 1/4] libavutil/dovi_meta: Add nlq_pivots to AVDOVIDataMapping
Date: Mon, 11 Jul 2022 01:12:33 +0200
Message-ID: <DB6PR0101MB22140A51C5F0C59ABCDCC7758F849@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <20220617203519.74426-2-tcChlisop0@gmail.com>
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 <tcChlisop0@gmail.com>
> ---
> 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.
> 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".
next prev parent reply other threads:[~2022-07-10 23:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 20:35 [FFmpeg-devel] [PATCH v3 0/4] DOVI: Add NLQ pivots " quietvoid
2022-06-17 20:35 ` [FFmpeg-devel] [PATCH v3 1/4] libavutil/dovi_meta: Add nlq_pivots " quietvoid
2022-07-10 23:12 ` Andreas Rheinhardt [this message]
2022-07-10 23:37 ` quietvoid
2022-06-17 20:35 ` [FFmpeg-devel] [PATCH v3 2/4] fftools/ffprobe: Add DOVI nlq_pivots logging quietvoid
2022-06-17 20:35 ` [FFmpeg-devel] [PATCH v3 3/4] libavfilter/vf_showinfo: " quietvoid
2022-06-17 20:35 ` [FFmpeg-devel] [PATCH v3 4/4] fate: Add test to parse profile 7 DOVI RPU quietvoid
2022-07-10 23:08 ` [FFmpeg-devel] [PATCH v3 0/4] DOVI: Add NLQ pivots to AVDOVIDataMapping quietvoid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB6PR0101MB22140A51C5F0C59ABCDCC7758F849@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git