[Speex-dev] Attempting to shrink speex: Are these
Michael.Jacobson at ultratec.com
Tue Aug 7 06:12:35 PDT 2007
I'm glad to hear that my data size can be shrunk considerably, however I do not know the minimum values that I would set the static arrays to be. I hate to be a bother but could you tell me the minimum values for these arrays/structures in the state structure? Thanks!
>>> Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> 08/06/07 7:04 PM >>>
Last thing. All the codebooks are stored as tables of char, so you're
probably wasting a lot of space from the fact that chars on C5x are
16-bit long. You might be able to pack the values in one 16-bit value
and unpack in the code. As for the memory allocation in the encoder, the
best is to use C99 variable-size arrays (VAR_ARRAYS) or alloca
(USE_ALLOCA). Otherwise, you can make the static array much smaller. For
8 kbps, the total RAM requirement (not counting code or static tables)
should be around 4 kB (2 kWords).
Michael Jacobson a écrit :
> I am using speex 1.2beta2 on a narrowband 16-bit, 8khz system that has
> a severe program space problem and will not fit speex in its normal
> operation. In an attempt to shrink speex I placed a breakpoint in every
> function and ran a decode and encode and removed the breakpoints that I
> hit. in the functions that had a breakpoint that I didn't hit I
> commented out those functions (as well as some functions that I know I
> won't hit).
> I am aware that some of these functions are only not called because I
> don't do a GET_ in the ctl functions or don't use ALLOC to initialize
> the bit buffer, but some of these I am not entirely sure why they would
> or would not be used. I would like to know if they are just rarely
> called functions and that I could be breaking the codec by removing them
> or if all that I removed is just fine.
> I did get a .patch file from Jim Crichton as well to shrink nb_celp,
> but is there anything else I can do to shrink the code or am I reaching
> my limit? Thanks.
> these are the functions that I removed:
> In bits.c:
> In cd_search.c:
> In filters.c:
> In ltp.c:
> In math_approx.c:
> In nb_celp.c:
> In quant_lsp.c:
> In speex.c:
> In speex_callbacks.c:
> In vbr.c:
> In vq.c:
> Speex-dev mailing list
> Speex-dev at xiph.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Speex-dev