Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2257746imw; Wed, 6 Jul 2022 02:51:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vI3yGAEpTjNwD0EKBWoemlVyc37ctD8YdMg+IMl0ddx5E7bN5smyMu48Dm1tNT3LSGoTHo X-Received: by 2002:a17:90b:4c05:b0:1ef:203e:6da0 with SMTP id na5-20020a17090b4c0500b001ef203e6da0mr45730058pjb.227.1657101096306; Wed, 06 Jul 2022 02:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657101096; cv=none; d=google.com; s=arc-20160816; b=MagkLpPRnzwG1O7cxx+gcGWAjKyN19Rd0WZJ4R6USQ2rdds/cOrgc+d/QBcwdqaOvs pmff7GIwsF0K7Nhhoi7RwIxho3+bYE8dwwtvUL49K44qpV1ATxPBvGlLup+OP9ncGr20 o9mt0rL0EomaJuFi5msAgPcGmxRa5NrvujNKd3Dg1yZXZy08VeC8tL7rWkN/3N/czU4n 6eZwKar95nKXktmdaSwhKe9gHjERlMRkTKQC38jK6fK3jcsphX+np8lkmIAySHvxivKM h0k9+UWqkBO4RHjWHwUqts/akYpW17j6xmd78H277dtwCM0u1f64p2WvYrSNa9l2iBIP MGrQ== 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=N1rcjmi+/+eUDyBNvPc4NCcqSUa9KIPzJSmcEnQzpq0=; b=lB8QHx32u79jjkPunNeaRrQNyVsO0dxH+tznV+vzpFe3vDfPh7nCQkUY8HZVplWBOZ ph4Z6zJKsI2ckpq8pBaRScVcco2A+LoHygqtiJW68nnEUwmbs42dj70Wp3XVK+x5L0ym Hf+o3BqPbmrJQ2Jiqs071TbRbaHbMNFGi2YWYysyAzoIO6cs2ZzOaR0sbO8ncveDImK7 HLYmlqrEilx/DKsJmrigEfALH8ZytRhWEheK5kDMqhUfRWAUMIu94u88WGloYM/yIdwa A6N3Ne4HQ51cDl3SBT3mVpsx4DS/kqYeoq0qR51R4TFGfDOGQ1hw59DaK7cSAF/flfLP LMvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=IdSEQ3R1; 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 p10-20020a056a000a0a00b005255d5ad6e7si20187080pfh.305.2022.07.06.02.51.24; Wed, 06 Jul 2022 02:51:36 -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=IdSEQ3R1; 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 S233196AbiGFJiq (ORCPT + 99 others); Wed, 6 Jul 2022 05:38:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232550AbiGFJiS (ORCPT ); Wed, 6 Jul 2022 05:38:18 -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 1FE9B23179; Wed, 6 Jul 2022 02:38:17 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:3a70:988d:42ce:f5cc]) (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 6172E66019BA; Wed, 6 Jul 2022 10:38:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657100295; bh=PVStR3ApcqPTtqGenIYO4/72sXWBsjSuFtk9oWFtb7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IdSEQ3R11zGZQzzEBqHnA3gIaLsmQK56qtnj4D7/q6boPDeLNFB+uZ9NkIutvIWmL lt37g1B9etRxseHoSQTD8V7JgzkHwzpEq5RLbFTBJTXgX6NYZpYbPMNlqPWzVJ0Esv pCBT26OHV519UD0RwALDT3fCUmjy06pUW7sv3n12OUzBTU+ilDt4WH4slcrx4cGR8A OA0MHAc0PfMu/B0tXonM36TGU1e5OMVNHFuOTce8g5JuQMtU+FB38+iDLZEfiywJL9 WPQ1wuY1KbRP3lK4L1Z0pgnsNHo47lE/qwbw77YJ216X3fuLtxKRavzZTHjNQiTM1X Ido5VueGK4Y1w== 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 v11 07/17] media: uapi: HEVC: Add SEI pic struct flags Date: Wed, 6 Jul 2022 11:37:53 +0200 Message-Id: <20220706093803.158810-8-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220706093803.158810-1-benjamin.gaignard@collabora.com> References: <20220706093803.158810-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 Reviewed-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Jernej Skrabec --- .../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 3dfb81a93935..8ba16e8742f3 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