[tremor] [PATCH] significantly reduce Tremor ROM size requirement

Nicolas Pitre nico at cam.org
Wed Sep 4 17:56:55 PDT 2002



Since Tremor is now freely available, I'll rather devote some time to it and
drop my own fixed point version of the Ogg Vorbis decoder.  Even if my
version worked for me, it was still a quick hack applied to the floating
point vorbis library and still couldn't pretend to be fully Vorbis
compliant.

However Tremor currently has some drawbacks over my version.  First it is a
bit slower.  It also has a much much larger memory footprint.  I don't know
how much improvement can be done to the performance yet, but the size issue
can be solved and I produced a patch for that.

The idea is to get rid of all those big static arrays in the window and mdct
code since all possible configurations are currently statically preallocated
and therefore bloating the library text.  Instead, only the required tables
can be created dynamically at runtime, just like with the floating point
version of the Vorbis library, without significant CPU usage.  RAM usage
will be slightly increased but still be much less than the removed ROM size
by an order of magnitude.

Numbers:

   text    data     bss     dec     hex filename
  47095  127176    4160  178431   2b8ff ivorbisfile_example.orig
  47735    4892    4160   56787    ddd3 ivorbisfile_example.patched

Yes, a 68% size reduction!

The patch is too big to be sent in attachment here, so I made it available 
at ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/vorbis/ as 
Tremor.diff.gz.  Here's the diffstat output:

 Makefile.am      |    4
 block.c          |   22
 codec_internal.h |    1
 floor0.c         |    7
 mapping0.c       |    2
 mdct.c           |  120 -
 mdct.h           |   26
 mdct_lookup.h    | 6185 -------------------------------------------------------
 sincos_lookup.c  |   55
 sincos_lookup.h  |   49
 window.c         | 2102 ------------------
 11 files changed, 211 insertions(+), 8362 deletions(-)

Can this patch be applied to the CVS?

<p>Nicolas

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list