devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Grzeschik <mgr@pengutronix.de>
To: Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Geis <pgwipeout@gmail.com>,
	Michael Riesch <michael.riesch@wolfvision.net>,
	Liang Chen <cl@rock-chips.com>,
	linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
	Kever Yang <kever.yang@rock-chips.com>,
	Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Subject: Re: [PATCH 0/3] Enable JPEG Encoder on RK3566/RK3568
Date: Mon, 20 Jun 2022 15:40:39 +0200	[thread overview]
Message-ID: <20220620134039.GG21590@pengutronix.de> (raw)
In-Reply-To: <0414bb0816eef95961fe47de96f97f925d29228f.camel@ndufresne.ca>

[-- Attachment #1: Type: text/plain, Size: 3597 bytes --]

Hi Nicolas,
Hi Andrzej,

On Mon, May 02, 2022 at 08:20:50AM -0400, Nicolas Dufresne wrote:
>Le samedi 30 avril 2022 à 01:20 +0200, Michael Grzeschik a écrit :
>> Since the RK3568 seems to get more and more of attention at the moment
>> I would like to ask if somebody is planning to write support the RKVENC
>> in mainline. That is the VEPU540 core refered to in the RK3568 TRM.
>>
>> I would start with that in the next weeks, taking the bootlin H1 support
>> as an reference to handle the request_api for the encoder part. Which is
>> currently completely untouched in mainline AFAIK.
>
>I'm very happy to ear you'd be interest in helping with this. I'm adding Andrzej
>in CC, as he started some base work using VP8 encoder on RK3399 (same HW found
>on other RK SoC) to make this possible. Note that these are a new type of
>encoders and a specification is needed to ensure they all have a coherent work-
>flow. The first step was obviously to have working prototype, Bootlin started
>with H264 (but never posted anything on the mailing list). I'm under the
>impression they have abandoned it. Andrzej have decided to use VP8 as it is
>simpler. The prototype should help understand the basic flow of an encoder and
>produce a specification for this.

I just have tested the bootlin v4l2-h264-encoder stack on the rk3399
with v5.19-rc2. It is working as expected.

Since there have been some rumours about using the VEPU121 core on the
rk3568, which could have h264 support as well. I have tested this
stack on that core as well.

The findings are; It is producing some data, but the stream created
is not possible to be decoded. Tested with vlc and gstreamer.

Be it due to misconfiguration or the core is really not h264 capable.

Find the latest code here:

https://git.pengutronix.de/cgit/mgr/linux/log/?h=v5.19/topic/rk3568-vepu-h264-stateless-bootlin

>From there, the "easy" part is to make per codec controls, to configure the
>encoder. Demonstrating fixed QP, this is about were I believe Bootlin stopped.

I have seen that the userspace tool is filling in some initial values
in the PPS and SPS headers, which are not adjustable. I bet you refer to that.

>And I personally believe some OSS userland (not just tests) that can handle
>multiple reference, perhaps more advance GOP pattern and some basic rate control
>would help build confidence in the uAPI.

I found the following CTRL Types being defined in the bootlin stack
for the request API.

V4L2_CID_STATELESS_H264_ENCODE_PARAMS
V4L2_CID_STATELESS_H264_ENCODE_RC
V4L2_CID_STATELESS_H264_ENCODE_FEEDBACK

The FEEDBACK CID is the information we gain after one frame was
encoded. With this data the RC (Rate Control) parameter is prepared for
the next frame.

You mean to have some user interface to make the rate control user
configurable?

>Let us know how we can help, we should >void doing the same thing, as
>this is already quite a large project that can easily take over a year
>to become mainline ready.

It would probably help to share some codebase. If you already have
something for that rkvenc codec, be it VP8 support. It would probably
make sense for me to build up on that. Or to discuss common code
patterns on structures.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-06-20 14:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 22:44 [PATCH 0/3] Enable JPEG Encoder on RK3566/RK3568 Nicolas Frattaroli
2022-04-27 22:44 ` [PATCH 1/3] dt-bindings: media: rockchip-vpu: Add RK3568 JPEG compatible Nicolas Frattaroli
2022-05-04 20:23   ` Rob Herring
2022-04-27 22:44 ` [PATCH 3/3] arm64: dts: rockchip: Add JPEG encoder node to rk356x Nicolas Frattaroli
2022-04-29 14:46 ` [PATCH 0/3] Enable JPEG Encoder on RK3566/RK3568 Nicolas Dufresne
2022-04-29 15:28   ` Nicolas Frattaroli
2022-04-29 23:20     ` Michael Grzeschik
2022-05-02 12:20       ` Nicolas Dufresne
2022-06-20 13:40         ` Michael Grzeschik [this message]
2022-06-21 14:44           ` Nicolas Dufresne

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=20220620134039.GG21590@pengutronix.de \
    --to=mgr@pengutronix.de \
    --cc=andrzej.p@collabora.com \
    --cc=cl@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=frattaroli.nicolas@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=kever.yang@rock-chips.com \
    --cc=krzysztof.kozlowski+dt@linaro.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=michael.riesch@wolfvision.net \
    --cc=nicolas@ndufresne.ca \
    --cc=p.zabel@pengutronix.de \
    --cc=pgwipeout@gmail.com \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).