[vorbis-dev] optimization patches
Segher Boessenkool
segher at eastsite.nl
Mon Aug 28 10:25:59 PDT 2000
Well, here you are. 24k; sorry if I'm not supposed to put this size
things in your mailbox, didn't know where else to put it. And you
all are subscribed to vorbis-dev, after all.
I'm not that good at breaking patches apart, so it's one big patch.
Sorry.
Overview:
configure.in
make profiling easier & more useful
decoder-example.c
(#if 0'ed) dither output; sounds a lot more "open", but
should be coloured dither. Someone else please step in. (The
dither could be applied before the mdct, but we have to know
the amplification. No problem with decoder_example, but it is
in the general case).
codebook.[ch]
bitwise.[ch]
bookinternal.h
sharedbook.c
decode the first N bits of a huffman word in one step via table
look up.
The huffman decoding could be much more efficient (i.e., no
decode tree necessary -> saves a lot of cache, and decoding
time O(log log N) instead of O(log N), where N is alphabet
size), if the huffman tree would be left (or right; I prefer
left) aligned. Ask me for pointers if you need convincing.
The code I submit now could be more clean, I know. Seems to
work though. Weird.
unrolled && rerolled the decodevs loops.
envelope.c
if (fabs(...) < min) creates horrible assembler (gcc 2.95, x86),
so changed to if (... < min && ... > -min). muchos faster.
lsp.c
put the fromdB() before linearmap
cales.h
todB_nn() for non-negative values. fabs() is horror.
Added some prefixes to pack(), inverse(), et. al. (i.e., time0_pack() etc.)
Think I still forgot some.
I don't think you'll want to apply all of this, oh, especially not the
debug output :-).
Have some fun,
Segher
<HR NOSHADE>
<UL>
<LI>text/plain attachment: t/v
</UL>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v
Type: application/octet-stream
Size: 24344 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20000828/91cdec84/v.obj
More information about the Vorbis-dev
mailing list