• Rostislav Pehlivanov's avatar
    aaccoder: add frequency scaling and quantization correction for PNS · b6cc8ec7
    Rostislav Pehlivanov authored
    This commit once again improves the PNS implementation by scaling the
    thresholds with frequency. The thresholds get looser as the frequency
    increases since higher frequencies are basically noise to human ears.
    
    Also, this introduces quantization error correction for PNS. Should
    the error be too much, no PNS will be used. The energy_ratio is used
    to regulate the actual encoded PNS energy: if the generated PNS
    energy is higher than the energy from the psy system, energy_ratio
    is used to correct it so that hopefully once requantized and
    transmitted the value in the decoder will be closer to what the
    encoder has.
    Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
    b6cc8ec7
aaccoder.c 42.9 KB