From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4302CC4360F for ; Thu, 4 Apr 2019 13:02:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12C7F20855 for ; Thu, 4 Apr 2019 13:02:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GAoFWkih"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FPK+hTHm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12C7F20855 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=arf4ymG6Lq8bbeiZCr4XQz1A5fHwwaoSLl8il/87SJM=; b=GAoFWkihFOSmew VGTeR3VqC3QhMf886elOs67F+DPjLQoxK+oMYfzuKsCKbVCXlCVxPQ2ipPdRHJg1YMlGjQbyeKPQO Z3dHBugEXUHiiB7VvxpsekvP4mg9EatzVDJo9+B+6GYEWd1BsFhahkjFSAEw2OR1j/TohHOIDbJZx Q0AwmnDtydfFwqPjZPC3rD6hLjiqzmRWwzAY80U70IZqdBC58jH7kEEwujR8pYSUUN20IGgwCfZdS O9ka/HDJFI49Gxu9mLKs6vY/5ixpVy9C6/zEfwr636DviaAT0J1KjzisUqqgw8TkO24oCjZ7NlraP 5pMK7UiqtkcyLMYoVD0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC20s-0004pe-Fh; Thu, 04 Apr 2019 13:02:38 +0000 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC20m-0004eu-SA for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 13:02:36 +0000 Received: by mail-ot1-x342.google.com with SMTP id d24so2198817otl.11 for ; Thu, 04 Apr 2019 06:02:32 -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=NnoQXOk98mUw/zU+LHAe8k8yy8pprlhhfEKmVQVVBjo=; b=FPK+hTHmgyZYalgoT9WI9CBxCJQY5Ja9ggM8B/WRJVVqJBb8BdFZJxJLCLsZsFuxrU D7gkiuLpVMaaA7fVjG2Z2WWQMITm+x4L93ICOFO5aukSiV5sUmxerlfOc4c7usbbSXDs Ae3tGTf9qaaZsk2xRupqXuXb9pKcJIkQBey7Q= 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=NnoQXOk98mUw/zU+LHAe8k8yy8pprlhhfEKmVQVVBjo=; b=E6XrGXNmKuakbITaV5VBHagFd63j+WZs0OkQGPPIvDrhbpydPWGfLwugK3S2I8KSiY 3J0JVY6AmM3TMdepZxTeNrI5NinD1tEvhCCACwZ6aHLlHrCOxRzLIdVXyHZJVZe68Iqn Apd8/qsXqSlLAScvy8l+H4LpQr+zSIfO2QmgTrBRQ2Z+M95aAN0q3lXjGnZlwrNErJl2 +7B9Vap7WUPQT2pUT1wesWrSqOc6jGiaGwk7V1X79IOazbh+pENsC42dAuV7B3GLStPg SxGntTJSZxVmCB6ljWCTFuBgQpeiJJGJwfBuTJEJA6abr754DnY5BxMnH63vZp+7x7H6 WBEg== X-Gm-Message-State: APjAAAU6bJmXwC4mlM7s/M3ukdIQiaFV4vV59wM6Coiq/sDTkZM3H5rO Jc3AMtOijGMFWzOZlAD5wPSjL9MVKlA= X-Google-Smtp-Source: APXvYqw53jJGJBZBEHwOMfOaJLUZReVfxk5HIdowmOKlTX9I1TW0mQtMF/AbApXW3cxHW8WKUvRhmQ== X-Received: by 2002:a9d:7455:: with SMTP id p21mr3971733otk.180.1554382951111; Thu, 04 Apr 2019 06:02:31 -0700 (PDT) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com. [209.85.210.53]) by smtp.gmail.com with ESMTPSA id w131sm7576811oig.29.2019.04.04.06.02.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 06:02:30 -0700 (PDT) Received: by mail-ot1-f53.google.com with SMTP id f10so2230565otb.6 for ; Thu, 04 Apr 2019 06:02:30 -0700 (PDT) X-Received: by 2002:a9d:7749:: with SMTP id t9mr3886832otl.229.1554382482715; Thu, 04 Apr 2019 05:54:42 -0700 (PDT) MIME-Version: 1.0 References: <7cd913545cfc80fa9999839c62c4bf7b354a7904.1554380738.git-series.maxime.ripard@bootlin.com> In-Reply-To: <7cd913545cfc80fa9999839c62c4bf7b354a7904.1554380738.git-series.maxime.ripard@bootlin.com> From: Tomasz Figa Date: Thu, 4 Apr 2019 21:54:30 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RESEND v7 1/2] media: uapi: Add H264 low-level decoder API compound controls. To: Maxime Ripard , Hans Verkuil , Alexandre Courbot X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_060232_920397_031D29CA X-CRM114-Status: GOOD ( 24.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "list@263.net:IOMMU DRIVERS , Joerg Roedel , " , Thomas Petazzoni , Jonas Karlman , jenskuske@gmail.com, linux-sunxi@googlegroups.com, Linux Kernel Mailing List , Jernej Skrabec , Paul Kocialkowski , Chen-Yu Tsai , Laurent Pinchart , Sakari Ailus , Guenter Roeck , Nicolas Dufresne , Ezequiel Garcia , Pawel Osciak , Linux Media Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Thu, Apr 4, 2019 at 9:26 PM Maxime Ripard wrote: > > From: Pawel Osciak > > Stateless video codecs will require both the H264 metadata and slices in > order to be able to decode frames. > > This introduces the definitions for a new pixel format for H264 slices that > have been parsed, as well as the structures used to pass the metadata from > the userspace to the kernel. > > Reviewed-by: Tomasz Figa > Signed-off-by: Pawel Osciak > Signed-off-by: Guenter Roeck > Co-developed-by: Maxime Ripard > Signed-off-by: Maxime Ripard > --- > Documentation/media/uapi/v4l/biblio.rst | 9 +- > Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 569 ++++++++++++++- > Documentation/media/uapi/v4l/pixfmt-compressed.rst | 19 +- > Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 30 +- > Documentation/media/videodev2.h.rst.exceptions | 5 +- > drivers/media/v4l2-core/v4l2-ctrls.c | 42 +- > drivers/media/v4l2-core/v4l2-ioctl.c | 1 +- > include/media/h264-ctrls.h | 192 +++++- > include/media/v4l2-ctrls.h | 13 +- > include/uapi/linux/videodev2.h | 1 +- > 10 files changed, 880 insertions(+), 1 deletion(-) > create mode 100644 include/media/h264-ctrls.h > > diff --git a/Documentation/media/uapi/v4l/biblio.rst b/Documentation/media/uapi/v4l/biblio.rst > index ec33768c055e..8f4eb8823d82 100644 > --- a/Documentation/media/uapi/v4l/biblio.rst > +++ b/Documentation/media/uapi/v4l/biblio.rst > @@ -122,6 +122,15 @@ ITU BT.1119 > > :author: International Telecommunication Union (http://www.itu.ch) > > +.. _h264: > + > +ITU-T Rec. H.264 Specification (04/2017 Edition) > +================================================ > + > +:title: ITU-T Recommendation H.264 "Advanced Video Coding for Generic Audiovisual Services" > + > +:author: International Telecommunication Union (http://www.itu.ch) > + > .. _jfif: > > JFIF > diff --git a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst > index 67a122339c0e..1285bfec7d3d 100644 > --- a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst > +++ b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst > @@ -1371,6 +1371,575 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - > - Layer number > > > +.. _v4l2-mpeg-h264: > + > +``V4L2_CID_MPEG_VIDEO_H264_SPS (struct)`` > + Specifies the sequence parameter set (as extracted from the > + bitstream) for the associated H264 slice data. This includes the > + necessary parameters for configuring a stateless hardware decoding > + pipeline for H264. The bitstream parameters are defined according > + to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data > + Semantics". For further documentation, refer to the above > + specification, unless there is an explicit comment stating > + otherwise. > + > + .. note:: > + > + This compound control is not yet part of the public kernel API and > + it is expected to change. > + > +.. c:type:: v4l2_ctrl_h264_sps > + > +.. cssclass:: longtable > + > +.. flat-table:: struct v4l2_ctrl_h264_sps > + :header-rows: 0 > + :stub-columns: 0 > + :widths: 1 1 2 > + > + * - __u8 > + - ``profile_idc`` > + - > + * - __u8 > + - ``constraint_set_flags`` > + - See :ref:`Sequence Parameter Set Constraints Set Flags ` > + * - __u8 > + - ``level_idc`` > + - > + * - __u8 > + - ``seq_parameter_set_id`` > + - > + * - __u8 > + - ``chroma_format_idc`` > + - > + * - __u8 > + - ``bit_depth_luma_minus8`` > + - > + * - __u8 > + - ``bit_depth_chroma_minus8`` > + - > + * - __u8 > + - ``log2_max_frame_num_minus4`` > + - > + * - __u8 > + - ``pic_order_cnt_type`` > + - > + * - __u8 > + - ``log2_max_pic_order_cnt_lsb_minus4`` > + - > + * - __u8 > + - ``max_num_ref_frames`` > + - > + * - __u8 > + - ``num_ref_frames_in_pic_order_cnt_cycle`` > + - > + * - __s32 > + - ``offset_for_ref_frame[255]`` > + - > + * - __s32 > + - ``offset_for_non_ref_pic`` > + - > + * - __s32 > + - ``offset_for_top_to_bottom_field`` > + - > + * - __u16 > + - ``pic_width_in_mbs_minus1`` > + - > + * - __u16 > + - ``pic_height_in_map_units_minus1`` > + - We recently had some reflection with Alex that this is redundant with the width and height in the OUTPUT format. It may also apply to some other fields in these structs. I feel like they should be removed and passed via corresponding generic V4L2 properties - format, selection, etc. The same problem is also present in the MPEG2 controls. In fact, there was a patch already which used some fields from the controls to calculate the destination buffer strides, rather than bytesperline in the format. Since we're in staging, it could be done with a follow-up patch, though. Best regards, Tomasz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel