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

Claudio Freire klaussfreire at gmail.com
Fri Sep 18 23:29:35 CEST 2015


On Fri, Sep 18, 2015 at 3:10 PM, James Almer <jamrial at gmail.com> wrote:
> On 9/15/2015 4:24 AM, 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.
>
> This broke make checkheaders, since the new headers are purposely
> missing functions like abs_pow34_v() when compiled standalone.
> http://fate.ffmpeg.org/log.cgi?time=20150918161151&log=compile&slot=x86_64-archlinux-gcc-checkheaders

I wasn't aware of checkheaders.

I'll add it to skipheaders.


More information about the ffmpeg-devel mailing list