From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 1610A44A96 for ; Tue, 6 Dec 2022 23:42:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 485FF68BDAC; Wed, 7 Dec 2022 01:42:36 +0200 (EET) Received: from mail.overt.org (mail.overt.org [72.14.183.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4D8968BD5A for ; Wed, 7 Dec 2022 01:42:29 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=overt.org; s=mail; t=1670370147; bh=aeRCh3EzwWyOjVGYiApQM2Y0DpekDNC79Z7OdaRvn5g=; h=Date:From:To:Subject:In-Reply-To:References:From; b=UPHkhCxYRv9ZhCey3QXH/x1GfBZKekD7WD1yyhBGROnCYp0xBMdePugFvlJRf0mkW GyayxXxkblBDq/NqBGzCX2We7+zqoXIXdNHjNO8OjKMsTHsHaD3amDrTClKGjCE1fD l//20pAo6MY/hKKAZ2dVfGh2IkrMu+FnhpIb3CwN8G3pfsQ9A8iiXBgH4DMI8iOX/A fI3GRf14hdKGLAOZq4f6fEX+P0pzAUWsLivJCBl2OxoNFiyG+P06MhXTvXtCM2C47N p+4Q7mlehkpMiaIBejoe3OpQ1mpPX+5zL/MaukasU/3sJCzCEqg+Ta/y3nIJMaYpa4 2no6S5NFRpWjA== Received: from authenticated-user (mail.overt.org [72.14.183.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.overt.org (Postfix) with ESMTPSA id 18D24629FC for ; Tue, 6 Dec 2022 17:42:27 -0600 (CST) Date: Tue, 6 Dec 2022 15:42:25 -0800 From: Philip Langdale To: FFmpeg development discussions and patches Message-ID: <20221206154225.2dc087bc@fido7> In-Reply-To: <20221205222559.107006-1-timo@rothenpieler.org> References: <20221205222559.107006-1-timo@rothenpieler.org> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavc: add new minimize_copies hwaccel_flag X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 5 Dec 2022 23:25:58 +0100 Timo Rothenpieler wrote: > --- > doc/APIchanges | 3 +++ > libavcodec/avcodec.h | 11 +++++++++++ > libavcodec/options_table.h | 1 + > libavcodec/version.h | 2 +- > 4 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/doc/APIchanges b/doc/APIchanges > index ab7ce15fae..9c1f905a61 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -14,6 +14,9 @@ libavutil: 2021-04-27 > > API changes, most recent first: > > +2022-12-xx - xxxxxxxxxx - lavc 59.54.101 - avcodec.h > + Add AV_HWACCEL_FLAG_MINIMIZE_COPIES. > + > 2022-11-xx - xxxxxxxxxx - lavu 57.43.100 - tx.h > Add AV_TX_FLOAT_DCT, AV_TX_DOUBLE_DCT and AV_TX_INT32_DCT. > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 3edd8e2636..a72551bb5e 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -2253,6 +2253,17 @@ typedef struct AVHWAccel { > */ > #define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2) > > +/** > + * Hardware acceleration can have a limited number of direct output > surfaces. > + * For some processing chains, this can be okay, but others will run > into the > + * limit and in turn produce very confusing errors. > + * > + * Thus, the hwaccel will by default make a safety copy. If a users > really > + * wants to minimize the amount of copies, they can set this flag > and ensure > + * their chain does not exhaust the surface pool. > + */ > +#define AV_HWACCEL_FLAG_MINIMIZE_COPIES (1 << 3) I would soften the statement about making a safety copy to make it clear that only hwaccels where limits are relevant will make safety copies. Otherwise people will think every other hwaccel has suddenly started doing it. Otherwise, LGTM. --phil _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".