All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jianfeng Liu <liujianfeng1994@gmail.com>
To: detlev.casanova@collabora.com
Cc: corbet@lwn.net, daniel.almeida@collabora.com,
	didi.debian@cknow.org, ezequiel@vanguardiasur.com.ar,
	hansg@kernel.org, heiko@sntech.de, hverkuil@kernel.org,
	james.cowgill@blaize.com, jonas@kwiboo.se, kernel@collabora.com,
	laurent.pinchart@ideasonboard.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-rockchip@lists.infradead.org, mchehab@kernel.org,
	nicolas.dufresne@collabora.com, opensource206@gmail.com,
	ribalda@chromium.org, sakari.ailus@linux.intel.com,
	yunkec@google.com
Subject: Re: [PATCH v7 14/17] media: rkvdec: Add H264 support for the VDPU381 variant
Date: Sun, 21 Dec 2025 00:46:04 +0800	[thread overview]
Message-ID: <20251220164604.10052-1-liujianfeng1994@gmail.com> (raw)
In-Reply-To: <20251218232829.337811-15-detlev.casanova@collabora.com>

Hi,

On Thu, 18 Dec 2025 18:28:24 -0500, Detlev Casanova wrote:
>+static int rkvdec_h264_start(struct rkvdec_ctx *ctx)
>+{
>+	struct rkvdec_dev *rkvdec = ctx->dev;
>+	struct rkvdec_h264_priv_tbl *priv_tbl;
>+	struct rkvdec_h264_ctx *h264_ctx;
>+	struct v4l2_ctrl *ctrl;
>+	int ret;
>+
>+	ctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,
>+			      V4L2_CID_STATELESS_H264_SPS);
>+	if (!ctrl)
>+		return -EINVAL;
>+
>+	h264_ctx = kzalloc(sizeof(*h264_ctx), GFP_KERNEL);
>+	if (!h264_ctx)
>+		return -ENOMEM;

I can see the sps validation is removed:

	ret = rkvdec_h264_validate_sps(ctx, ctrl->p_new.p_h264_sps);
	if (ret)
		return ret;

This should fix decoding issue with chromium when minimum size of h264
decoder is lower than 32. While I find this issue is caused by chromium
not following v4l2 stateless spec, and I think checking sps at start
should be still necessary.

I have sent a fix to chromium[1] and it should get merged later.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/7274555

Best regards,
Jianfeng


WARNING: multiple messages have this Message-ID (diff)
From: Jianfeng Liu <liujianfeng1994@gmail.com>
To: detlev.casanova@collabora.com
Cc: corbet@lwn.net, daniel.almeida@collabora.com,
	didi.debian@cknow.org, ezequiel@vanguardiasur.com.ar,
	hansg@kernel.org, heiko@sntech.de, hverkuil@kernel.org,
	james.cowgill@blaize.com, jonas@kwiboo.se, kernel@collabora.com,
	laurent.pinchart@ideasonboard.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-rockchip@lists.infradead.org, mchehab@kernel.org,
	nicolas.dufresne@collabora.com, opensource206@gmail.com,
	ribalda@chromium.org, sakari.ailus@linux.intel.com,
	yunkec@google.com
Subject: Re: [PATCH v7 14/17] media: rkvdec: Add H264 support for the VDPU381 variant
Date: Sun, 21 Dec 2025 00:46:04 +0800	[thread overview]
Message-ID: <20251220164604.10052-1-liujianfeng1994@gmail.com> (raw)
In-Reply-To: <20251218232829.337811-15-detlev.casanova@collabora.com>

Hi,

On Thu, 18 Dec 2025 18:28:24 -0500, Detlev Casanova wrote:
>+static int rkvdec_h264_start(struct rkvdec_ctx *ctx)
>+{
>+	struct rkvdec_dev *rkvdec = ctx->dev;
>+	struct rkvdec_h264_priv_tbl *priv_tbl;
>+	struct rkvdec_h264_ctx *h264_ctx;
>+	struct v4l2_ctrl *ctrl;
>+	int ret;
>+
>+	ctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,
>+			      V4L2_CID_STATELESS_H264_SPS);
>+	if (!ctrl)
>+		return -EINVAL;
>+
>+	h264_ctx = kzalloc(sizeof(*h264_ctx), GFP_KERNEL);
>+	if (!h264_ctx)
>+		return -ENOMEM;

I can see the sps validation is removed:

	ret = rkvdec_h264_validate_sps(ctx, ctrl->p_new.p_h264_sps);
	if (ret)
		return ret;

This should fix decoding issue with chromium when minimum size of h264
decoder is lower than 32. While I find this issue is caused by chromium
not following v4l2 stateless spec, and I think checking sps at start
should be still necessary.

I have sent a fix to chromium[1] and it should get merged later.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/7274555

Best regards,
Jianfeng

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2025-12-20 16:46 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18 23:28 [PATCH v7 00/17] media: rkvdec: Add support for VDPU381 and VDPU383 Detlev Casanova
2025-12-18 23:28 ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 01/17] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_[ls]t_rps controls Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 02/17] media: v4l2-ctrls: Add hevc_ext_sps_[ls]t_rps controls Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 03/17] media: visl: Add HEVC short and long term RPS sets Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 04/17] media: rkvdec: Switch to using structs instead of writel Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 05/17] media: rkvdec: Move cabac tables to their own source file Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 06/17] media: rkvdec: Use structs to represent the HW RPS Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 07/17] media: rkvdec: Move h264 functions to common file Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 08/17] media: rkvdec: Move hevc " Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 09/17] media: rkvdec: Add variant specific coded formats list Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 10/17] media: rkvdec: Add RCB and SRAM support Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 11/17] media: rkvdec: Support per-variant interrupt handler Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 12/17] media: rkvdec: Enable all clocks without naming them Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 13/17] media: rkvdec: Disable multicore support Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 14/17] media: rkvdec: Add H264 support for the VDPU381 variant Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-19 16:33   ` Diederik de Haas
2025-12-19 16:33     ` Diederik de Haas
2025-12-20 16:46   ` Jianfeng Liu [this message]
2025-12-20 16:46     ` Jianfeng Liu
2025-12-22 13:19     ` Nicolas Dufresne
2025-12-22 13:19       ` Nicolas Dufresne
2025-12-24 19:45       ` Nicolas Dufresne
2025-12-24 19:45         ` Nicolas Dufresne
2025-12-27  7:04   ` kernel test robot
2025-12-27  7:04     ` kernel test robot
2025-12-28  7:52   ` kernel test robot
2025-12-28  7:52     ` kernel test robot
2025-12-18 23:28 ` [PATCH v7 15/17] media: rkvdec: Add H264 support for the VDPU383 variant Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 16/17] media: rkvdec: Add HEVC support for the VDPU381 variant Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-18 23:28 ` [PATCH v7 17/17] media: rkvdec: Add HEVC support for the VDPU383 variant Detlev Casanova
2025-12-18 23:28   ` Detlev Casanova
2025-12-19 13:50 ` [PATCH v7 00/17] media: rkvdec: Add support for VDPU381 and VDPU383 Piotr Oniszczuk
2025-12-19 13:50   ` Piotr Oniszczuk
2025-12-19 15:15   ` Detlev Casanova
2025-12-19 15:15     ` Detlev Casanova

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=20251220164604.10052-1-liujianfeng1994@gmail.com \
    --to=liujianfeng1994@gmail.com \
    --cc=corbet@lwn.net \
    --cc=daniel.almeida@collabora.com \
    --cc=detlev.casanova@collabora.com \
    --cc=didi.debian@cknow.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hansg@kernel.org \
    --cc=heiko@sntech.de \
    --cc=hverkuil@kernel.org \
    --cc=james.cowgill@blaize.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --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=opensource206@gmail.com \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=yunkec@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.