Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3] libavutil: Add AVMap
Date: Sat, 19 Apr 2025 03:23:12 +0200
Message-ID: <20250419012312.GY4991@pb2> (raw)
In-Reply-To: <3359dc33-ab0c-4c78-9621-6be97dff07df@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1346 bytes --]

On Fri, Apr 18, 2025 at 10:46:42AM -0400, Leo Izen wrote:
> On 4/17/25 16:12, Michael Niedermayer wrote:
> > > 
> > > > + * @param keyvalue_cmp compare function, will be passed the key + value concatenated.
> > > 
> > > Please no. Pass the key and the value separately to the compare
> > > function.
> > 
> > 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 location is known
> > or with arbitrary binary data the compare function knows the size of the 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.
> > 
> 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

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Nations do behave wisely once they have exhausted all other alternatives. 
-- Abba Eban

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

  reply	other threads:[~2025-04-19  1:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 16:52 Michael Niedermayer
2025-04-17 17:57 ` Nicolas George
2025-04-17 20:12   ` Michael Niedermayer
2025-04-18 14:46     ` Leo Izen
2025-04-19  1:23       ` Michael Niedermayer [this message]
2025-04-19 13:03     ` Nicolas George
2025-04-19 16:23       ` Michael Niedermayer
2025-04-19 17:23         ` Nicolas George
2025-04-19 17:36           ` Nicolas George
2025-04-19 10:36 ` Leo Izen
2025-04-19 14:39   ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250419012312.GY4991@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git