Skip to main content

Topic: improvement of FixNoise in FAAC using FIR library (Read 1160 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • wfrabbit
  • [*]
improvement of FixNoise in FAAC using FIR library
Hi everyone,

I am porting the FAAC encoding process on an embedded system. Due to the limitation of our CPU, the original encoding rate of FAAC is too slow to meet our requirements. After replacing some math functions with ARM DSP library, we successfully saved roughly half the encoding time. However, we can't go further since currently most of the encoding time is used in the FixNoise function. I am not quite sure what is idea in this FixNoise function. But it looks like some kind of filtering noise? So my question is: is it possible to use FIR library, e.g, the FIR library provided by ARM, to reduce the time used in this FixNoise function? Or does anyone here have some suggestions about the further improvement? Thank you very much.

Regards,
Robbie.

  • Destroid
  • [*][*][*][*][*]
Re: improvement of FixNoise in FAAC using FIR library
Reply #1
Which version of the FAAC code is being ported? Just wondering since all I could find was the endless-loop bug, which supposed was fixed a long time ago. https://sourceforge.net/p/faac/bugs/60/
"Something bothering you, Mister Spock?"

  • wfrabbit
  • [*]
Re: improvement of FixNoise in FAAC using FIR library
Reply #2
Which version of the FAAC code is being ported? Just wondering since all I could find was the endless-loop bug, which supposed was fixed a long time ago. https://sourceforge.net/p/faac/bugs/60/

Dear Destroid,

Thank you for your reply. I am using FAAC 1.28. I am not saying there is a bug in this function, but I am curious whether there are some methods to reduce the time cost in this function. This FixNoise function costs more than 20ms to encode 1 frame on our platform, which use a cortex m7 MCU.

WangFeng

  • saratoga
  • [*][*][*][*][*]
Re: improvement of FixNoise in FAAC using FIR library
Reply #3
That function does not look like an FIR filter to me.  Have you profiled it to see where you spend most of your runtime? 

  • wfrabbit
  • [*]
Re: improvement of FixNoise in FAAC using FIR library
Reply #4
That function does not look like an FIR filter to me.  Have you profiled it to see where you spend most of your runtime? 

Thanks for your reply. After reviewing some papers about this part, I think you are right and it does not look like FIR. The "calcdist:" section costs most of the time in this function. I think this may be caused by calling many times of the "goto calcdist".  Do you have any suggestions?

Robbie

  • saratoga
  • [*][*][*][*][*]
Re: improvement of FixNoise in FAAC using FIR library
Reply #5
The "calcdist:" section costs most of the time in this function. I think this may be caused by calling many times of the "goto calcdist".

Makes sense, that is most of the function.

  Do you have any suggestions?

There are a lot of loops over double precision values.  Does you M7 have hardware double precision support?  If not, that is going to be extremely slow.  If you do, it will probably be only very slow.  Changing those loops to single precision is an obvious first step. 

  • wfrabbit
  • [*]
Re: improvement of FixNoise in FAAC using FIR library
Reply #6
The "calcdist:" section costs most of the time in this function. I think this may be caused by calling many times of the "goto calcdist".

Makes sense, that is most of the function.

  Do you have any suggestions?

There are a lot of loops over double precision values.  Does you M7 have hardware double precision support?  If not, that is going to be extremely slow.  If you do, it will probably be only very slow.  Changing those loops to single precision is an obvious first step. 

Thanks for you patience. To use the ARM DSP library API, I have already changed some data type to float. I will try to replace other double precision with single precision. But my concern is: is there some drawbacks of using single precision, say maybe it is not accurate enough?

Robbie.