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

Monty xiphmont at xiph.org
Wed Sep 4 23:35:00 PDT 2002



On Wed, Sep 04, 2002 at 08:56:55PM -0400, Nicolas Pitre wrote:

> However Tremor currently has some drawbacks over my version.  First it is a
> bit slower.

There's less assembly in Tremor right now.  However, Tremor avoids a
number of big buffer copies the FullPlay code did not.  How did you
evaluate 'a little slower'?  I'd have expected it to be roughly equal
(and naturally, more of it needs to be optimized/ASM-ized).

> It also has a much much larger memory footprint.

It has a much larger text segment, but a much smaller heap footprint.
In embedded designs, where memory is a concern, heap tends to be a
much tighter commodity than flash/ROM.  This naturally depends on the
architecture.

Overall memory usage is about 1/2 - 2/3 of the original fixed point
port that iObjects did.  The big hit- codebook usage- is less than a
third of the FullPlay code.

>  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.

This doesn't solve the size issue, it just pushes it to somewhere
else.  It also increases startup time and requires trigonometry
approximations I prefer to avoid.

The final memory usage is the same and now you've also introduced
additional initialization latency that can contribute to hiccups
between logical segments.  Not alot, it's true, but it's a bad place
to be making things slower.

> 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.

The proper thing to do here is eliminate the need for most of that
table entirely, not move it to dynamic allocation.  Currently,
Tremor's MDCT table contains some easy-to-eliminate redundancy. Some
harder work would eliminate the table almost entirely.

> 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.

Actually, you've just shifted the order of magnitude.  RAM usage
increases by the amount of static memory you've eliminated.

Monty
--- >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