Nicolas George (HE12025-04-19):
> Let me make you a promise: if you can write an introduction to the API
> (as all non-trivial APIs should have) that makes other major developers
> say “that was clear”, I will leave the matter alone.
… which does not mean I demand you do that. You can probably con
Michael Niedermayer (HE12025-04-19):
> I dont know what you are trying to acomplish here.
I am trying to help make this API as good as possible before it becomes
public and cannot be changed. I am nowhere as good as you in many areas,
but I think I can say that architecture, and in particular API
Hi
On Sat, Apr 19, 2025 at 03:03:16PM +0200, Nicolas George wrote:
> Michael Niedermayer (HE12025-04-17):
> > ok, i will change teh name
>
> Thanks.
>
> > You can implement an av_map_new() variant thats on the stack
> > if thats what you want to have / to use / to do
> > once the code is in git
Hi Leo
On Sat, Apr 19, 2025 at 06:36:56AM -0400, Leo Izen wrote:
> On 4/17/25 12:52, Michael Niedermayer wrote:
[...]
> > +typedef struct{
> > +AVMapEntry map_entry;
> > +uint8_t treenode_and_keyvalue[0];
> > +} AVMapInternalEntry;
> > +
> > +struct AVMap{
> > +#define CMP_MASK 31
> > +
Michael Niedermayer (HE12025-04-17):
> ok, i will change teh name
Thanks.
> You can implement an av_map_new() variant thats on the stack
> if thats what you want to have / to use / to do
> once the code is in git
> or maybe i will do it but there are many more interresting things
I have checked,
On 4/17/25 12:52, Michael Niedermayer wrote:
AVL Tree based Map
compared to AVDictionary this has
* clone is O(n) instead of O(n²)
* copy is O(n*log n) instead of O(n²)
* O(log n) malloc() calls by default and O(1) if av_map_realloc() is used
instead of O(n)
* get/add/delete is O(log n)
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
> > >
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
Hi
On Thu, Apr 17, 2025 at 07:57:46PM +0200, Nicolas George wrote:
> Michael Niedermayer (HE12025-04-17):
> > +AVMap *av_map_new(AVMapCompareFunc cmp_keyvalue, int cmp_flags,
> > AVMapCopyFunc copy, AVMapFreeFunc freef)
> > +{
> > +AVMap *s = av_mallocz(sizeof(*s));
> > +if (!s)
> > +
Michael Niedermayer (HE12025-04-17):
> +AVMap *av_map_new(AVMapCompareFunc cmp_keyvalue, int cmp_flags,
> AVMapCopyFunc copy, AVMapFreeFunc freef)
> +{
> +AVMap *s = av_mallocz(sizeof(*s));
> +if (!s)
> +return NULL;
> +
> +s->copy = copy;
> +s->freef = fre
10 matches
Mail list logo