From: Jianfeng Liu <liujianfeng1994@gmail.com>
To: nicolas@ndufresne.ca
Cc: alchark@gmail.com, andy.yan@rock-chips.com, conor+dt@kernel.org,
cristian.ciocaltea@collabora.com, detlev.casanova@collabora.com,
devicetree@vger.kernel.org, didi.debian@cknow.org,
dsimic@manjaro.org, gregkh@linuxfoundation.org, heiko@sntech.de,
krzk+dt@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-staging@lists.linux.dev, liujianfeng1994@gmail.com,
mchehab@kernel.org, robh@kernel.org,
sebastian.reichel@collabora.com
Subject: Re: [PATCH 1/3] media: rockchip: Introduce the rkvdec2 driver
Date: Wed, 19 Jun 2024 15:41:50 +0800 [thread overview]
Message-ID: <20240619074150.103770-1-liujianfeng1994@gmail.com> (raw)
In-Reply-To: <0e8561108c4fc99291ad7cdc0c6af2dbb8e58f02.camel@ndufresne.ca>
Hi,
On Tue, 18 Jun 2024 08:39:07 -0400, Detlev Casanova wrote:
>> I think the min/max width/height are incorrect. From rockchip's TRM V1.0
>> Part1 page 374, supported image size is 64x64 to 65472x65472.
>
>Page 374 shows the sizes for h265. h264 is the next table, where 16x16 and
>65520x65520 is documented.
>
>> And my
>> chromium can't use rkvdec2 because min width/height are set to 16, which
>>
>> will cause error at here in rkvdec2_h264_validate_sps:
>> >+ if (width > ctx->coded_fmt.fmt.pix_mp.width ||
>> >+ height > ctx->coded_fmt.fmt.pix_mp.height)
>> >+ return -EINVAL;
>>
>> width is 16, height is 32 while ctx->coded_fmt.fmt.pix_mp.width and
>> ctx->coded_fmt.fmt.pix_mp.height are both 16.
>
>Maybe
>
>if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY))
> height *= 2;
>
>is causing issues in this case, I can check.
You are right. H264 decoder should support 16x16 to 65520x65520. After
removeing the "height *= 2" code chromium can also decode video now.
Checking with V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY is copied from rkvdec and
rkvdec has min width/height 48x48 so there is no issue with chromium.
Chromium will call VIDIOC_STREAMON with size 16x16 and without sps flag
V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY at the beginning of the video play.
Gstreamer doesn't has this issue because it will call VIDIOC_STREAMON
with the actual video size like 1920x1080.
On Tue, 18 Jun 2024 12:34:07 -0400, Nicolas Dufresne worte:
>Just a theory, but 64x64 looks like Mali GPU requirement to me. Can you give
>more details how it fails exactly ?
Chromium failed when calling v4l2 uapi VIDIOC_STREAMON with size 16x16 and
V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY disabled. It has not come to render step
which will use gpu. Other decoders I have tested with chromium like
hantro g1 and rkvdec both don't have this 16x16 min width/height.
I also tried gstreamer with a 16x16 video and it works fine. So there
should be something wrong in chromium's code. But I have not find where
chromium set sps flags in its v4l2 decoder.
Best regards,
Jianfeng
next prev parent reply other threads:[~2024-06-19 7:41 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-15 1:56 [PATCH 0/3] media: rockchip: Add rkvdec2 driver Detlev Casanova
2024-06-15 1:56 ` [PATCH 1/3] media: rockchip: Introduce the " Detlev Casanova
2024-06-15 8:51 ` Diederik de Haas
2024-06-15 19:44 ` Detlev Casanova
2024-06-16 8:40 ` Diederik de Haas
2024-06-17 13:52 ` Nicolas Dufresne
2025-01-29 14:48 ` Piotr Oniszczuk
2025-01-29 16:20 ` Nicolas Dufresne
2025-01-30 10:22 ` Piotr Oniszczuk
2025-01-29 16:50 ` Detlev Casanova
2025-01-30 10:46 ` Piotr Oniszczuk
2025-01-30 14:54 ` Piotr Oniszczuk
2024-06-15 13:55 ` kernel test robot
2024-06-15 17:21 ` kernel test robot
2024-06-15 22:24 ` Dmitry Osipenko
2024-06-15 22:32 ` Dmitry Osipenko
2024-06-16 6:58 ` Andy Yan
2024-06-17 13:40 ` [PATCH " Detlev Casanova
2024-06-17 13:59 ` Nicolas Dufresne
2024-06-16 21:40 ` Jonas Karlman
2024-06-17 13:56 ` Detlev Casanova
2024-06-17 4:49 ` Alex Bee
2024-06-17 14:17 ` Detlev Casanova
2024-06-17 15:10 ` Nicolas Dufresne
2024-06-17 9:47 ` Jianfeng Liu
2024-06-17 14:04 ` Nicolas Dufresne
2024-06-17 14:20 ` Detlev Casanova
2024-06-17 15:22 ` Nicolas Dufresne
2024-06-18 12:13 ` Jianfeng Liu
2024-06-18 12:39 ` Detlev Casanova
2024-06-18 16:34 ` Nicolas Dufresne
2024-06-19 7:41 ` Jianfeng Liu [this message]
2024-06-17 15:21 ` Jianfeng Liu
2024-06-17 12:02 ` Dan Carpenter
2024-06-17 14:23 ` Detlev Casanova
2024-06-15 1:56 ` [PATCH 2/3] media: dt-bindings: rockchip: Document RK3588 Video Decoder 2 bindings Detlev Casanova
2024-06-15 3:15 ` Rob Herring (Arm)
2024-06-15 8:11 ` Jonas Karlman
2024-06-15 19:49 ` Detlev Casanova
2024-06-15 22:58 ` Heiko Stuebner
2024-06-15 1:56 ` [PATCH 3/3] arm64: dts: rockchip: Add rkvdec2 Video Decoder on rk3588(s) Detlev Casanova
2024-06-15 8:25 ` Jonas Karlman
2024-06-15 19:55 ` Detlev Casanova
2024-06-16 7:28 ` Heiko Stuebner
2024-06-17 14:31 ` Detlev Casanova
2024-06-16 9:17 ` Jonas Karlman
2024-06-16 11:55 ` Dragan Simic
2024-06-17 14:36 ` 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=20240619074150.103770-1-liujianfeng1994@gmail.com \
--to=liujianfeng1994@gmail.com \
--cc=alchark@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=detlev.casanova@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=didi.debian@cknow.org \
--cc=dsimic@manjaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@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=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=nicolas@ndufresne.ca \
--cc=robh@kernel.org \
--cc=sebastian.reichel@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).