Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3821895ybt; Tue, 23 Jun 2020 11:32:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytzHtBsvWY+RwYqFmNTSQo5wU3X+By/NeGXEtPpEKM1kfg55uvT5FA5JVonOXSwmRe1ToY X-Received: by 2002:a17:906:e115:: with SMTP id gj21mr20708153ejb.528.1592937140819; Tue, 23 Jun 2020 11:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592937140; cv=none; d=google.com; s=arc-20160816; b=ZPe4HhEPpfbeqhuYoRhpk3l3kIyfdKS2q/zJT+lo4SmBmyjBcgHETWEuaNILT8pDOm 92DS2POOI+zBVWAgzefzR0yQ8noSwrrrU6QmkrPrf1gFJ6ENjZXE7JMhGSeAtlk+JlGV JwpFsR3CRsota3bKwJeyyezMbYHteJrE8wYlf+yjlHilszmxoJT+6A75O/rskRodceKX kpj59u3CdyplQw1XFhmIOgIy70PAZUufyYV1hUHw3isyaNf72/1docJ12NMe+F+ZWogk HyQxkDDWkQAQQ05+Jqih8RAQDksEIPYymI9oq0Bwz5joQMvRRXLa1IfFQokTgtaM9hUT 56RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PVV4GkYsyuHdaJSy7pk7tpPEEAOG91TwR6xDd/c0aCM=; b=lDKOM1nj/Xh2hrBv6ySd9jL5vTptdtYVF58ZRGwDhp53v1PXS1gpz3CO2LzOXYc94j P+vh38XZ31hMMuXIbRkZ2mrclw+U4PpaCBqqPymRvTv0InJGEl6G8HYfKzV5ZtMLbBQC bRTs/LY6m6U3Hpm732Qoy3Fr/4OgOzWFmr+mFuUgb1mZxs5AEEHaTCDnt73H5Iqz3o8k 7TkwlVYNJlfZ9Hux8G9knqgfOxmHZdIr3BZqiY0+viZZehqXkomksgNCY7PcaMfyQKVg ksUtDhTw2huFnTEEbR3Sp3Ct7DuFXRmQ+ERQFWNr2Xt2btmMpDv32q9wU6+J/A8eoNMA CYxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si5276391ejd.256.2020.06.23.11.31.57; Tue, 23 Jun 2020 11:32:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387505AbgFWS3V (ORCPT + 99 others); Tue, 23 Jun 2020 14:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733291AbgFWS3T (ORCPT ); Tue, 23 Jun 2020 14:29:19 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C1EFC061573; Tue, 23 Jun 2020 11:29:19 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 7B36E2A3847 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , kernel@collabora.com, Jonas Karlman , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Nicolas Dufresne , Philipp Zabel , Maxime Ripard , Paul Kocialkowski , Ezequiel Garcia Subject: [RFC 5/7] media: uapi: h264: pad v4l2_ctrl_h264_pps to 64-bit Date: Tue, 23 Jun 2020 15:28:07 -0300 Message-Id: <20200623182809.1375-6-ezequiel@collabora.com> X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200623182809.1375-1-ezequiel@collabora.com> References: <20200623182809.1375-1-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The struct does not contain 64-bit types, and therefore doesn't suffer from compatibility issues. However, having it aligned to 64-bits is cleaner and has the advantage of allowing future extensions. Signed-off-by: Ezequiel Garcia --- Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 3 +++ drivers/media/v4l2-core/v4l2-ctrls.c | 5 +++++ include/media/h264-ctrls.h | 1 + 3 files changed, 9 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index e3b5a28fb965..2c682f81aaad 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -1662,6 +1662,9 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - * - __u16 - ``flags`` - See :ref:`Picture Parameter Set Flags ` + * - __u32 + - ``reserved`` + - Applications and drivers must set this to zero. .. _h264_pps_flags: diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index a751c14f9c22..003333b6c7f7 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1735,6 +1735,7 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx, struct v4l2_ctrl_vp8_frame_header *p_vp8_frame_header; struct v4l2_ctrl_h264_slice_params *p_h264_slice_params; struct v4l2_ctrl_h264_decode_params *p_h264_dec_params; + struct v4l2_ctrl_h264_pps *p_h264_pps; struct v4l2_ctrl_hevc_sps *p_hevc_sps; struct v4l2_ctrl_hevc_pps *p_hevc_pps; struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params; @@ -1792,7 +1793,11 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx, break; case V4L2_CTRL_TYPE_H264_SPS: + break; case V4L2_CTRL_TYPE_H264_PPS: + p_h264_pps = p; + zero_reserved(*p_h264_pps); + break; case V4L2_CTRL_TYPE_H264_SCALING_MATRIX: break; case V4L2_CTRL_TYPE_H264_SLICE_PARAMS: diff --git a/include/media/h264-ctrls.h b/include/media/h264-ctrls.h index a938d16b901c..4119dc4486f3 100644 --- a/include/media/h264-ctrls.h +++ b/include/media/h264-ctrls.h @@ -111,6 +111,7 @@ struct v4l2_ctrl_h264_pps { __s8 chroma_qp_index_offset; __s8 second_chroma_qp_index_offset; __u16 flags; + __u32 reserved; }; struct v4l2_ctrl_h264_scaling_matrix { -- 2.26.0.rc2