Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3874798imm; Mon, 20 Aug 2018 06:15:38 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwseTFiUcfaWSQhUIJp1Ux4YzTaoUQJhOWq3u1pL2uBRWmLxzHRtIUj+fcQb8ea/7U6KaYn X-Received: by 2002:a62:429c:: with SMTP id h28-v6mr23421994pfd.51.1534770938440; Mon, 20 Aug 2018 06:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534770938; cv=none; d=google.com; s=arc-20160816; b=nDxdCGiiE7oUwOr05JmydeqIQ65oQs1P2UXWeXxh0qwj///grtDgyjVms/BU4zB/QX 1iDwDLH4x0Qiy0JKyR2sgWdk6gkOBZn/BSAqmJOtrzsXyPalqy/AmXba/apIwKX0UQ3+ Mk9Fx7/q7tb+tkeJKVxkJzEqxmdWl7nU2gzHwKIUG+ejibNvTBCMF5xeZZS0Dg2YjJMP sCA/MvZCtTRMM+Tr/20AltN9/J2eLT8nrYNNrQkjd43jv7bssXr0zBdIGc0MuseHzsuG EmVLEKCisbIuujTqwSvdA5URN5Zj/jWs34DCLMB4g4gC8H0gRpm9xQp1v03vVMcTkG8D Zt6A== 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=CU3EIhKFe+YSOlxOco3MBEuI637t5pi9B1bUe4+o5t8=; b=BaK29NeF9UexPJMEJidVtQqL2t0dZw4SHE63H1UH3SLEY2TqaQkWWPuhWXrWya7XeD S5vxhTUixJQHPZfOtLKsKENUXcnDkxNqJBO406XYf/g7KupUNgODWprCEIdBlYRa5EW9 7rFrjBIZxXTP6r+tHBNTQHFkQ7v91X7rpJU2I1uTNccJNjS683Fkweh35V7MQgluuBrz bShhwx9PyMtXEHnLSwsNLWgETem4iG36R0Lxm8JSyUI7v+iVibsuY6gAaRItTy27zd9f It+PH3qvBstb4b1k5yy5FoNIDoP1LSob9VV2YoVEsWoqHJuVZP37lmlazC+iAnZ9n+k7 eJPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iRo68ZCO; 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 n15-v6si9864021pgc.309.2018.08.20.06.15.22; Mon, 20 Aug 2018 06:15:38 -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=iRo68ZCO; 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 S1727255AbeHTQ21 (ORCPT + 99 others); Mon, 20 Aug 2018 12:28:27 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:35926 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727215AbeHTQ21 (ORCPT ); Mon, 20 Aug 2018 12:28:27 -0400 Received: by mail-yw1-f66.google.com with SMTP id w202-v6so693168yww.3 for ; Mon, 20 Aug 2018 06:12:51 -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=CU3EIhKFe+YSOlxOco3MBEuI637t5pi9B1bUe4+o5t8=; b=iRo68ZCO7WnyWq4tcnAE4TRkorr4AB2zmAum/AgOFjx7TX8a5eHWWB6BVOCL5Q6pFm 0Q8BRh+AQ7C/ZLLap0vYPSHTYHrgh7zAUWSx5hd2VPg8dWVmAozdo5DqzyMJsNuo/3D3 2JZgFt4EYm6tRUjXOhHnvopbMNzv9e7+p3KOk= 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=CU3EIhKFe+YSOlxOco3MBEuI637t5pi9B1bUe4+o5t8=; b=EsmGRUBl6FfXzlXs8B/PZLkOGRoaZJT0o+I8sgjm9eJ432P3fZzUCn3RMRVpDD9ruQ cpL7y6M+iDZ0cYI83nopX6Mnb036SQ0Z6x07QZFGWrAZ2Qz6DeVJ7IfBYMPKHGWZbT9c s0hhdYqjmBR+kRlVBIcNBHWphjlhJJd+7RoZao6+GDHdDLhok9qtv2df8Cnoa9LdghSt WQJho47N25rBw21bpAYnft2XEayb3LHu2eqx4mvO/nYhuN10dUmF3Ykm+fhrc1OK3oru nF38sRELFk+geirw9QAAPqfCogchZqyGoGn5xCQC/CNuEbjKKGlrVUlZMWB/ZItOELCx uNJQ== X-Gm-Message-State: AOUpUlHCuWT6KnOmrvtA8FeMWBpHsI3zMZSIM64h3zmAg8j8XKwYS+YB Oj3HUA4o08HokcnFQ5c+gMqLIEYgfNNuow== X-Received: by 2002:a0d:c203:: with SMTP id e3-v6mr25681777ywd.103.1534770770537; Mon, 20 Aug 2018 06:12:50 -0700 (PDT) Received: from mail-yb0-f178.google.com (mail-yb0-f178.google.com. [209.85.213.178]) by smtp.gmail.com with ESMTPSA id n187-v6sm6008391ywn.76.2018.08.20.06.12.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Aug 2018 06:12:48 -0700 (PDT) Received: by mail-yb0-f178.google.com with SMTP id d4-v6so617963ybl.0 for ; Mon, 20 Aug 2018 06:12:48 -0700 (PDT) X-Received: by 2002:a5b:78f:: with SMTP id b15-v6mr23776465ybq.114.1534770767517; Mon, 20 Aug 2018 06:12:47 -0700 (PDT) MIME-Version: 1.0 References: <20180724140621.59624-1-tfiga@chromium.org> <20180724140621.59624-2-tfiga@chromium.org> <1534770242.5445.13.camel@pengutronix.de> In-Reply-To: <1534770242.5445.13.camel@pengutronix.de> From: Tomasz Figa Date: Mon, 20 Aug 2018 22:12:35 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] media: docs-rst: Document memory-to-memory video decoder interface To: Philipp Zabel Cc: Linux Media Mailing List , Linux Kernel Mailing List , Stanimir Varbanov , Mauro Carvalho Chehab , Hans Verkuil , Pawel Osciak , Alexandre Courbot , kamil@wypas.org, a.hajda@samsung.com, Kyungmin Park , jtp.park@samsung.com, =?UTF-8?B?VGlmZmFueSBMaW4gKOael+aFp+ePiik=?= , =?UTF-8?B?QW5kcmV3LUNUIENoZW4gKOmZs+aZuui/qik=?= , todor.tomov@linaro.org, nicolas@ndufresne.ca, Paul Kocialkowski , Laurent Pinchart , dave.stevenson@raspberrypi.org, Ezequiel Garcia 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 On Mon, Aug 20, 2018 at 10:04 PM Philipp Zabel wrote: > > On Tue, 2018-07-24 at 23:06 +0900, Tomasz Figa wrote: > [...] > > +Seek > > +==== > > + > > +Seek is controlled by the ``OUTPUT`` queue, as it is the source of > > +bitstream data. ``CAPTURE`` queue remains unchanged/unaffected. > > + > > +1. Stop the ``OUTPUT`` queue to begin the seek sequence via > > + :c:func:`VIDIOC_STREAMOFF`. > > + > > + * **Required fields:** > > + > > + ``type`` > > + a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT`` > > + > > + * The driver must drop all the pending ``OUTPUT`` buffers and they are > > + treated as returned to the client (following standard semantics). > > + > > +2. Restart the ``OUTPUT`` queue via :c:func:`VIDIOC_STREAMON` > > + > > + * **Required fields:** > > + > > + ``type`` > > + a ``V4L2_BUF_TYPE_*`` enum appropriate for ``OUTPUT`` > > + > > + * The driver must be put in a state after seek and be ready to > > + accept new source bitstream buffers. > > + > > +3. Start queuing buffers to ``OUTPUT`` queue containing stream data after > > + the seek until a suitable resume point is found. > > + > > + .. note:: > > + > > + There is no requirement to begin queuing stream starting exactly from > > + a resume point (e.g. SPS or a keyframe). The driver must handle any > > + data queued and must keep processing the queued buffers until it > > + finds a suitable resume point. While looking for a resume point, the > > I think the definition of a resume point is too vague in this place. > Can the driver decide whether or not a keyframe without SPS is a > suitable resume point? Or do drivers have to parse and store SPS/PPS if > the hardware does not support resuming from a keyframe without sending > SPS/PPS again? The thing is that existing drivers implement and user space clients rely on the behavior described above, so we cannot really change it anymore. Do we have hardware for which this wouldn't work to the point that the driver couldn't even continue with a bunch of frames corrupted? If only frame corruption is a problem, we can add a control to tell the user space to seek to resume points and it can happen in an incremental patch. Best regards, Tomasz