From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A69A1391; Tue, 15 Feb 2022 11:01:18 +0000 (UTC) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:6d7b:ae43:289b:7e7c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 73C541F444DF; Tue, 15 Feb 2022 11:01:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644922876; bh=lso4RA3n7iLwC6PwFUXxy6rDVaKVLSu3cwsoMhLh8VU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7UBW5B5aVLXrLJLUT8UuVUfzyx6RhCgdFo5sOrUlyux158Mt12E3rb7Rikul2wze JBq4nJZng+/IK1xdtSr2UKm8JA72mJ3x1zLPCk9ysTuedFPc9rmbVCDrUAAOlT6sOt 2318J9/5u8sEIX/RglVXCIfY1mQx6kXQxQBd+96jyu+E9XuQF3db4YmgXQyY0sKGzZ YLnUIlZjduxKkJszCbzpMLjdoWkzgLrmn8AnWIhmDSpFXI3lvLRSMlcBvIs2lC2Eop l4Y6iyVpBwouBGmOC1ZoUW77TekmEyH9sbz8cPjmSFI3FxkW5Q6hQIEdk5liUsAISh lQyWNRYvwvycw== From: Benjamin Gaignard To: mchehab@kernel.org, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@gmail.com, hverkuil-cisco@xs4all.nl, jonas@kwiboo.se, nicolas@ndufresne.ca Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@collabora.com, knaerzche@gmail.com, jc@kynesim.co.uk, Benjamin Gaignard Subject: [RFC v2 5/8] media: uapi: Add fields needed for RKVDEC driver Date: Tue, 15 Feb 2022 12:01:00 +0100 Message-Id: <20220215110103.241297-6-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220215110103.241297-1-benjamin.gaignard@collabora.com> References: <20220215110103.241297-1-benjamin.gaignard@collabora.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit RKVDEC driver requires additional fields to perform HEVC decoding. Even if the driver isn't mainlined yet WIP patches could be find here: https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/patches/linux/default/linux-2000-v4l2-wip-rkvdec-hevc.patch This patch only include the change in HEVC uAPI. Signed-off-by: Benjamin Gaignard --- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 16 ++++++++++++++++ include/uapi/linux/v4l2-controls.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 4f3b3ba8319f..3296ac3b9fca 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -2661,6 +2661,13 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - :stub-columns: 0 :widths: 1 1 2 + * - __u8 + - ``video_parameter_set_id`` + - Identifies the VPS for reference by other syntax elements. + * - __u8 + - ``seq_parameter_set_id`` + - Provides an identifier for the SPS for reference by other syntax + elements. * - __u16 - ``pic_width_in_luma_samples`` - @@ -2800,6 +2807,9 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - :stub-columns: 0 :widths: 1 1 2 + * - __u8 + - ``pic_parameter_set_id`` + - Identifies the PPS for reference by other syntax elements. * - __u8 - ``num_extra_slice_header_bits`` - @@ -3026,6 +3036,12 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - * - __u8 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` - The list of L1 reference elements as indices in the DPB. + * - __u16 + - ``short_term_ref_pic_set_size`` + - + * - __u16 + - ``long_term_ref_pic_set_size`` + - * - __u8 - ``padding`` - Applications and drivers must set this to zero. diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 0e0ec2c61b80..b1a3dc05f02f 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -2341,6 +2341,8 @@ enum v4l2_stateless_hevc_start_code { struct v4l2_ctrl_hevc_sps { /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ + __u8 video_parameter_set_id; + __u8 seq_parameter_set_id; __u16 pic_width_in_luma_samples; __u16 pic_height_in_luma_samples; __u8 bit_depth_luma_minus8; @@ -2393,6 +2395,7 @@ struct v4l2_ctrl_hevc_sps { struct v4l2_ctrl_hevc_pps { /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ + __u8 pic_parameter_set_id; __u8 num_extra_slice_header_bits; __u8 num_ref_idx_l0_default_active_minus1; __u8 num_ref_idx_l1_default_active_minus1; @@ -2487,6 +2490,8 @@ struct v4l2_ctrl_hevc_slice_params { __u32 slice_segment_addr; __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; + __u16 short_term_ref_pic_set_size; + __u16 long_term_ref_pic_set_size; /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ struct v4l2_hevc_pred_weight_table pred_weight_table; -- 2.32.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6C7BC433F5 for ; Tue, 15 Feb 2022 11:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MJzSt402sZwRBxwsHx0+Fv0DVuboig5g57M6JwG75Eg=; b=EUx5zc4sqG3SOl MxKamFLwfh+j9J5PlBiVknH4TS8fTi0GcFUVWV+av3V1+JBnpo20tE10LtKM+lQ8gmqjDfqGnLL/W mE3HmugrHwAlR+/A45IYh+KA7ELrxZUFK02uloPOPn1ABMu9ADZFp22wW4RTvUEROn8+foUavUF/x Mol5HpW7Dj8hnBYPyTsrfH6LCDOJBTiXXcMgsjcKHqSucSwGrWeGKgFk4VE4I8HuwEtVuZdaeE8BR qEqMNiCVgNcYLAKUsiS5VuwVflGUK67yQNZMVwVWoRlrergk7arghr2PwhrWN903zwJwKiivolxI7 tuPN+k7hc1L/uMMxvDvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJvau-002QUS-13; Tue, 15 Feb 2022 11:02:04 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJva9-002Q9C-BY for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 11:01:20 +0000 Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:6d7b:ae43:289b:7e7c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 73C541F444DF; Tue, 15 Feb 2022 11:01:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644922876; bh=lso4RA3n7iLwC6PwFUXxy6rDVaKVLSu3cwsoMhLh8VU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7UBW5B5aVLXrLJLUT8UuVUfzyx6RhCgdFo5sOrUlyux158Mt12E3rb7Rikul2wze JBq4nJZng+/IK1xdtSr2UKm8JA72mJ3x1zLPCk9ysTuedFPc9rmbVCDrUAAOlT6sOt 2318J9/5u8sEIX/RglVXCIfY1mQx6kXQxQBd+96jyu+E9XuQF3db4YmgXQyY0sKGzZ YLnUIlZjduxKkJszCbzpMLjdoWkzgLrmn8AnWIhmDSpFXI3lvLRSMlcBvIs2lC2Eop l4Y6iyVpBwouBGmOC1ZoUW77TekmEyH9sbz8cPjmSFI3FxkW5Q6hQIEdk5liUsAISh lQyWNRYvwvycw== From: Benjamin Gaignard To: mchehab@kernel.org, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@gmail.com, hverkuil-cisco@xs4all.nl, jonas@kwiboo.se, nicolas@ndufresne.ca Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@collabora.com, knaerzche@gmail.com, jc@kynesim.co.uk, Benjamin Gaignard Subject: [RFC v2 5/8] media: uapi: Add fields needed for RKVDEC driver Date: Tue, 15 Feb 2022 12:01:00 +0100 Message-Id: <20220215110103.241297-6-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220215110103.241297-1-benjamin.gaignard@collabora.com> References: <20220215110103.241297-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220215_030117_576614_D80F3424 X-CRM114-Status: GOOD ( 12.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org RKVDEC driver requires additional fields to perform HEVC decoding. Even if the driver isn't mainlined yet WIP patches could be find here: https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/patches/linux/default/linux-2000-v4l2-wip-rkvdec-hevc.patch This patch only include the change in HEVC uAPI. Signed-off-by: Benjamin Gaignard --- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 16 ++++++++++++++++ include/uapi/linux/v4l2-controls.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 4f3b3ba8319f..3296ac3b9fca 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -2661,6 +2661,13 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - :stub-columns: 0 :widths: 1 1 2 + * - __u8 + - ``video_parameter_set_id`` + - Identifies the VPS for reference by other syntax elements. + * - __u8 + - ``seq_parameter_set_id`` + - Provides an identifier for the SPS for reference by other syntax + elements. * - __u16 - ``pic_width_in_luma_samples`` - @@ -2800,6 +2807,9 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - :stub-columns: 0 :widths: 1 1 2 + * - __u8 + - ``pic_parameter_set_id`` + - Identifies the PPS for reference by other syntax elements. * - __u8 - ``num_extra_slice_header_bits`` - @@ -3026,6 +3036,12 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - * - __u8 - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` - The list of L1 reference elements as indices in the DPB. + * - __u16 + - ``short_term_ref_pic_set_size`` + - + * - __u16 + - ``long_term_ref_pic_set_size`` + - * - __u8 - ``padding`` - Applications and drivers must set this to zero. diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 0e0ec2c61b80..b1a3dc05f02f 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -2341,6 +2341,8 @@ enum v4l2_stateless_hevc_start_code { struct v4l2_ctrl_hevc_sps { /* ISO/IEC 23008-2, ITU-T Rec. H.265: Sequence parameter set */ + __u8 video_parameter_set_id; + __u8 seq_parameter_set_id; __u16 pic_width_in_luma_samples; __u16 pic_height_in_luma_samples; __u8 bit_depth_luma_minus8; @@ -2393,6 +2395,7 @@ struct v4l2_ctrl_hevc_sps { struct v4l2_ctrl_hevc_pps { /* ISO/IEC 23008-2, ITU-T Rec. H.265: Picture parameter set */ + __u8 pic_parameter_set_id; __u8 num_extra_slice_header_bits; __u8 num_ref_idx_l0_default_active_minus1; __u8 num_ref_idx_l1_default_active_minus1; @@ -2487,6 +2490,8 @@ struct v4l2_ctrl_hevc_slice_params { __u32 slice_segment_addr; __u8 ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; __u8 ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]; + __u16 short_term_ref_pic_set_size; + __u16 long_term_ref_pic_set_size; /* ISO/IEC 23008-2, ITU-T Rec. H.265: Weighted prediction parameter */ struct v4l2_hevc_pred_weight_table pred_weight_table; -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel