From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: aiyengar1990@gmail.com,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Hans Verkuil <hverkuil@kernel.org>
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] media: verisilicon: av1: Set the monochrome flag
Date: Sun, 6 Dec 2026 15:42:50 +0100 [thread overview]
Message-ID: <aa19d9be-5490-46df-89a6-b203fc38eb6a@collabora.com> (raw)
In-Reply-To: <20261205-av1-mono-flag-v1-1-ed0773444996@gmail.com>
Le 05/12/2026 à 13:18, Arun Iyengar via B4 Relay a écrit :
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> The decoder's monochrome flag is always cleared, so a 4:0:0 stream is
> parsed as 4:2:0 and decodes to garbage. Set it from the sequence header.
>
> Fixes: 727a400686a2 ("media: verisilicon: Add Rockchip AV1 decoder")
> Cc: stable@vger.kernel.org
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
Nack.
If you want to improve monochromatic support you should add a grey pixel format
before and make sure the driver only enumerate it when V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME
is set.
Regards,
Benjamin
> ---
> Tested on an Orange Pi 5 (RK3588S) with fluster av1-1-b8-24-monochrome
> and av1-1-b10-24-monochrome: luma is bit-exact (was wrong). The chroma
> planes of NV12/P010 are not written; a GREY format follows separately.
>
> Developed with Claude (Anthropic), which wrote the code and the commit
> messages. I reviewed every change.
> ---
> drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
> index f143df99cdb5..6c8c3f7de2dc 100644
> --- a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
> +++ b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
> @@ -1259,7 +1259,8 @@ static void rockchip_vpu981_av1_dec_set_parameters(struct hantro_ctx *ctx)
> hantro_reg_write(vpu, &av1_force_interger_mv,
> !!(ctrls->frame->flags & V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV));
>
> - hantro_reg_write(vpu, &av1_blackwhite_e, 0);
> + hantro_reg_write(vpu, &av1_blackwhite_e,
> + !!(ctrls->sequence->flags & V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME));
> hantro_reg_write(vpu, &av1_delta_q_res_log, ctrls->frame->quantization.delta_q_res);
> hantro_reg_write(vpu, &av1_delta_q_present,
> !!(ctrls->frame->quantization.flags
>
> ---
> base-commit: fd568e1139cc43b39fad1108463d1f7681d82ce2
> change-id: 20261130-av1-mono-flag-d6f4a2a921be
>
> Best regards,
> --
> Arun Iyengar <aiyengar1990@gmail.com>
prev parent reply other threads:[~2026-12-06 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 12:18 Arun Iyengar via B4 Relay
2026-12-06 14:42 ` Benjamin Gaignard [this message]
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=aa19d9be-5490-46df-89a6-b203fc38eb6a@collabora.com \
--to=benjamin.gaignard@collabora.com \
--cc=aiyengar1990@gmail.com \
--cc=heiko@sntech.de \
--cc=hverkuil@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=stable@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®