Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7140021imu; Thu, 31 Jan 2019 05:42:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN7nA2zYJ6lZUVRoOKIVXpG+RY23CAGxIEFZ2wBPZyeuMONgqqkcOLjzU/WWN5hFNoAobAZ7 X-Received: by 2002:a17:902:4681:: with SMTP id p1mr35739412pld.184.1548942148206; Thu, 31 Jan 2019 05:42:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548942148; cv=none; d=google.com; s=arc-20160816; b=H+qslyZF3fOlLcVF7guPupk2INebM+TL7gGpcWnGWKZJemAe6flPYYCIuDR/JprS5g yNWNRtBNobkZ945tY7R7+fQrYlrl4zZwt0M7HTsG0lfKLX2sad/4R+MMRNt/0NULrxIe URoA6cjBJLfDl1naRE7iI/lYG8L9C3AVQO1rPXVp443GL5bZ0yEl8X/+92eajKn4L0Hm pAv1+S42+2bh85trnfYzSuEdMwzAw3MBeOtJ86GW3noM29ADvUew4SzEawiwGN3TRrTO W52H2DBsrs3jdmhiqMUx1oAGnuvhQ5dk+YSUYBRyw1b7Q+Xh0kcNJ+TdqMA3nu+U0e9P jJ7w== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=lFxNUjF9ZotFZkVE8oj7F5v9LPfzCUd9sZdzlfBUMOM=; b=oVILmZv/kJ0rodQCgdBiBQi0TuvQsICW/OTnTPF/M65fpGKECr2yKqXSkXIZSxDtmo Z+w2XQKmKNWyyYSy0SKvZQt/RvqA0sTnotsAx841r5+qEj5MgZu2NigD0YD7XtvtaJ9G 4q9ocwoHx1W6qlDfLeIKzKUeXrAZUGhlyta0myI/awfCDphVkY3PDD6QgRrXaRKmHeRa Q2XZk48WyW11DMQU8FHCxSDGO7hi1jZ8IWINeeycXMvIA83DGtEBG9EQptcJHzMs1v5H Fw4oCGgpFiAucYeQNJy/yRQsS5/AJSlp6LAfCjrkomaNUEZPAxrJlcQTjWst3jK8b/iI a5Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IaPFpBs0; 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 e8si4390841pgn.325.2019.01.31.05.42.13; Thu, 31 Jan 2019 05:42:28 -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=IaPFpBs0; 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 S2387527AbfAaNfG (ORCPT + 99 others); Thu, 31 Jan 2019 08:35:06 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:33327 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726714AbfAaNfF (ORCPT ); Thu, 31 Jan 2019 08:35:05 -0500 Received: by mail-ot1-f68.google.com with SMTP id i20so2828321otl.0 for ; Thu, 31 Jan 2019 05:35:05 -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:content-transfer-encoding; bh=lFxNUjF9ZotFZkVE8oj7F5v9LPfzCUd9sZdzlfBUMOM=; b=IaPFpBs0xqbJdXPNibQPCujedS7zvucCOlQKywnAWw/ERJmi4vUotu69KjZBhBo+Mi KowPfNLrJ6LRfz40UMedI7PlwqapoGS68sIym7tvPFoNO/ICv8Y7xCSxzJtPETbTqX82 AjKCTB/rZvdp6NHGBum9M8XJcoJVbJnCGnGvs= 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:content-transfer-encoding; bh=lFxNUjF9ZotFZkVE8oj7F5v9LPfzCUd9sZdzlfBUMOM=; b=rrUd4I/BZzEKmW9pCdS1x6yv1B3RW4AjXzG4z5avsqS71rJRT7VhKRp4eSMPsVYSid J6KGUM/ScQEh+mjel8zaA6vJcj1bW7ZCJvXKAijOjPeK6XvF3mINJF3T4pzRgxpE6B1S p5FCJiAExp9GH9YV9FifRxhDSJzvGdFaxjQf0w8WlpBe0dy/2VDroQBbV/Cj2eMdXhng zKdFVgBjQikbh1R8B2ldw1zk8JtEkumDs4DLJGbyksyaFo0T06r8PW1Boi/G0enW2pwu 7mIfKvFkpMYrqpOKsmwivQoymLD/OR1jyDw3anvQVkWZkqW0SsHoW7lNQ5kfvDccnMkY KBXw== X-Gm-Message-State: AJcUukcGI1piXdV3PecGEHhAsKzRtG4pcwY9WYUfGw9tOO6FQut2PiXd bxubAsrXfWfpig17mNqCz9uwxq/tbDM= X-Received: by 2002:a9d:754f:: with SMTP id b15mr24736740otl.231.1548941704553; Thu, 31 Jan 2019 05:35:04 -0800 (PST) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com. [209.85.210.50]) by smtp.gmail.com with ESMTPSA id v20sm1765091otp.10.2019.01.31.05.35.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 05:35:01 -0800 (PST) Received: by mail-ot1-f50.google.com with SMTP id e12so2794282otl.5 for ; Thu, 31 Jan 2019 05:35:01 -0800 (PST) X-Received: by 2002:a9d:1b67:: with SMTP id l94mr24133458otl.147.1548941700630; Thu, 31 Jan 2019 05:35:00 -0800 (PST) MIME-Version: 1.0 References: <20190117162008.25217-1-stanimir.varbanov@linaro.org> <20190117162008.25217-11-stanimir.varbanov@linaro.org> <28069a44-b188-6b89-2687-542fa762c00e@linaro.org> <57419418d377f32d0e6978f4e4171c0da7357cbb.camel@ndufresne.ca> <1548938556.4585.1.camel@pengutronix.de> In-Reply-To: <1548938556.4585.1.camel@pengutronix.de> From: Tomasz Figa Date: Thu, 31 Jan 2019 22:34:48 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 10/10] venus: dec: make decoder compliant with stateful codec API To: Philipp Zabel Cc: Nicolas Dufresne , Stanimir Varbanov , Linux Media Mailing List , Mauro Carvalho Chehab , Hans Verkuil , Linux Kernel Mailing List , linux-arm-msm , Vikash Garodia , Alexandre Courbot , Malathi Gottam Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 31, 2019 at 9:42 PM Philipp Zabel wrot= e: > > Hi Nicolas, > > On Wed, 2019-01-30 at 10:32 -0500, Nicolas Dufresne wrote: > > Le mercredi 30 janvier 2019 =C3=A0 15:17 +0900, Tomasz Figa a =C3=A9cri= t : > > > > I don't remember saying that, maybe I meant to say there might be a > > > > workaround ? > > > > > > > > For the fact, here we queue the headers (or first frame): > > > > > > > > https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/mast= er/sys/v4l2/gstv4l2videodec.c#L624 > > > > > > > > Then few line below this helper does G_FMT internally: > > > > > > > > https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/mast= er/sys/v4l2/gstv4l2videodec.c#L634 > > > > https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/mast= er/sys/v4l2/gstv4l2object.c#L3907 > > > > > > > > And just plainly fails if G_FMT returns an error of any type. This = was > > > > how Kamil designed it initially for MFC driver. There was no other > > > > alternative back then (no EAGAIN yet either). > > > > > > Hmm, was that ffmpeg then? > > > > > > So would it just set the OUTPUT width and height to 0? Does it mean > > > that gstreamer doesn't work with coda and mtk-vcodec, which don't hav= e > > > such wait in their g_fmt implementations? > > > > I don't know for MTK, I don't have the hardware and didn't integrate > > their vendor pixel format. For the CODA, I know it works, if there is > > no wait in the G_FMT, then I suppose we are being really lucky with the > > timing (it would be that the drivers process the SPS/PPS synchronously, > > and a simple lock in the G_FMT call is enough to wait). Adding Philipp > > in CC, he could explain how this works, I know they use GStreamer in > > production, and he would have fixed GStreamer already if that was > > causing important issue. > > CODA predates the width/height=3D0 rule on the coded/OUTPUT queue. > It currently behaves more like a traditional mem2mem device. The rule in the latest spec is that if width/height is 0 then CAPTURE format is determined only after the stream is parsed. Otherwise it's instantly deduced from the OUTPUT resolution. > > When width/height is set via S_FMT(OUT) or output crop selection, the > driver will believe it and set the same (rounded up to macroblock > alignment) on the capture queue without ever having seen the SPS. That's why I asked whether gstreamer sets width and height of OUTPUT to non-zero values. If so, there is no regression, as the specs mimic the coda behavior. > > The source change event after SPS parsing that the spec requires isn't > even implemented yet. > > regards > Philipp