From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id EE79740EDA for <ffmpegdev@gitmailbox.com>; Sat, 19 Apr 2025 01:23:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2B2B5687DDD; Sat, 19 Apr 2025 04:23:20 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E6A04687BDF for <ffmpeg-devel@ffmpeg.org>; Sat, 19 Apr 2025 04:23:13 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3218E43980 for <ffmpeg-devel@ffmpeg.org>; Sat, 19 Apr 2025 01:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1745025793; 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=st6QqSJov8G9Lq0TIghn+ui9LrOLk/nVr6UTDzRLeyc=; b=YFxvca2l8XpTqWAyDqERLrzC/nO0kTAK4PUXfw3QGixJGj8LOUOiNanjIbr1Xf0mSnw0Zs h/Z09tQPJDIniSz8kxTbhTgMSWopXq7QI/d3ZX8RKURJxZpWYVV7oVMFvQVjCyxum/ZIbN Lr3OOjg+Tk3KPjHLr208m2CvXBsHcfZtWB+zn/h140z+j+Qwdh2V8MTPPYepeVZMKg2p7j OUBpgnlAMuPHWVZR0m4M0RJlRK6GwlBIsKboOPKvY/izLaOImzwt3NXTgP9OGPzgL8R9Au VqHXjLHX3r9bFuJMnw/+9PSec3dDMR3W9l3aB2XcyPZ68e7gZvMUUsxuU+QFSg== Date: Sat, 19 Apr 2025 03:23:12 +0200 From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Message-ID: <20250419012312.GY4991@pb2> References: <20250417165241.3266643-1-michael@niedermayer.cc> <aAFBGsbuU5SG2ma4@phare.normalesup.org> <20250417201238.GU4991@pb2> <3359dc33-ab0c-4c78-9621-6be97dff07df@gmail.com> MIME-Version: 1.0 In-Reply-To: <3359dc33-ab0c-4c78-9621-6be97dff07df@gmail.com> X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeefieelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdeftddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v3] libavutil: Add AVMap X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: multipart/mixed; boundary="===============9090399038821201200==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/20250419012312.GY4991@pb2/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> --===============9090399038821201200== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ihlyizgS1X0sNYFH" Content-Disposition: inline --ihlyizgS1X0sNYFH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 18, 2025 at 10:46:42AM -0400, Leo Izen wrote: > On 4/17/25 16:12, Michael Niedermayer wrote: > > >=20 > > > > + * @param keyvalue_cmp compare function, will be passed the key + = value concatenated. > > >=20 > > > Please no. Pass the key and the value separately to the compare > > > function. > >=20 > > thats neither efficient nor does it fit the existing APIs. > > The value is most of the time not used and when used it is known exactly > > where it is. after a string compare of the key thats equal the value lo= cation is known > > or with arbitrary binary data the compare function knows the size of th= e data. > > Passing redudant pointers just wastes cpu cycles > > also existing APIs from av_tree strcmp() av_strcasecmp() and so on none= of > > which take 4 pointers from which they would ignore 2. > >=20 > The problem is that passing the key and value pairs combined requires you= to > concatenate them. Since AVMapEntry has two separate pointers *key and > *value, it doesn't make sense to concatenate them before comparison > rather than just pass the pointers as-is. AVMapEntry.key and value are always concatenate already thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Nations do behave wisely once they have exhausted all other alternatives.= =20 -- Abba Eban --ihlyizgS1X0sNYFH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaAL6/AAKCRBhHseHBAsP q03HAJ4hSBkT8TZG74kNB/4Ol/Txtc5AHgCdGWbaMemTsWDMrIpgQXKuAzj0XiQ= =sf3Y -----END PGP SIGNATURE----- --ihlyizgS1X0sNYFH-- --===============9090399038821201200== 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". --===============9090399038821201200==--