Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1757753imu; Thu, 24 Jan 2019 01:07:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN71wK6Z8qTciodwTzAbB9xyPLXtknf8HjBGZIbXd68pN2HaCQNvP1bhBRQ0U5S0LNHOPvBb X-Received: by 2002:a63:1a4b:: with SMTP id a11mr5209931pgm.254.1548320857067; Thu, 24 Jan 2019 01:07:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548320857; cv=none; d=google.com; s=arc-20160816; b=zNbZ7tbKhjMHGZ9lau9EtY914vTItrzt2fZkksBOc4x2l53ze9wC8wgO4+3YT1sR/W xjRa3J6rv1w6ai+BoI05lO2R1k3iOfKxgYpcuVKCS2E8ueW+A/Jg+WtMVkiMTyPk7Iqb Fxz06jRTXdjnBb1y5niLy5pc+nMVVQfktsDbr54DTDzuBj2k6JcIfJNO21b1Go0xRfa9 kHm53umbOxffIlPp3ibYXdPsVqDGZgLwgMNnXegdTP91nFQB5t1xPils2Ch6dvIhmzI4 rO0fdKRlRlALmjqIIm0jRq1Nt/1Zwm/zs3BqEO1bXOn8rBisTjfM+fCEY4VsnOJlGUKT ZRCA== 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; bh=kcuJ7o6GNo8x17v/dH/5G6NdXueyDstuYD8Zc4S9Y7s=; b=jnW1exW22A23Uz74iv5aZFoAcl/CHBQhoIRFAQQO21aG8d6nvokYB1Vh2zfxh4jG8d NIb49ZLlN1YrKBZ2+YwF6k2sLHR934JpYWFcNv7KnnZbMiUwEGRy1okB2Hg+kXH/BvJ6 XBKdM5heFzr8VqjfycImbb990qVRsYsAUWKQXzR+STPMeBgspkdV9Dyv7/z4kjKOgT0/ of32mBVvCELzLcMO8JzWUidi7bBrBob23NVbwRoAFWA7dCb5PZzGRMcHZDX+yrp/1I5m 9L8cx3VEzgqBKxeRGL38J+2FgBXhTTynK8UNJJk36YU6BCbGzco0scAzE8vqg3yy7QOU nrNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eLwzymyw; 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 g21si19766043plo.435.2019.01.24.01.07.21; Thu, 24 Jan 2019 01:07:37 -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; dkim=pass header.i=@chromium.org header.s=google header.b=eLwzymyw; 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 S1727563AbfAXJHN (ORCPT + 99 others); Thu, 24 Jan 2019 04:07:13 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33241 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727513AbfAXJHK (ORCPT ); Thu, 24 Jan 2019 04:07:10 -0500 Received: by mail-oi1-f196.google.com with SMTP id c206so4288133oib.0 for ; Thu, 24 Jan 2019 01:07:09 -0800 (PST) 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=kcuJ7o6GNo8x17v/dH/5G6NdXueyDstuYD8Zc4S9Y7s=; b=eLwzymywGD+CIk/31TbpTyWXUjDdnn811AZrBe5if7mUFts3Hx2POFLLXiqOvzu0XS iqI1nzMkWWSVMGrpr3r6HUmz4woqu0H14TEtWeU3SaT53N9gvYLeTEyPrOjj4FLCF3kx EwmvkfGOt2tORe2Lt/T3s5TKFolFWT1TqfDJ8= 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=kcuJ7o6GNo8x17v/dH/5G6NdXueyDstuYD8Zc4S9Y7s=; b=IosdS+FjKF95NnSascvMD+aYJGRqtXA7IcgOzorexn+6GB/H0K04rzDQNYSNumMFCI bmWRIppbexFldMCdeceplo164N9p3D8Usn/DJkciUpoLpaP6qcjxn0Evd9/x8LpPFamD uy4GdedIz8w1YNK+fHX0gVnfdSt0Nuw/O09orrmYuzRKftR4nhftPlZOwAUdgKHqQpaq FzYdsuXOB2J6Flx4FuFrbLzklSZ9D+YNf6sdA3DJ0vYqBhRcv+6JaQ5wYwWtH86xiQVN 1OxNE1KQn7Gcn8NvUJLnAfFyXwrVxY0J19UdNt+sqJVHCE5TIM6A+8/v9/OMylKaclFE /TaA== X-Gm-Message-State: AHQUAuZ531yS+b3D0vX7Cm4kTjLxIaaw6lRsD935Bb0JbtZBfAXYq6Ty i3ZUdzSbEZYNObK4tQ3c8c1vg8eI2qA= X-Received: by 2002:a54:458c:: with SMTP id z12mr605186oib.293.1548320828944; Thu, 24 Jan 2019 01:07:08 -0800 (PST) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com. [209.85.167.177]) by smtp.gmail.com with ESMTPSA id k11sm11604915oib.35.2019.01.24.01.07.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 01:07:07 -0800 (PST) Received: by mail-oi1-f177.google.com with SMTP id a77so4250880oii.5 for ; Thu, 24 Jan 2019 01:07:06 -0800 (PST) X-Received: by 2002:aca:c2c3:: with SMTP id s186mr604655oif.173.1548320826474; Thu, 24 Jan 2019 01:07:06 -0800 (PST) MIME-Version: 1.0 References: <20181022144901.113852-1-tfiga@chromium.org> <20181022144901.113852-2-tfiga@chromium.org> <9b7c1385-d482-6e92-2222-2daa835dbc91@xs4all.nl> In-Reply-To: From: Tomasz Figa Date: Thu, 24 Jan 2019 18:06:54 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] media: docs-rst: Document memory-to-memory video decoder interface To: Hans Verkuil Cc: Linux Media Mailing List , Linux Kernel Mailing List , 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 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 Wed, Jan 23, 2019 at 2:27 PM Tomasz Figa wrote: > > On Tue, Jan 22, 2019 at 11:47 PM Hans Verkuil wrote: > > > > On 01/22/19 11:02, Tomasz Figa wrote: [snip] > > >>> + one ``CAPTURE`` buffer, the following cases are defined: > > >>> + > > >>> + * one ``OUTPUT`` buffer generates multiple ``CAPTURE`` buffers: the same > > >>> + ``OUTPUT`` timestamp will be copied to multiple ``CAPTURE`` buffers, > > >>> + > > >>> + * multiple ``OUTPUT`` buffers generate one ``CAPTURE`` buffer: timestamp of > > >>> + the ``OUTPUT`` buffer queued last will be copied, > > >>> + > > >>> + * the decoding order differs from the display order (i.e. the > > >>> + ``CAPTURE`` buffers are out-of-order compared to the ``OUTPUT`` buffers): > > >>> + ``CAPTURE`` timestamps will not retain the order of ``OUTPUT`` timestamps > > >>> + and thus monotonicity of the timestamps cannot be guaranteed. > > > > I think this last point should be rewritten. The timestamp is just a value that > > is copied, there are no monotonicity requirements for m2m devices in general. > > > > Actually I just realized the last point might not even be achievable > for some of the decoders (s5p-mfc, mtk-vcodec), as they don't report > which frame originates from which bitstream buffer and the driver just > picks the most recently consumed OUTPUT buffer to copy the timestamp > from. (s5p-mfc actually "forgets" to set the timestamp in some cases > too...) > > I need to think a bit more about this. Actually I misread the code. Both s5p-mfc and mtk-vcodec seem to correctly match the buffers. Best regards, Tomasz