[FFmpeg-soc] [soc]: r2713 - nellyenc/nellymoserenc.c

Bartlomiej Wolowiec bartek.wolowiec at gmail.com
Tue Jul 8 23:10:09 CEST 2008


On wtorek, 8 lipca 2008, Benoit Fouet wrote:
> bwolowiec wrote:
> > Author: bwolowiec
> > Date: Mon Jul  7 15:20:48 2008
> > New Revision: 2713
> >
> > Log:
> > use binary search instead of linear search
> >
> >
> > Modified:
> >    nellyenc/nellymoserenc.c
> >
> > Modified: nellyenc/nellymoserenc.c
> > =========================================================================
> >===== --- nellyenc/nellymoserenc.c	(original)
> > +++ nellyenc/nellymoserenc.c	Mon Jul  7 15:20:48 2008
> > @@ -146,6 +146,28 @@ static av_cold int encode_end(AVCodecCon
> >      return 0;
> >  }
> >
> > +/*
> > + * Searching index in table with size table_size, where
> > + * |val-table[best_idx]| is minimal.
> > + * It assumes that table elements increasing order and uses binary
> > search. + */
> > +#define find_best_value(val, table, table_size, best_idx) \
>
> couldn't that be a function instead of a macro ?

No, because it's used with three different types (uint16_t, int16_t, float)

-- 
Bartlomiej Wolowiec



More information about the FFmpeg-soc mailing list