• Justin Ruggles's avatar
    lavr: handle clipping in the float to s32 conversion · 10e645e9
    Justin Ruggles authored
    We cannot clip to INT_MAX because that value cannot be exactly
    represented by a float value and ends up overflowing during conversion
    anyway. We need to use a slightly smaller float value, which ends up
    with slightly inaccurate results for samples which clip or nearly clip,
    but it is close enough. Using doubles as intermediates in the conversion
    would be more accurate, but it takes about twice as much time.
    Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
    10e645e9
Name
Last commit
Last update
..
arm Loading commit data...
x86 Loading commit data...
Makefile Loading commit data...
audio_convert.c Loading commit data...
audio_convert.h Loading commit data...
audio_data.c Loading commit data...
audio_data.h Loading commit data...
audio_mix.c Loading commit data...
audio_mix.h Loading commit data...
audio_mix_matrix.c Loading commit data...
avresample-test.c Loading commit data...
avresample.h Loading commit data...
internal.h Loading commit data...
libavresample.v Loading commit data...
options.c Loading commit data...
resample.c Loading commit data...
resample.h Loading commit data...
resample_template.c Loading commit data...
utils.c Loading commit data...
version.h Loading commit data...