1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-08 18:35:45 +02:00
Commit Graph

4 Commits

Author SHA1 Message Date
Claudio Freire
8df9bf8e39 AAC encoder: refactor to resynchronize MIPS port
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 dequantized 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.
2015-09-16 23:14:26 -03:00
Rostislav Pehlivanov
7adb6d5aab aacenc_quantization: replace copysign() with a ternary operator
This commit removes the last thing a Windows environment can
complain about the AAC encoder code. Leftover from an old revision.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-08-22 08:50:41 +01:00
Timothy Gu
d4401a9e0d aacenc: Harmonize multiple inclusion guards
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
2015-08-22 04:56:36 +01:00
Rostislav Pehlivanov
43b378a0d3 aaccoder: move the quantization functions to a separate file
This commit moves the quantizer to a separate header file.
This allows the quantizer to be used from a separate files outside
of aaccoder without having to put another function pointer and will
result in a slight speedup as the compiler can do more optimizations.

This is required for commits following.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-08-21 18:53:14 +01:00