• Andreas Rheinhardt's avatar
    avcodec/aacenc_quantization: Deduplicate quantization functions · 57d30520
    Andreas Rheinhardt authored
    Up until now, there were four copies of
    quantize_and_encode_band_cost_(ZERO|[SU]QUAD|[SU]PAIR|ESC|NONE|NOISE|STEREO)
    (namely in aaccoder.o, aacenc_is.o, aacenc_ltp.o, aacenc_pred.o).
    As 43b378a0 says, this is meant to
    enable more optimizations.
    
    Yet neither GCC nor Clang performed such optimizations: The functions
    in the aforementioned files are not optimized according to
    the specifics of the calls in the respective file. Therefore
    duplicating them is a waste of space; this commit therefore stops doing
    so. The remaining copy is placed into aaccoder.c (which is the only
    place where the "round to zero" variant of quantize_and_encode_band()
    is used, so that this can be completely internal to aaccoder.c).
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    57d30520
aacenc_quantization.h 2.49 KB