Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5528986imu; Tue, 29 Jan 2019 22:18:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN7+mh95LhccDW0sv7fFLDiIcshJ1DmM2dhQTuSeLx7I4p8lGcVitfkB83wl6qh5S8+kM1Rw X-Received: by 2002:a17:902:930b:: with SMTP id bc11mr29769777plb.17.1548829105492; Tue, 29 Jan 2019 22:18:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548829105; cv=none; d=google.com; s=arc-20160816; b=VpdJ4ZbVn8TeuZ3x7wKiq+NU6UfBYVokJOWE4HUS4o6f3GVNBxtSFEeoYbaq1clhHR KTEyzg/8zx4S/fAg6fMlbOQcI0/dCJxgLBRCaHh8Eqxlzn88b6J1tDq71bF1nqvW28yW 9qEZUg/kpZoZ13SKoyjXgzv/L6kVcxxQ2dj+zenlfzqk93x9x41aOKxqz1EwaYg5nYtb Qhx6ws9qeJqwImIqsDLjtIWDKbup+LDVCBhOLQgJyhIuQtYDJSjzvTwMOF95Ri7SN15A 9m+qFooiIHy+FBOE/UzaGFiAFM0gX1EDj1egxP1JCw6UhuoCwS+EaVwU8Ikarvh8Xruh rFog== 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=GfCCtscXzLcTgBfRtd84na+8CHfmvOKBgex8G5OBlQU=; b=pomEM/QBbUdDPn7LV2KudvU4sxDA2biHHttC+nXMw0i27uBvAqIBjAGhMmqBfrUEhm LTpB5zMQKqheWt2VnRmBvcRiHtGpGREDd2UDTa9uLpyRvihyctb3U4gtnuSATx/BPvUx cwioVerkY//ei6EZvHQCu8KO2OLnTXizZQkXd0Ax/s01dOKqzquoCMLNYegHv6h2Ir21 5roHgC6VGh3n98lXynzP79g3hikDndY7NqpWRq3ECM8CtnvQJNgKRMMnxpujjawVAb2W 0YSLSxhGwUSSymvMA8Z2bP+HvDXIRHNM3hlSICU6OT+h8+pqSHindy7ecIhQs3XYb6W1 5CPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HlYComox; 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 d40si627120pla.427.2019.01.29.22.18.08; Tue, 29 Jan 2019 22:18:25 -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=HlYComox; 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 S1728356AbfA3GSD (ORCPT + 99 others); Wed, 30 Jan 2019 01:18:03 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37210 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbfA3GSC (ORCPT ); Wed, 30 Jan 2019 01:18:02 -0500 Received: by mail-ot1-f66.google.com with SMTP id s13so20183135otq.4 for ; Tue, 29 Jan 2019 22:18:01 -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=GfCCtscXzLcTgBfRtd84na+8CHfmvOKBgex8G5OBlQU=; b=HlYComox3+pCn2czVeA91Mt70maiWPhR92XarngZ15ztgKD9tzMUbwAzZb2Gmwmnnp XuFBC9Pob6HZymPD5s5gSJX1K+aXG4wO6o6GrxDX/zsKR60h5Nk50BKKiTsMDIVkmdk6 TKIduGAvBOuE3RtHP+AEtfD9b/rcSPNZMqpic= 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=GfCCtscXzLcTgBfRtd84na+8CHfmvOKBgex8G5OBlQU=; b=aHrajrsuBNEw9zcYu85rvW7h+cyJhYpFnI4ws/TwuarIPZorqr4UyMtqXU+ENObu4D ttI+ARPJ0QQeqdB4AufasFZkgghTU7FUxGbxJClIbEFZP+5b+k79bXaGlq9UWEMqmzMI LqzNnbRiD2fCrhYnVtDOtMK7qxrY4zvc9Re/QP9NKRAHsGdgTnOJKSu/hvUtncMpc/Fk kycnBNHylVvjPZBSORD0PXxj1agkhHPh94ro5z+Xjafak9BCRdjhZnDlg8I+0kEJ6n01 ZtLaAEussvmZ4GF9PzGO/c3hO2cTeECDT5ysOd6yW9C6aHzu6acDwS/7JDzmqhdVQnNK SVEA== X-Gm-Message-State: AJcUukfz9+20TYUKo4+8zOQyVwm1E4mipoj3p9f7LgbNBLzeyo7elpNa 0s7wUicLnkiujUgGa8DE7vp5Nh+0wD4= X-Received: by 2002:a9d:6197:: with SMTP id g23mr21007032otk.324.1548829081389; Tue, 29 Jan 2019 22:18:01 -0800 (PST) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com. [209.85.210.44]) by smtp.gmail.com with ESMTPSA id y25sm249382otk.50.2019.01.29.22.17.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 22:17:58 -0800 (PST) Received: by mail-ot1-f44.google.com with SMTP id n8so20185142otl.6 for ; Tue, 29 Jan 2019 22:17:58 -0800 (PST) X-Received: by 2002:a9d:6546:: with SMTP id q6mr22782709otl.288.1548829077886; Tue, 29 Jan 2019 22:17:57 -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> In-Reply-To: From: Tomasz Figa Date: Wed, 30 Jan 2019 15:17:46 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 10/10] venus: dec: make decoder compliant with stateful codec API To: Nicolas Dufresne Cc: 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 Wed, Jan 30, 2019 at 1:21 PM Nicolas Dufresne wro= te: > > Le mercredi 30 janvier 2019 =C3=A0 12:38 +0900, Tomasz Figa a =C3=A9crit = : > > > Yes, unfortunately, GStreamer still rely on G_FMT waiting a minimal > > > amount of time of the headers to be processed. This was how things wa= s > > > created back in 2011, I could not program GStreamer for the future. I= f > > > we stop doing this, we do break GStreamer as a valid userspace > > > application. > > > > Does it? Didn't you say earlier that you end up setting the OUTPUT > > format with the stream resolution as parsed on your own? If so, that > > would actually expose a matching framebuffer format on the CAPTURE > > queue, so there is no need to wait for the real parsing to happen. > > 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/master/sys= /v4l2/gstv4l2videodec.c#L624 > > Then few line below this helper does G_FMT internally: > > https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/master/sys= /v4l2/gstv4l2videodec.c#L634 > https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/blob/master/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 have such wait in their g_fmt implementations? > > Nicolas > > p.s. it's still in my todo's to implement source change event as I > believe it is a better mechanism (specially if you header happened to > be corrupted, then the driver can consume the stream until it finds a > sync). So these sleep or normally wait exist all over to support this > legacy thing. It is unfortunate, the question is do you want to break > userspace now ? Without having first placed a patch that would maybe > warn or something for a while ? > I don't want and my understanding was that we could workaround it by the propagation of format from OUTPUT to CAPTURE. Also see above. Best regards, Tomasz