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 681C348BDA for ; Wed, 10 Apr 2024 01:13:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B27EA68D0AF; Wed, 10 Apr 2024 04:13:09 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EFA1C68CD83 for ; Wed, 10 Apr 2024 04:13:03 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 26F3960002 for ; Wed, 10 Apr 2024 01:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1712711583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jwVifsIFJ0KGFP3Z03uxlme4s6T4JPAxsKgPMfIZFWU=; b=pGKWUlLn+944MEmFPq4qyQmA2Vd38WvQbA9L1nqRANxZo/WZztMd+pGRwLAO8r8NOLsPJV z6ntt1MVMcBkGxgJT2j1AZDaIgZ7pgXdfrxOPDuSTdfL9g1aQbdyR1w8clurveK8N5KUBE Ji7XDb/QEBMCNWnsqzsH3tj6JS2DohuZkcAd2QW2WbEgjbaBErmnmVwpeuvBiOAwRHQjlC Yiu38rjP+/+SXO2o8XANYw7MvEWF3yOpw72nFTj+AWIT0blTKqB//CEnLrb9ofhnQoQnaB ScVeJqHCSzxI+Y0ah6H9YG0mlUWD/uUA1ABKrurl6ENIfRVFWxsoW+0QKizJaA== Date: Wed, 10 Apr 2024 03:13:02 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240410011302.GL6420@pb2> References: <20240408125950.53472-1-ffmpeg@haasn.xyz> <20240408125950.53472-15-ffmpeg@haasn.xyz> MIME-Version: 1.0 In-Reply-To: <20240408125950.53472-15-ffmpeg@haasn.xyz> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2 14/17] fftools/ffmpeg_filter: simplify choose_pix_fmts 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: multipart/mixed; boundary="===============7285001187984264304==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7285001187984264304== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LdlYHjo/0AzbKWpU" Content-Disposition: inline --LdlYHjo/0AzbKWpU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 08, 2024 at 02:57:18PM +0200, Niklas Haas wrote: > From: Niklas Haas >=20 > The only meaningful difference between choose_pix_fmts and the default > code was the inclusion of an extra branch for `keep_pix_fmt` being true. >=20 > However, in this case, we either: > 1. Force the specific `ofp->format` that we inherited from > ofilter_bind_ost, or if no format was set: > 2. Print an empty format list >=20 > Both of these goals can be accomplished by simply moving the decision > logic to ofilter_bind_ost, to avoid setting any format list when > keep_pix_fmt is enabled. This is arguably cleaner as it moves format > selection logic to a single function. In the case of branch 1, nothing > else needs to be done as we already force the format provided in > ofp->format, if any is set. Add an assertion to verify this assumption > just in case. >=20 > (Side note: The "choose_*" family of functions are arguably misnomers, > as they should really be called "print_*" - their current behavior is to > print the relevant format lists to the `vf/af_format` filter arguments) > --- > fftools/ffmpeg_filter.c | 49 ++++++++--------------------------------- > 1 file changed, 9 insertions(+), 40 deletions(-) breaks: =2E/ffmpeg -y -i fate-suite/lena.pnm -pix_fmt +yuv444p -vf scale -strict -1= -bitexact -threads 2 -thread_type slice /tmp/file-2s-444.jpg Press [q] to stop, [?] for help Assertion !ost->keep_pix_fmt || (!ofp->format && !ofp->formats) failed at f= ftools/ffmpeg_filter.c:1314 Aborted (core dumped) [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 2 "100% positive feedback" - "All either got their money back or didnt compla= in" "Best seller ever, very honest" - "Seller refunded buyer after failed scam" --LdlYHjo/0AzbKWpU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZhXnmgAKCRBhHseHBAsP q2j5AJ9yyVvqkQLoEAdZ7qZU2Iv2SbuiJQCfbCB1vXFqKtWC+0oPf3pBUqX2wVY= =pKoq -----END PGP SIGNATURE----- --LdlYHjo/0AzbKWpU-- --===============7285001187984264304== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============7285001187984264304==--