linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: John Cox <jc@kynesim.co.uk>
Cc: peng.fan@nxp.com, kernel@collabora.com, festevam@gmail.com,
	linux-rockchip@lists.infradead.org, wens@csie.org,
	linux-imx@nxp.com, dan.carpenter@oracle.com,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	p.zabel@pengutronix.de, s.hauer@pengutronix.de,
	mripard@kernel.org, robh+dt@kernel.org, mchehab@kernel.org,
	ezequiel@collabora.com, linux-arm-kernel@lists.infradead.org,
	jernej.skrabec@siol.net, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, paul.kocialkowski@bootlin.com,
	kernel@pengutronix.de, hverkuil-cisco@xs4all.nl,
	shawnguo@kernel.org
Subject: Re: [PATCH v2 4/9] media: uapi: Add a control for HANTRO driver
Date: Mon, 22 Feb 2021 17:28:30 +0100	[thread overview]
Message-ID: <6364fa8a-db6a-af43-3660-7f0a7a3e0b79@collabora.com> (raw)
In-Reply-To: <9ql73glgbnjaqqsp8ulqenae5n82kfk0o3@4ax.com>


Le 22/02/2021 à 17:16, John Cox a écrit :
>> The HEVC HANTRO driver needs to know the number of bits to skip at
>> the beginning of the slice header.
>> That is a hardware specific requirement so create a dedicated control
>> that this purpose.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
>> ---
>> include/uapi/linux/hantro-v4l2-controls.h | 20 ++++++++++++++++++++
>> include/uapi/linux/v4l2-controls.h        |  5 +++++
>> 2 files changed, 25 insertions(+)
>> create mode 100644 include/uapi/linux/hantro-v4l2-controls.h
>>
>> diff --git a/include/uapi/linux/hantro-v4l2-controls.h b/include/uapi/linux/hantro-v4l2-controls.h
>> new file mode 100644
>> index 000000000000..30b1999b7af3
>> --- /dev/null
>> +++ b/include/uapi/linux/hantro-v4l2-controls.h
>> @@ -0,0 +1,20 @@
>> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
>> +
>> +#ifndef __UAPI_HANTRO_V4L2_CONYTROLS_H__
>> +#define __UAPI_HANTRO_V4L2_CONYTROLS_H__
>> +
>> +#include <linux/v4l2-controls.h>
>> +#include <media/hevc-ctrls.h>
>> +
>> +#define V4L2_CID_HANTRO_HEVC_EXTRA_DECODE_PARAMS	(V4L2_CID_USER_HANTRO_BASE + 0)
>> +
>> +/**
>> + * struct hantro_hevc_extra_decode_params - extra decode parameters for hantro driver
>> + * @hevc_hdr_skip_lenght:	header first bits offset
>> + */
>> +struct hantro_hevc_extra_decode_params {
>> +	__u32	hevc_hdr_skip_lenght;
>> +	__u8	padding[4];
>> +};
> Can you clarify how hevc_hdr_skip_length differs from
> v4l2_ctrl_hevc_slice_params.data_bit_offset?  At first sight they would
> appear to be very similar.

hevc_hdr_skip_length is the difference between the start positions of 2 nals.
v4l2_ctrl_hevc_slice_params.data_bit_offset is the offset of the data in the nal.


Benjamin

>
> Regards
>
> John Cox
>
>> +#endif
>> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
>> index 039c0d7add1b..ced7486c7f46 100644
>> --- a/include/uapi/linux/v4l2-controls.h
>> +++ b/include/uapi/linux/v4l2-controls.h
>> @@ -209,6 +209,11 @@ enum v4l2_colorfx {
>>   * We reserve 128 controls for this driver.
>>   */
>> #define V4L2_CID_USER_CCS_BASE			(V4L2_CID_USER_BASE + 0x10f0)
>> +/*
>> + * The base for HANTRO driver controls.
>> + * We reserve 32 controls for this driver.
>> + */
>> +#define V4L2_CID_USER_HANTRO_BASE		(V4L2_CID_USER_BASE + 0x1170)
>>
>> /* MPEG-class control IDs */
>> /* The MPEG controls are applicable to all codec controls

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

  reply	other threads:[~2021-02-22 16:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 19:18 [PATCH v2 0/9] Add HANTRO G2/HEVC decoder support for IMX8MQ Benjamin Gaignard
2021-02-18 19:18 ` [PATCH v2 1/9] media: hevc: Modify structures to follow H265 ITU spec Benjamin Gaignard
2021-02-18 21:43   ` Jernej Škrabec
2021-02-19 16:45     ` Benjamin Gaignard
2021-02-22 16:24   ` John Cox
2021-02-22 16:39     ` Benjamin Gaignard
2021-02-22 20:01       ` Nicolas Dufresne
2021-02-18 19:18 ` [PATCH v2 2/9] media: hantro: Define HEVC codec profiles and supported features Benjamin Gaignard
2021-02-18 19:18 ` [PATCH v2 3/9] media: hantro: Add a field to distinguish the hardware versions Benjamin Gaignard
2021-02-18 19:18 ` [PATCH v2 4/9] media: uapi: Add a control for HANTRO driver Benjamin Gaignard
2021-02-18 21:34   ` Jernej Škrabec
2021-02-19 15:34     ` Benjamin Gaignard
2021-02-22 16:16   ` John Cox
2021-02-22 16:28     ` Benjamin Gaignard [this message]
2021-02-22 20:13       ` Ezequiel Garcia
2021-02-22 20:16       ` Nicolas Dufresne
2021-02-18 19:18 ` [PATCH v2 5/9] media: hantro: Introduce G2/HEVC decoder Benjamin Gaignard
2021-02-18 19:18 ` [PATCH v2 6/9] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control Benjamin Gaignard
2021-02-18 19:18 ` [PATCH v2 7/9] media: hantro: IMX8M: add variant for G2/HEVC codec Benjamin Gaignard
2021-02-18 19:18 ` [PATCH v2 8/9] dt-bindings: media: nxp,imx8mq-vpu: Update bindings Benjamin Gaignard
2021-02-18 19:18 ` [PATCH v2 9/9] arm64: dts: imx8mq: Add node to G2 hardware Benjamin Gaignard

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=6364fa8a-db6a-af43-3660-7f0a7a3e0b79@collabora.com \
    --to=benjamin.gaignard@collabora.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@collabora.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jc@kynesim.co.uk \
    --cc=jernej.skrabec@siol.net \
    --cc=kernel@collabora.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=peng.fan@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=wens@csie.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).