Cheng Rong
2007-Jul-24 18:57 UTC
[Speex-dev] Speex optimization and 12 bits conversion for 12 bits ADC
Hi, all, I am porting speex on ARM7TDMI, I have done some optimization, the result is that the encoder and decoder need about 60 MCPS for 5.96kbps bitrate and complexity 0. Can someone give me informtion about Speex optimization on ARM7? Another question, my ADC and DAC are 12 bits, but Speex codec is 16bits, Did someone try to modify speex to 12 bits? I think if I modify speex to 12 bits, the computation power will be reduced, is it right? and If it's feasible, How can I do? My application is wireless, for 12bits ADC, which bitrate is siutable for wireless application, 5.95kbps or 8kpbs? Any suggestions or comments will be appreciated, thanks. Best Regards, Cheng Rong
Jean-Marc Valin
2007-Jul-24 19:17 UTC
[Speex-dev] Speex optimization and 12 bits conversion for 12 bits ADC
> I am porting speex on ARM7TDMI, I have done some optimization, the > result is that the encoder and decoder need about 60 MCPS for 5.96kbps > bitrate and complexity 0. Can someone give me informtion about Speex > optimization on ARM7?That's quite good. A few suggestions here: 1) Don't use complexity 0 unless you're really desperate (the CPU gain over complexity 1 is marginal and there's a cost in quality) 2) Have you enabled the current ARM4 assembly bits? 3) There are a couple functions that could definitely benefit from assembly optimisations. They used to be optimised for AMR4, but I had to remove that when I optimised the C version. Those are filter_mem16(), iir_mem16() and fir_mem16(). Let me know if you're going to do that because the best way to do it is not to start from the current C code.> Another question, my ADC and DAC are 12 bits, but Speex codec is > 16bits, Did someone try to modify speex to 12 bits? I think if I > modify speex to 12 bits, the computation power will be reduced, is it > right?Wrong. Speex would still need 16 bits internally. I also recommend you only shift by 3 so that you're sure never to have clipping problems at 16 bits.> and If it's feasible, How can I do? My application is wireless, > for 12bits ADC, which bitrate is siutable for wireless application, > 5.95kbps or 8kpbs?You tell me. The higher the bit-rate, the higher the quality, so it depends on what you can afford in terms of bandwidth. Jean-Marc
Cheng Rong
2007-Jul-25 01:27 UTC
[Speex-dev] Speex optimization and 12 bits conversion for 12 bits ADC
Hi?Jean-Marc? Thanks for your suggestions very much!> > I am porting speex on ARM7TDMI, I have done some optimization, the > > result is that the encoder and decoder need about 60 MCPS for 5.96kbps > > bitrate and complexity 0. Can someone give me informtion about Speex > > optimization on ARM7? > > That's quite good. A few suggestions here: > 1) Don't use complexity 0 unless you're really desperate (the CPU gain > over complexity 1 is marginal and there's a cost in quality) > 2) Have you enabled the current ARM4 assembly bits? > 3) There are a couple functions that could definitely benefit from > assembly optimisations. They used to be optimised for AMR4, but I had to > remove that when I optimised the C version. Those are filter_mem16(), > iir_mem16() and fir_mem16(). Let me know if you're going to do that > because the best way to do it is not to start from the current C code. >Yes, I have enabled the the current ARM4 assembly bits. I have tried to optimize these functions(filter_mem16(),iir_mem16() and fir_mem16()) in C code, but the effect is very small, and I am going to do assembly optimization for these functions. Do you have another C code about these functions for assembly optimisations? Can you give me some information and suggestions?> > Another question, my ADC and DAC are 12 bits, but Speex codec is > > 16bits, Did someone try to modify speex to 12 bits? I think if I > > modify speex to 12 bits, the computation power will be reduced, is it > > right? > > Wrong. Speex would still need 16 bits internally. I also recommend you > only shift by 3 so that you're sure never to have clipping problems at > 16 bits. >My ADC is 12 bits, and the data from 12 bits ADC just has 12-bit accuracy, means that I need fill the low 4 bit with zero to make the input data is 16 bit, I means that Some computation may be simplified so that to reduce computation power because the just 12 bit is useful. And the DAC is also 12 bit, it means that I just need the high 12 bit and discard the low 4 bit after decoer? Thanks. Best Regards, Cheng Rong
Seemingly Similar Threads
- Speex optimization and 12 bits conversion for 12 bits ADC
- Speex optimization and 12 bits conversion for 12 bits ADC
- fir_mem16,iir_mem16 and filter_mem16 optimisations
- fir_mem16,iir_mem16 and filter_mem16 optimisations
- Resampler saturation, blackfin performance