[Tremor] How lowmem is Tremor lowmem?
Morten.Heiberg at nokia.com
Morten.Heiberg at nokia.com
Tue Sep 14 05:43:12 PDT 2004
Hi all
I am currently doing some experiments with the Tremor lowmem branch. I was a bit
surprised to see it use around 40 kB of RAM for playback.
Are these 40 kB consistent with the results other people are getting?
Are there any good ways to tweak either the decoder or encoder to lower RAM usage
for the decoder? I have complete control over the files that will be passed to
the decoder, so encoder hacks are also useful.
I have made two Vorbis files in 40.0 kHz mono using the 1.0.1 oggenc encoder:
Sample 1:
---------
Average bitrate: 33.5 kbps
Windows used in the decoder: vwin4096 and vwin512
Floor: 1
Sample 2:
---------
Average bitrate: 113.3 kbps
Windows used in the decoder: vwin2048 and vwin256
Floor: 1
Not surprisingly I see that the memory usage depends on the bitrate (well, on
the window size), but it remains (IMO) rather high. Here are the biggest culprits
in terms of allocations during decoding:
framing.c: 6.5 kB
codebook.c: 15.8 kB
vorbisfile.c: 15.0 kB (for sample 1)
9.5 kB (for sample 2)
Add to this 5.6 kB of alloca() storage (which I have moved to the heap) and the
rest of the allocations and I get
38.2 kB heap (plus 5.6 kB of alloca) for sample 1
32.9 kB heap (plus 5.6 kB of alloca) for sample 2
Can this be improved with tweaking some settings or is it unrealistic to expect
much lower RAM usage? I remember reading something about 9 kB for the codebooks
and 10-16 kB for the rest, but given these results that seems a long way away.
I also observed some memory leaks in framing.c, but fixing these (thanks
Roland! http://lists.xiph.org/pipermail/tremor/2004-April/000965.html) did not
reduce the total amount of allocations.
Any advice would be greatly appreciated! I really hope to be able to fit the
Tremor decoder to what I'm doing.
Best regards
Morten Heiberg
More information about the Tremor
mailing list