• Rostislav Pehlivanov's avatar
    aacenc_is: add a flag to use pure coefficients instead · 4565611b
    Rostislav Pehlivanov authored
    This commit adds a flag to use the pure coefficients instead
    of the processed ones (sce->coeffs). This is needed because
    IS will apply the changes to the coefficients immediately
    before the adjust_common_prediction function and it doesn't
    make sense to measure stereo channel coefficient difference
    when one of the channels coefficients are all zero.
    
    Therefore add a flag to use pure coefficients in that case.
    TNS is the only thing touching the coefficients before IS
    so common window prediction will not take that into account
    but the effect of the TNS filter per coefficient can be small
    (a few percent) so to some approximation it's fine to just
    ignore that.
    
    Also fixed a small error which doesn't alter the results
    that much. pow(sqrt(number), 3.0/4.0) == pow(number, 3.0/8.0) !=
    pow(number, 3.0/4.0).
    Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
    4565611b
aacenc_is.h 1.74 KB