[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240627081310.583427-1-liujianfeng1994@gmail.com>
Date: Thu, 27 Jun 2024 16:13:10 +0800
From: Jianfeng Liu <liujianfeng1994@...il.com>
To: nicolas.dufresne@...labora.com
Cc: conor+dt@...nel.org,
detlev.casanova@...labora.com,
devicetree@...r.kernel.org,
ezequiel@...guardiasur.com.ar,
frattaroli.nicolas@...il.com,
heiko@...ech.de,
kernel@...labora.com,
krzk+dt@...nel.org,
linkmauve@...kmauve.fr,
linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org,
linux-rockchip@...ts.infradead.org,
liujianfeng1994@...il.com,
p.zabel@...gutronix.de,
robh@...nel.org,
sebastian.reichel@...labora.com,
sigmaris@...il.com
Subject: Re: [PATCH v7 6/6] arm64: dts: rockchip: Add VPU121 support for RK3588
Hi Nicolas,
On Wed, 26 Jun 2024 13:46:03 -0400, Nicolas Dufresne wrote:
>Just to clarify, since you are right that it won't work well with GStreamer. It
>does work with multiple decoders (it exposes them all), it is simply that it
>will randomly pick one when decoding, and it may not pick the best one.
I have tested rkvdec2 and vpu121 with gstreamer 1.24.2 on rk356x to decode
a 4K video, and gstreamer always fall with error:
"v4l2slh264dec0: Failed to configure H264 decoder".
I guess that's because 1080p vpu is at fdea0000 which is always
initialized earlier than rkvdec2 at fdf80200, so gstreamer will always
choose the 1080p decoder.
>In the long term, I'd like to stop having to do "like downstream" and expose
>them all. I believe the fix is fairly straightforward in GStreamer. We need to
>expose in the generated element the width/height ranges, and for H.264 the
>supported profiles and level. With that, we at least won't randomly fail at
>decoding 4K, and it should be good enough.
Not only gstreamer, chromium also has similar issue. Chromium will only
check video resolution globally before starting to use one decoder: if
there is a 4K decoder detected before, it will mark 4K resolution as
supported. But when decoding videos, it will choose the first decoder
supporting profile like H264. So chromium may use a 1080p decoder to
decode a 4K video.
Chromium's code about v4l2 is complicated for me. I may create a bug about
it. But chrome os doesn't support devices with multi v4l2 decoders like
rockchip's socs, I don't know if they have the motion to fix it quickly.
>For RK3588, which is a new SoC, its not a problem to upstream something that
>does not work with existing userspace. It would only be a regression if we where
>to enable VDPU121 on RK3399, as now updating linux would cause bugs with
>existing userspace.
There is an old soc just like RK3399: RK3328, which also has a 1080p
hantro h264 decoder and a 4K rkvdec h264 decoder. I guess less people care
about its mainline decoding with gstreamer/chromium so it still has 1080p
decoder enabled.
>For users, it would be best if we get this sorted out in GStreamer by the time
>we have a second decoder. Note that I have some vacation coming up this month,
>so there might be extra delays. Yet, its logical to merge this (the "worst"
>decoder) first, since then randomly picking a better one won't be a regression.
Happy vacation days! I will also take a look at chromium's code to see if
I can fix it.
Best regards,
Jianfeng
Powered by blists - more mailing lists