Received: by 10.192.165.148 with SMTP id m20csp504554imm; Fri, 4 May 2018 01:27:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrKSYSWPfqh+4NhvhyKURW8AL1nw1LLeP9vBoPdXHF5ec/6Bprg96nTnJZ+18cgAD9E86m9 X-Received: by 10.98.222.2 with SMTP id h2mr24119225pfg.205.1525422429133; Fri, 04 May 2018 01:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525422429; cv=none; d=google.com; s=arc-20160816; b=k4Xy9hMGrlWcLsOsBYLmhhwAW+vgLpldAWqAC0Y9mPF/X+SQj5Nno0GB8XdLdpw01C 8B9xbdOulV9+XwYD/gcFzsLe8gL0cMMNLSIX84k5rJOwEPbKnJP3qhYs2qRHh2WN2ZT/ jdVUOr2ymX5orcGJBb6aKu5gtXB01WkV1KxZPytWwcKu/avSERIKgBcslfcmasx7qbLJ rxXZY82W0/BiX1PtZq/3jCzvnuLN0aVq/NgcwlZuwHXsQQQFPdJRrtuFHO0doa904fYj YfIZO6P8xV733u4V9Ypqcgm7BvfsUSfxOlw0SqrFsvdw3BCx3T9zowOXiZUYo/iGbRIl 5LRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=Dj2QWb0EBmFK0vD0jVBkZCPjClzH5ahwKNtO4RkV/6I=; b=ScecCPDrT8H1LsqPaMq/xTbd6CcKs34Xr2yLnSqeuQgb1rv6lrOIZtUcbpYoDTkAjm B7ohGTn2aT5tyKkgfaU4KB3AE+UP4CzDvFyGsqZ4bFBFnc9XJ52ghaQW8fg7OAuqQcXu GSscgwjeqwNq60rbKsCpqRp+ZYknHopdZ1KDxbNzzvcBrW77N0w+YYXepcNF4PVzNRle dz7FelmqPi/3gGWKUUqP9W5GbJ8jZF78lfzIFX1DrDPzIguJ4ySksQmSJ2FttcKIfxts v2rBheOltSCSQV+hhjapfjSGXDeoufXJ2IVD0rltu4SmUO+eLiKEfheVD2cv5p2qbjZy PIlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v29-v6si13525536pgo.483.2018.05.04.01.26.54; Fri, 04 May 2018 01:27:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751741AbeEDIZg (ORCPT + 99 others); Fri, 4 May 2018 04:25:36 -0400 Received: from mail.bootlin.com ([62.4.15.54]:51967 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751172AbeEDIZf (ORCPT ); Fri, 4 May 2018 04:25:35 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id D7BBC207FF; Fri, 4 May 2018 10:25:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from aptenodytes (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 69C2C2072F; Fri, 4 May 2018 10:25:22 +0200 (CEST) Message-ID: <1e27232735a0375f78f819c5f6b201aec475b1cd.camel@bootlin.com> Subject: Re: [PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata From: Paul Kocialkowski To: Tomasz Figa Cc: Linux Media Mailing List , devicetree@vger.kernel.org, "list@263.net:IOMMU DRIVERS , Joerg " "Roedel ," , Linux Kernel Mailing List , linux-sunxi@googlegroups.com, Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Maxime Ripard , wens@csie.org, Pawel Osciak , Marek Szyprowski , Kyungmin Park , Hans Verkuil , Sakari Ailus , Philipp Zabel , Arnd Bergmann , Alexandre Courbot Date: Fri, 04 May 2018 10:24:03 +0200 In-Reply-To: References: <20180419154124.17512-1-paul.kocialkowski@bootlin.com> <20180419154536.17846-1-paul.kocialkowski@bootlin.com> Organization: Bootlin Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-U4fIwvrA8kmLG9u793QO" X-Mailer: Evolution 3.28.1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-U4fIwvrA8kmLG9u793QO Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Fri, 2018-04-20 at 09:51 +0000, Tomasz Figa wrote: > Hi Paul, >=20 > On Fri, Apr 20, 2018 at 12:46 AM Paul Kocialkowski < > paul.kocialkowski@bootlin.com> wrote: > [snip] > > +struct v4l2_ctrl_mpeg2_frame_hdr { > > + __u32 slice_len; > > + __u32 slice_pos; > > + enum { MPEG1, MPEG2 } type; >=20 > Is enum suitable for UAPI? As it turns out, it's not :) > > + > > + __u16 width; > > + __u16 height; > > + > > + enum { PCT_I =3D 1, PCT_P, PCT_B, PCT_D } picture_coding_type; >=20 > Ditto. >=20 > > + __u8 f_code[2][2]; > > + > > + __u8 intra_dc_precision; > > + __u8 picture_structure; > > + __u8 top_field_first; > > + __u8 frame_pred_frame_dct; > > + __u8 concealment_motion_vectors; > > + __u8 q_scale_type; > > + __u8 intra_vlc_format; > > + __u8 alternate_scan; > > + > > + __u8 backward_ref_index; > > + __u8 forward_ref_index; > > +}; > > + > > #endif > > diff --git a/include/uapi/linux/videodev2.h >=20 > b/include/uapi/linux/videodev2.h > > index 31b5728b56e9..4b8336f7bcf0 100644 > > --- a/include/uapi/linux/videodev2.h > > +++ b/include/uapi/linux/videodev2.h > > @@ -635,6 +635,7 @@ struct v4l2_pix_format { > > #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') > > /* >=20 > SMPTE 421M Annex L compliant stream */ > > #define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* > > VP8 */ > > #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* > > VP9 */ > > +#define V4L2_PIX_FMT_MPEG2_FRAME v4l2_fourcc('M', 'G', '2', 'F') /* >=20 > MPEG2 frame */ >=20 > > /* Vendor-specific formats */ > > #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* > > cpia1 >=20 > YUV */ > > @@ -1586,6 +1587,7 @@ struct v4l2_ext_control { > > __u8 __user *p_u8; > > __u16 __user *p_u16; > > __u32 __user *p_u32; > > + struct v4l2_ctrl_mpeg2_frame_hdr __user >=20 > *p_mpeg2_frame_hdr; > > void __user *ptr; > > }; > > } __attribute__ ((packed)); > > @@ -1631,6 +1633,7 @@ enum v4l2_ctrl_type { > > V4L2_CTRL_TYPE_U8 =3D 0x0100, > > V4L2_CTRL_TYPE_U16 =3D 0x0101, > > V4L2_CTRL_TYPE_U32 =3D 0x0102, > > + V4L2_CTRL_TYPE_MPEG2_FRAME_HDR =3D 0x0109, >=20 > Why 0x0109? Good catch. I see no reason in particular, so I'll probably make it 0x0103 eventually. Cheers and thanks for the review! --=20 Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com --=-U4fIwvrA8kmLG9u793QO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAlrsGKMACgkQ3cLmz3+f v9Ggywf/buPoS1xRGzfgUMg0fQjA7nsPaat8ZmQFCQgezckDxvntqmMLn4fREdg2 AwEwsulx3K6j96CFfHN4kJSovAd2vcQ6hZf9tP7T006o60ltjwbhjNhOqI9zhLKB EsJH/hEXkice1QA7LKYwor18ydoa8XD+jwM1/mOlerFFGyJHIMvDbFCTaD6JPffX dcEo7S7fpoOBE0Bj6FlD6PtynHWVQcxJGdpPptCOrHAGot1LP+DJqu7xU93IvzwZ dgEzpf5ZXY0U8zL0vyuyL4PmAEYyRnsUFosLNkhopVP/Ih/Ftz8gq3d21p8mMfxo sVw4XL7FSN7tgafIe/mUrW1UfWH0og== =9H7Z -----END PGP SIGNATURE----- --=-U4fIwvrA8kmLG9u793QO--