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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS 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 E7311C169C4 for ; Thu, 31 Jan 2019 13:35:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE97F218AC for ; Thu, 31 Jan 2019 13:35:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="IaPFpBs0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387536AbfAaNfG (ORCPT ); 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-Google-Smtp-Source: ALg8bN6Bvr587ouq/SDURYiYbz3HiilXrtKt5hBcYciyyNs2wxcbj/JEpkxtoft18IHqaN/OFYRVqw== 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