Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2123183yba; Mon, 15 Apr 2019 05:32:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKAwWQRYrawgIxUV8bPPptzztOtUh/Wl1tZNrYa2jDhGZhEl5EfiElvG3DjVW3Nc17qkma X-Received: by 2002:a62:6587:: with SMTP id z129mr75740975pfb.88.1555331537850; Mon, 15 Apr 2019 05:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555331537; cv=none; d=google.com; s=arc-20160816; b=CxcuZt9GVztR39dSa0881qro6ZsDk1G5TQ0LaxdLKt8pLiOx4E1J3UA7e6/zfWEzIH yDlzLqeJJoSfrrsQoRSmGFdCWgG44Ury1MFAOutRwnv53sNhssE+BwgwQODw4ZK1JqY8 WrZclb47Bmpcep7Coe/4hAUtn06+2DgcfsmHE5bD6YOL94wAde5jtZlhSZ/QN6eBO8AH OgN2heRRHnZVflOIwDBG+dRJamwifiJgyg4kUoO1c52QB4kmTX4z6+ZpTjifO7SGDXQj 7c0YlnzwNtDlTRFPI/fqX2xFgovZHruURBFtfAkFH/4sT+OqAYlm5yeeeASvJMiD3dze mp5A== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=WaGY23/aKBXv/22Nfcg3k8t9q+qYeT1eKiuNyGDw0p0=; b=sljUQ9EujaYe1hhRPYMOw4nxYdIvPFGutq9GfNgp8rd1bj9Zvn3Q1OhMDJtwvRDCen Fl0VCwpRDaITBgAAFK5UECKR5NTsxjRUu+dv55lvtUELzrTyL1PFVa2CwRlCmks7zyva yF2TtJZbcPaSx2VGCuQgY8xrFOy7lamvgFXwcVGq8tVlBdMCLuNDV8sPskgmxbEksm6R SLW0EEGu/Xj+tdQrTaj0/AoVcjzCwXmLDGskwx0r70FM8L2HRQ+Fs+vLR8GtrSDLVTFL nphiYQZ3dbloaMKkbsgfSrrST3sF9Z/olCv2eSXVwZ1qxtlpMiwDv6bOQoh19xSsGA8N HGfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=c7x5yCf5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w125si47510523pfw.137.2019.04.15.05.32.01; Mon, 15 Apr 2019 05:32:17 -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=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=c7x5yCf5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbfDOMaI (ORCPT + 99 others); Mon, 15 Apr 2019 08:30:08 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:44120 "EHLO mail-qt1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbfDOMaI (ORCPT ); Mon, 15 Apr 2019 08:30:08 -0400 Received: by mail-qt1-f180.google.com with SMTP id w5so18738021qtb.11 for ; Mon, 15 Apr 2019 05:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=WaGY23/aKBXv/22Nfcg3k8t9q+qYeT1eKiuNyGDw0p0=; b=c7x5yCf5Ow30egwi6LE0VHDAmhbfJBKZ/55Q56a/r71xLVCnrWY+v96CYQfPK+JPsM svTQ3xX2dmW9vccadijIttuvAcECISJ2JoA9712nXO/1GTgO8I+Sd6xk4vPkmukC0WdA gxwtaGl+8Bs1g9e2mxQi3lJf2hgwJsMXTg6UbTmSPKfpT/JEKG8ANachszSIKcduMi+2 wCytpDwM/LQgrqNoXI7EMWTuevrXg2blq97NRiC6y/oMmJGkUXZL28YDfIcxSJhnQ4Mj PdVEninSbBJS0YzB5+uqTvgIXPdnhsguwMECYNQRMxa5vmVmiTsO+sRoPmXLpZZMYM0z Ierw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=WaGY23/aKBXv/22Nfcg3k8t9q+qYeT1eKiuNyGDw0p0=; b=WvYoJ5wAixV2ru7egjURzfvAf3ewUZ0Pua2KR+XUC3GAot8rn2cRdQexQk00pVUGXJ pBzPJ7RJTAExXn2j4FsKDFjlHsXSRHzYsjNfYwEZbjRX4MWxuwGMpKKidHdC9N5ZHAzb KkYi6SrTlD4Pg93jyCt/wmPToveLLIGzKRGbQ5MehAgs3bJqti0Btypvbzt+QkogSDDt GNyq1CcQcj0s6IaMQ5Plx5LrlfaI2yFJ1+Pb3/zOyKmYzR4vtLqusTVOwVfSr/jJ0JHm wrS8VpARhaKw25S5B+7dzhH25lAfCk2utZ7kX5TF+VvoKvdMycU2JiUUVRR2T3GELDOb QY9Q== X-Gm-Message-State: APjAAAVTrAdTeUwa1t8L35AxUQjJhZeBzdU/DY9zJCW5KhissL3LuK9z +WMsUorMNhYIS89JRSOWd8ovqg== X-Received: by 2002:a0c:c110:: with SMTP id f16mr61436082qvh.190.1555331407032; Mon, 15 Apr 2019 05:30:07 -0700 (PDT) Received: from skullcanyon ([2002:c0de:c115:0:481e:e17e:2f68:43f8]) by smtp.gmail.com with ESMTPSA id w68sm25878408qka.18.2019.04.15.05.30.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Apr 2019 05:30:05 -0700 (PDT) Message-ID: <6ae8b9daa0cf406ab604e802bbb6d46736266bd5.camel@ndufresne.ca> Subject: Re: [PATCH v3 2/2] media: docs-rst: Document memory-to-memory video encoder interface From: Nicolas Dufresne To: Tomasz Figa Cc: Hans Verkuil , 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 , Tiffany Lin =?UTF-8?Q?=28=E6=9E=97=E6=85=A7=E7=8F=8A=29?= , Andrew-CT Chen =?UTF-8?Q?=28=E9=99=B3=E6=99=BA=E8=BF=AA=29?= , Stanimir Varbanov , Todor Tomov , Paul Kocialkowski , Laurent Pinchart , dave.stevenson@raspberrypi.org, Ezequiel Garcia , Maxime Jourdan Date: Mon, 15 Apr 2019 08:30:03 -0400 In-Reply-To: References: <20190124100419.26492-1-tfiga@chromium.org> <20190124100419.26492-3-tfiga@chromium.org> <4bbe4ce4-615a-b981-0855-cd78c7a002d9@xs4all.nl> <471720b7-e304-271b-256d-a3dd394773c9@xs4all.nl> <787ddc1f-388d-82be-2702-0d7d256f636c@xs4all.nl> <6cb0caf1-61a6-0719-1ade-1dcf8ed8a020@xs4all.nl> <1ec36515-b6ec-b355-47fb-2fe5ad4b3241@xs4all.nl> <03751bb884a443ec1cea7b5c023c9d520ffcc3a0.camel@ndufresne.ca> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.0 (3.32.0-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le lundi 15 avril 2019 à 17:56 +0900, Tomasz Figa a écrit : > > Sounds like we need something similar to the SOURCE_CHANGE event > > mechanism if we want to allow dynamic bitrate control which would > > require re-allocation of the capture buffer queue. (Or any other > > runtime control on our encoders, which is really expected to be > > supported these days). > > Sounds like it. Or we could just assume that one needs to stop both > queues to do a resolution change, since most codes would anyway reset > the stream (e.g. send PPS/SPS, etc. for H.264) to change the > resolution. Not sure if that assumption always holds, though. I think for resolution/profile/level changes you have a good point, as you said, we need to start a new stream (new header, new IDR). Maybe then we should simply require the driver to allocate enough buffer to support the highest bitrate for the selected resoltion/profile/level? Though, this could create situation where we waste a lot of memory. On the other side, if you need to reallocate your buffers on bitrate change, it might create a visible freeze. Nicolas