[FFmpeg-devel] [PATCH 2/3] mips: optimization for float aac decoder (sbr module)

Michael Niedermayer michaelni at gmx.at
Sun Feb 10 03:32:38 CET 2013

On Fri, Feb 08, 2013 at 02:38:26PM +0000, Babic, Nedeljko wrote:
> >On Wed, Feb 06, 2013 at 03:10:47PM +0000, Babic, Nedeljko wrote:
> >> Hi,
> >> 
> >> Is this patch ok, or something more should be done with it?
> >
> >Iam a bit concerned about maintainability of the way the
> >optimizations are integrated into the codec.
> >
> >normally optimization are done by having a struct of function pointers
> >each function pointer has a clear specification on what it does. And
> >that what it does is a small and relatively atomic operation, like
> >calculating the dot product of the specified vector length of 2
> >given float arrays.
> >
> >what this and the other aac patch do in part at least though is they
> >simply replace whole high level functions taking a pointer to the
> >aac context.
> I am not quite sure what do you suggest here.
> Some optimizations were done on higher level indeed, but it was done in 
> order to better optimize code. For example in function sbr_qmf_synthesis
> 10 calls of function vector_fmul_add are merged into one loop and loop 
> is unrolled 4 times which enabled more efficient access to memory and 
> minimized function call overhead. I can see the problem with 
> maintainability of such code, but the question is where to draw a line 
> between maximizing optimization and maintainability of code.
> Of course we can rewrite this and similar optimizations to be done on 
> lover level (for example by optimizing only vector_fmul_add in above case) 
> if this is what is requested but then we will slightly loose on performance.

ultimately its up to you, as you will probably have to do the work
if someones changes break the mips code.
I certainly prefer higher performance too ...


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130210/a51ae88a/attachment.asc>

More information about the ffmpeg-devel mailing list