Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1197771iog; Tue, 14 Jun 2022 00:52:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1szXWGr8QWAWO/PcGSnPWvkDTDd0xCfiMG4PxlRHh/tPwz7eNlDAW/zLS9geKxXtRzd21Y8 X-Received: by 2002:a17:90b:1b10:b0:1e8:2966:3232 with SMTP id nu16-20020a17090b1b1000b001e829663232mr3152581pjb.103.1655193154324; Tue, 14 Jun 2022 00:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655193154; cv=none; d=google.com; s=arc-20160816; b=Jl7WIH88+O01YTH+gnIJpjqq36hirCQDUYl0fq2aivW+lG2UXc7AEsgbV3eXVlrxT8 M0FaFHr4wTzR7ziNlx1wl/hvuiw3QvyUgBfbXN4Z5g1Lr+Ux6XTzVFIMwYYaQR/8P67a 8dwIeiVw6r53SYv4DIefDpPSMQMSyi2eSBNo7Ndx6+pW9PTDHv5eUVmuE/a/98lq49fl B1+tljvj0zg4NZW6UHG8xhYfvjAu9tav/rSYislwOT6AOIO3uoIrqP9eCsTD4dOGZSJ0 do5/UMPf5mzF9dNZwlhVQl7/8rBoOZwTQZevTOYb++rjBBEjG+DwhqrCsATZqhSlDKLz 9UPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QUNo1GfDgvzmMnifoZK1+5Is4+Vd2RGTgCS6Urgf2w8=; b=Eg9N8HAqpB+qhfv2tG1fjOjhIOX5Qao+U9Sze1jFrEtXZTMY60XhrBrWSN/MWPGywH ELBTre9ballAKrM4rWqsaadBqbL66TZK3xIMpAGgDKWsvZAtWTO+fqeXVdlkfhDoN0QV mrcJIrdKHCLZsiRfNsCb0tvNZOhg9ho4RHI/QC9DSU2s/jBYfwMzHtZU1lNRLJxmWbAy rVPv9XEyY8/p8kJg6lSOaHDdxTiLvcb3G2EKw1CY6EiD5jRqhTmtEApmB5aQr4h6Qy82 11OZ2XotfP9F0/xnI2B5yvFw93lh3QAwSuYi8tU1mhO26dJJGZrAdCIV+gBvZawYF9rV WzGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="Hi/8Clav"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a17090332c600b00158d0436f45si14576059plr.76.2022.06.14.00.52.21; Tue, 14 Jun 2022 00:52:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="Hi/8Clav"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355170AbiFNHui (ORCPT + 99 others); Tue, 14 Jun 2022 03:50:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352959AbiFNHuC (ORCPT ); Tue, 14 Jun 2022 03:50:02 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A60D93ED0A; Tue, 14 Jun 2022 00:50:01 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:4a7b:8d3a:acaa:ec46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 02FA966016BF; Tue, 14 Jun 2022 08:49:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655193000; bh=kTK81QSVDEiBs3FKcIITrIMvJ0XxOzSqRvqrNtGhvm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hi/8ClavV1wLibbrQNWXrQBgstuEQqAHNhPxi2QhbVrWWQrJ4z12clt5c0bb9lNWK x+JiLD4XaVuT577iQ9nIU4wpbemZH4L5OAorM2Mgo4M9iPgymefyoEoIwsKwIDYLU6 k4kdchjimXzwq3s/bOMfoR+3ImGOwMJ5mFdIZUYkTu5PByDchgm7vFwVVjocjeAJ3+ 6e3NdS4oxbOcw+bjYkkQNiX3QY6m84XovkBdt8yqjNs4Oz7+lQM+nPRo6Ftj0LOg1+ 2a05r6XI4EoiLVTihrmTMN8pc7uijWqoxYLwFceivaW4j1U0djNdkUgJcEdufVQdNd LaJTrp+QFErwA== From: Benjamin Gaignard To: mchehab@kernel.org, hverkuil@xs4all.nl, 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, samuel@sholland.org, nicolas.dufresne@collabora.com, andrzej.p@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v7 07/17] media: uapi: HEVC: Add SEI pic struct flags Date: Tue, 14 Jun 2022 09:49:37 +0200 Message-Id: <20220614074947.160316-8-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220614074947.160316-1-benjamin.gaignard@collabora.com> References: <20220614074947.160316-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The possible values for the field_pic field in the v4l2_hevc_dpb_entry structure are defined in the table D.2 in HEVC specification section D.3.3. Add flags and documentation for each of them. Signed-off-by: Benjamin Gaignard --- .../media/v4l/ext-ctrls-codec.rst | 54 +++++++++++++++++++ include/media/hevc-ctrls.h | 14 +++++ 2 files changed, 68 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index a7803b241612..1ccf6dda61b3 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -3218,6 +3218,7 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - * - __u8 - ``field_pic`` - Whether the reference is a field picture or a frame. + See :ref:`HEVC dpb field pic Flags ` * - __u16 - ``pic_order_cnt[2]`` - The picture order count of the reference. Only the first element of the @@ -3231,6 +3232,59 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - \normalsize +.. _hevc_dpb_field_pic_flags: + +``HEVC dpb field pic Flags`` + +.. raw:: latex + + \scriptsize + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 1 1 2 + + * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME`` + - 0 + - (progressive) Frame + * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD`` + - 1 + - Top field + * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD`` + - 2 + - Bottom field + * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM`` + - 3 + - Top field, bottom field, in that order + * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP`` + - 4 + - Bottom field, top field, in that order + * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP`` + - 5 + - Top field, bottom field, top field repeated, in that order + * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM`` + - 6 + - Bottom field, top field, bottom field repeated, in that order + * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING`` + - 7 + - Frame doubling + * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING`` + - 8 + - Frame tripling + * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM`` + - 9 + - Top field paired with previous bottom field in output order + * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP`` + - 10 + - Bottom field paired with previous top field in output order + * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM`` + - 11 + - Top field paired with next bottom field in output order + * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP`` + - 12 + - Bottom field paired with next top field in output order + .. c:type:: v4l2_hevc_pred_weight_table .. raw:: latex diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h index 01c1795c57a9..f3695ab44389 100644 --- a/include/media/hevc-ctrls.h +++ b/include/media/hevc-ctrls.h @@ -132,6 +132,20 @@ struct v4l2_ctrl_hevc_pps { #define V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE 0x01 +#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME 0 +#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD 1 +#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD 2 +#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM 3 +#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP 4 +#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP 5 +#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM 6 +#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING 7 +#define V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING 8 +#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM 9 +#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP 10 +#define V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM 11 +#define V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP 12 + #define V4L2_HEVC_DPB_ENTRIES_NUM_MAX 16 struct v4l2_hevc_dpb_entry { -- 2.32.0