[FFmpeg-devel] [PATCH] simplify GET_UTF8 to use ff_log2_tab
Sun Dec 9 20:10:27 CET 2007
On Sun, Dec 09, 2007 at 03:50:03PM +0100, Reimar D?ffinger wrote:
> On Sun, Dec 09, 2007 at 03:38:14PM +0100, Michael Niedermayer wrote:
> > On Sun, Dec 09, 2007 at 11:09:25AM +0100, Reimar D?ffinger wrote:
> > > currently GET_UTF8 calls av_log2 which is simply overkill,
> > > since we only care about the lowest 8 bits.
> > > This may be intentional since my suggestion would be problematic
> > > if GET_UTF8 should become part of the public API, since ff_log2_tab
> > > is not public.
> > > A possibility would be to at least use av_log2_16bit or better add a
> > > public av_log2_8bit.
> > > Comments?
> > put a extern whatever ff_log2_tab; in GET_UTF8()
> Done, but I just realized that's a bit stupid, common.h already does
> extern const uint8_t ff_log2_tab;
> so it is actually redundant as long as GET_UTF8 is in that file and
> causes redeclaration compiler warnings.
> Unless we'd want to move that extern into the av_log2 and av_log2_16bit
> functions, but I doubt that is a good idea either.
agree, feel free to remove that extern from GET_UTF8( again ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel