[FFmpeg-devel] [PATCH] AAC encoder: refactor to resynchronize MIPS port

Michael Niedermayer michaelni at gmx.at
Tue Sep 15 13:11:09 CEST 2015


On Tue, Sep 15, 2015 at 04:24:02AM -0300, Claudio Freire wrote:
> This patch refactors the AAC coders to reuse code
> between the MIPS port and the regular, portable C code.
> There were two main functions that had to use
> hand-optimized versions of quantization code:
>  - search_for_quantizers_twoloop
>  - codebook_trellis_rate
> 
> Those two were split into their own template header
> files so they can be inlined inside both the MIPS port
> and the generic code. In each context, they'll link
> to their specialized implementations, and thus be
> optimized by the compiler.
> 
> This approach I believe is better than maintaining
> several copies of each function. As past experience has
> proven, having to keep those in sync was error prone.
> In this way, they will remain in sync by default.
> 
> Also, an implementation of the reconstructed output
> argument for the optimized quantize_and_encode
> functions is included in the patch. While the current
> implementation of search_for_pred still isn't using
> it, future iterations of main prediction probably will.
> It should not imply any measurable performance hit while
> not being used.
> 
> 
> Patch attached.
> 
> I thought it was worth a review.
> 
> It does include lots of copypaste.
> 
> FTR, I tested MIPS 74Kf and x86_64 with make fate-aac

full fate passes on qemu mips here as well!

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150915/e4cf64e4/attachment.sig>


More information about the ffmpeg-devel mailing list