aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/proresdsp_init.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-10-12 15:46:53 -0400
committerLuca Barbato <lu_zero@gentoo.org>2012-10-13 12:34:34 +0200
commit10e645e9cb06dc87074232740d4366db18e7ba56 (patch)
treebbb634ed7150d0d959c203e1881569f1ea809960 /libavcodec/x86/proresdsp_init.c
parent92281850a2d878dae1d50e271886ba87013b6ff3 (diff)
downloadffmpeg-10e645e9cb06dc87074232740d4366db18e7ba56.tar.gz
lavr: handle clipping in the float to s32 conversion
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: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/x86/proresdsp_init.c')
0 files changed, 0 insertions, 0 deletions