Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1828583imu; Thu, 24 Jan 2019 02:38:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN6PQUK1GpT/DjSnB+gPL7v1cBYM+mDtDzykFkTBZPwS6BvpMeZIO4f9hUWKCbUWRm4OIWYM X-Received: by 2002:a62:9f1b:: with SMTP id g27mr5760136pfe.87.1548326324380; Thu, 24 Jan 2019 02:38:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548326324; cv=none; d=google.com; s=arc-20160816; b=Dv0cyikLQwsx0ZtZPKqu1tSinvRmhSshL94F3XeZgDI4fqP9vFa/mjqZ8Ot6OH2VRv syYkSFIropwsTrLSdxqco9cJOcif8nPp4vJ63AMCPDU7lfDkY1xLRU5KAS5441/PjSdY okbWYa+6C3HFkiimexO4vncSfsNP0LZuFq7BCCgsAj1a16SyWh7SuXorNYQ7BsZvL3eB Q3zPLDjGtIegA3JMrY1Hhi8K5QLvKm56k4rFzLIiZeaLiNnUOjiWsuomRCI6vKtw7K/s yQGri5MOA+nLHHQd+zgYuHWSJ/79e6y5In2r43YUpmdZP5/8wmW/nZZK0xI78p5nyuPR tKNw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=z4veh7v1oXkb1lhbdqZwPcogKghybSG1g95qfNrBbDk=; b=B6IzeZUs6tLgFhZ7Zf/X//rb41D6m9JW8pdyUxqr2pFxvS0/h9NiHj7Fi8+gejX+TC mCvTw552wDbp7JLOORnpX+4ZrJL/qw/ZwVu+G4znAd0pk6NXZZ39rDygN+m3cS30lQLu 8MzXzE2yXXE6WWwmM1qUp/d1fsxJRzvNIwAId28Ei5dU/5hNQHv9fb4j00lrNdbc5k+k 3NciwZoixs15nZdreRCVFHro+EJVLFyz8gxJrbZVLfVjInJuRo8R/kq/jhShA8dbB04K 1R0XqaEkMWpnBDgLwxD2zIR82nk2mR0QNXuN7pXp/BsMw12U7QBKd4Ec2rPeEDhjJy8E gP6Q== 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 n18si21582958pfj.30.2019.01.24.02.38.29; Thu, 24 Jan 2019 02:38:44 -0800 (PST) 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 S1727287AbfAXKiM (ORCPT + 99 others); Thu, 24 Jan 2019 05:38:12 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:42572 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726034AbfAXKiM (ORCPT ); Thu, 24 Jan 2019 05:38:12 -0500 Received: from [IPv6:2001:420:44c1:2579:b544:2b8b:2897:10d8] ([IPv6:2001:420:44c1:2579:b544:2b8b:2897:10d8]) by smtp-cloud8.xs4all.net with ESMTPA id mcOagWy09NR5ymcOdgpVdx; Thu, 24 Jan 2019 11:38:09 +0100 Subject: Re: [PATCH v3 0/2] Document memory-to-memory video codec interfaces To: Tomasz Figa , linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Pawel Osciak , Alexandre Courbot , Kamil Debski , Andrzej Hajda , Kyungmin Park , Jeongtae Park , Philipp Zabel , =?UTF-8?B?VGlmZmFueSBMaW4gKOael+aFp+ePiik=?= , =?UTF-8?B?QW5kcmV3LUNUIENoZW4gKOmZs+aZuui/qik=?= , Stanimir Varbanov , Todor Tomov , Nicolas Dufresne , Paul Kocialkowski , Laurent Pinchart , dave.stevenson@raspberrypi.org, Ezequiel Garcia , Maxime Jourdan References: <20190124100419.26492-1-tfiga@chromium.org> From: Hans Verkuil Message-ID: Date: Thu, 24 Jan 2019 11:38:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20190124100419.26492-1-tfiga@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfBIwtDEzuf8OKaNsFnb6bUa2L0fP9zIy49MpxShf3hDpeTr2l2USJO/J7VEXAZYIjgd6W1r1Mnxx1gV5U7tqhWa+KF7NBnbCJqMwI+LrqeZAimBNpD1U Y0MdLz95vk3bCOdq8Ko5JDqMKJUnQrJgPOBGc0vKlWjP1bexrzKBv4hFAnlYcdRuBop9EstyCYGp1jFjFYpU3cQjlJlOfFcfh3WYb6Dlt1jYBKK0E9fTdOlz DZnUppJwER5xHc47Ex7PZszUzRp9ITGbE3yXLVqUIQQ5x8qrUQXrHob36/z3qkENhzO//6Kcxuz1Hz3jm5T0A892sSagE4j23aty8m9nHAi41J4iUoOLxZrW immwWmEJVcw90sZJkPx1g0QVj7Z619izaQ0AfJ7qW0FiH9vhNd6NKoziwWA4pLDaT2jmRqDw1gOzj2yn7kDgUPQa5tYVXeNmOjMa1dAmzx1EYY6/1yEft/V5 ZcTUlpqNlehRGSzdvLMhRPoutLy4kH2J2HxFaWlyKy/LhIzA3vCR/Jf7blxhpoPg7z+wi3CIs83M4Yf1F+A6C3U1nsWY3Gh0ja13LUjD77scKkohszINFVpZ A4WX7EymaxG8Wo9TkeJTy/X4UMFmhu8y/6SE4AHcERTljVdLHZDzWzVhU/s8HMWpuh2RDPgWaK8Y3hawxid2xAtcN6bRXEE7aQ3XwJsg00ff1BDZOYqWNTx7 mLpf7TVzjnkvjzLBj9eAF0j4goYUmg5guR1hcJFyfA7PwLskr5FGVl5cpNckOGLXFaqsUIltMfRZ48t9VrFEWJbqrWtyWONrN5+/L9OAS9OlJKH1gKtWCCcC OLUw13i6b8EjxJuCK4//Iiu82iM44MP97/vL34GS20OfXEa5mIVN0P981toH3GB2a+CnAwy0rVcsJLpbnnvXa+tJ/0ERrWQrMKawkA+8dRqHUzNifjYL/G2G VcAUYxVEa+ChtE+olHZopcCEKBy/IwXcDHzBvwmHCFrjYGtwC10ohaRB/+HlK1uO3Y0R7w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/24/19 11:04, Tomasz Figa wrote: > Late happy new year everyone. It's been a while, but here is the v3 of > the stateful mem2mem codec interfaces documentation. Sorry for taking so > long time to respin. (Again.) > > This series attempts to add the documentation of what was discussed > during Media Workshops at LinuxCon Europe 2012 in Barcelona and then > later Embedded Linux Conference Europe 2014 in Düsseldorf and then > eventually written down by Pawel Osciak and tweaked a bit by Chrome OS > video team (but mostly in a cosmetic way or making the document more > precise), during the several years of Chrome OS using the APIs in > production. > > Note that most, if not all, of the API is already implemented in > existing mainline drivers, such as s5p-mfc or mtk-vcodec. Intention of > this series is just to formalize what we already have. > > Thanks everyone for the huge amount of useful comments for the RFC and > v1. Much of the credits should go to Pawel Osciak too, for writing most > of the original text of the initial RFC. Thank you very much for this v3. I've updated the spec with this v3 + Alexandre's v2 incorporated here: https://hverkuil.home.xs4all.nl/codec-api/uapi/v4l/dev-mem2mem.html I plan to review this as soon as I can because I really would like to get this merged for 5.1. Regards, Hans > > Changes since v2: > (https://lore.kernel.org/patchwork/cover/1002474/) > Decoder: > - Specified that the initial source change event is signaled > regardless of whether the client-set format matches the > stream format. > - Dropped V4L2_CID_MIN_BUFFERS_FOR_OUTPUT since it's meaningless > for the bitstream input buffers of decoders. > - Explicitly stated that VIDIOC_REQBUFS is not allowed on CAPTURE > if the stream information is not available. > - Described decode error handling. > - Mentioned that timestamps can be observed after a seek to > determine whether the CAPTURE buffers originated from before > or after the seek. > - Explicitly stated that after a pair of V4L2_DEC_CMD_STOP and > V4L2_DEC_CMD_START, the decoder is not reset and preserves > all the state. > > Encoder: > - Specified that width and height of CAPTURE format are ignored > and always zero. > - Explicitly noted the common use case for the CROP target with > macroblock-unaligned video resolutions. > - Added a reference to Request API. > - Dropped V4L2_CID_MIN_BUFFERS_FOR_CAPTURE since it's meaningless > for the bitstream output buffers of encoders. > - Explicitly stated that after a pair of V4L2_ENC_CMD_STOP and > V4L2_ENC_CMD_START, the encoder is not reset and preserves > all the state. > > General: > - Dropped format enumeration from "Initialization", since it's already > a part of "Querying capabilities". > - Many spelling, grammar, stylistic, etc. changes. > - Changed the style of note blocks. > - Rebased onto Hans' documentation cleanup series. > (https://patchwork.kernel.org/cover/10775407/ > https://patchwork.kernel.org/patch/10776737/) > - Moved the interfaces under the "Video Memory-To-Memory Interface" > section. > > For changes since v1 see the v2: > https://lore.kernel.org/patchwork/cover/1002474/ > > For changes since RFC see the v1: > https://patchwork.kernel.org/cover/10542207/ > > Tomasz Figa (2): > media: docs-rst: Document memory-to-memory video decoder interface > media: docs-rst: Document memory-to-memory video encoder interface > > Documentation/media/uapi/v4l/dev-decoder.rst | 1076 +++++++++++++++++ > Documentation/media/uapi/v4l/dev-encoder.rst | 586 +++++++++ > Documentation/media/uapi/v4l/dev-mem2mem.rst | 6 + > Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 10 + > Documentation/media/uapi/v4l/v4l2.rst | 12 +- > .../media/uapi/v4l/vidioc-decoder-cmd.rst | 40 +- > .../media/uapi/v4l/vidioc-encoder-cmd.rst | 38 +- > Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 14 + > 8 files changed, 1752 insertions(+), 30 deletions(-) > create mode 100644 Documentation/media/uapi/v4l/dev-decoder.rst > create mode 100644 Documentation/media/uapi/v4l/dev-encoder.rst >