Received: by 10.192.165.148 with SMTP id m20csp52008imm; Fri, 20 Apr 2018 02:53:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+zkAOLbWDweUrxzqFdRqVbItw+MIVFdBqFtxJe2YeBW0fGF1KSpDnouBdZnq6rzwDXoDtG X-Received: by 2002:a17:902:7290:: with SMTP id d16-v6mr9561698pll.43.1524218012059; Fri, 20 Apr 2018 02:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524218012; cv=none; d=google.com; s=arc-20160816; b=RTx2EszzIpVxPCA6RVKTL0rz9dn4HJYeN7Aq1l8H73/cYxorIcRAjZKrmhU8O8RjCk 8f7IIHUG0tac9NwRsbfR35TyB/PKIDEdSnqmIBcKXGaaiVBEd5bgU4ubpQge9Vpm/O+g lBlGphqwFIUW24rGqju15nCkgqIqDtp4X574AeSCzU/VFO9PNgnnYgYde/sW+VDUpLmz ltEAx4X9ryheAWvG8tLSe0o71n4iUxOUtiaPZTN9e53fQl8QVRZl0M1kY8yoob87GzYs knzKzrWPHX4UDtTWw6Y/oR7L56S6wS+/M1JyZ0+nLS9zD+RJd8KOEoctGDFVj/ONTF4+ 6XPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=WmCHNTJgWNqlrvHTZYVlGdoYs9g1f1nIDfeRhmn+big=; b=F1ZoQ1CMBVW/TBzflmAw5Q4CjTfx0dzOh42gh8BbwDQUz63N1+o4Wf62QolaV0Y2bf Q/7dKICeHMKJ7gKpDy4FdltH/6+xyMez5dFidhpVjV5Jmx+m/DarS79DpRwkRAb05F9G tMTzh5QuEvQumcAHofyr7jPt45JUBIUvj3JuvERoaiYcNYLmpyEYcc7M6t6JFwVuTKxS Myc4ZQjBLqL6t7xOakwLf4NLi4fAw89UgMWnga2t1VCkrfSgCNQnTXPp0rSHFE3b+O2J j9b7ErGt0P/7smHBqlzodPRkeciyynQ905d3aEHXXFLt6uwBUROW7vpxS41CIQW3ddH/ EZZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WiWTKBBF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si4873002pgn.17.2018.04.20.02.53.17; Fri, 20 Apr 2018 02:53:32 -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; dkim=pass header.i=@chromium.org header.s=google header.b=WiWTKBBF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754459AbeDTJwF (ORCPT + 99 others); Fri, 20 Apr 2018 05:52:05 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:44439 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754263AbeDTJwD (ORCPT ); Fri, 20 Apr 2018 05:52:03 -0400 Received: by mail-vk0-f65.google.com with SMTP id r184so4898832vke.11 for ; Fri, 20 Apr 2018 02:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WmCHNTJgWNqlrvHTZYVlGdoYs9g1f1nIDfeRhmn+big=; b=WiWTKBBFadcd+3utkps71yw3SDDY3f3WOwXkLN0MXaLKnFsxezvIn3sBVpJLUju4o5 NqefpdPMzM1c4NMbxHBWjWmV3vJnz1Uj/m/Y1K8F143CaInrTbcuKQud/wgEZR3vWCMH 0CU+g/BWVsDMJl9np/jCpogiR5+Nfm/9EIGqo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WmCHNTJgWNqlrvHTZYVlGdoYs9g1f1nIDfeRhmn+big=; b=faGDLZFn8DAVaTU2pOToKxZKTOkKhNmhoriBiMtU7wSBlVAUAwEIGZiA2GI35WdDjD RdbSCPrwTe1yDvDtnPX1b4TE5wqOJ2hctsnDwyujJ/JIBoBLICr7XdVMSRvrJ+dH897q jFx1QvUPM05Ebu2K65cD8ZeJcX82zlagrEaeIMQJ2kNWorz+EVFSkuXbmeEyh34UhnWe 9dMdUj6QKJ9a4RjZUbp4KkgRoqdY6KWYeST6BgHB+kXoAGEUpsMMQ1v1QXg8zcmLEInC UX6q4DPti9YTbWChYXCHScrfOy6O10LPRqOGU3A1OYJoD1igh9RjMDO9oSaAAZ2PB+Vb SeXw== X-Gm-Message-State: ALQs6tBoL/7Yd1AS6yjC0S5s3p3YOrf1QuldoTQhnOEUhPhHAwMLl9QD o87bELnPePwk5t01MLZqrjZxffbONGs= X-Received: by 10.31.56.71 with SMTP id f68mr6251932vka.108.1524217922974; Fri, 20 Apr 2018 02:52:02 -0700 (PDT) Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com. [209.85.213.50]) by smtp.gmail.com with ESMTPSA id j33sm1760373uaj.36.2018.04.20.02.52.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 02:52:01 -0700 (PDT) Received: by mail-vk0-f50.google.com with SMTP id g83so2025970vkc.6 for ; Fri, 20 Apr 2018 02:52:00 -0700 (PDT) X-Received: by 10.31.151.215 with SMTP id z206mr5758578vkd.183.1524217920047; Fri, 20 Apr 2018 02:52:00 -0700 (PDT) MIME-Version: 1.0 References: <20180419154124.17512-1-paul.kocialkowski@bootlin.com> <20180419154536.17846-1-paul.kocialkowski@bootlin.com> In-Reply-To: <20180419154536.17846-1-paul.kocialkowski@bootlin.com> From: Tomasz Figa Date: Fri, 20 Apr 2018 09:51:49 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata To: Paul Kocialkowski 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, 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; Is enum suitable for UAPI? > + > + __u16 width; > + __u16 height; > + > + enum { PCT_I = 1, PCT_P, PCT_B, PCT_D } picture_coding_type; Ditto. > + __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 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') /* 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') /* MPEG2 frame */ > /* Vendor-specific formats */ > #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 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 *p_mpeg2_frame_hdr; > void __user *ptr; > }; > } __attribute__ ((packed)); > @@ -1631,6 +1633,7 @@ enum v4l2_ctrl_type { > V4L2_CTRL_TYPE_U8 = 0x0100, > V4L2_CTRL_TYPE_U16 = 0x0101, > V4L2_CTRL_TYPE_U32 = 0x0102, > + V4L2_CTRL_TYPE_MPEG2_FRAME_HDR = 0x0109, Why 0x0109? Best regards, Tomasz