diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-12 15:46:53 -0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-10-13 12:34:34 +0200 |
commit | 10e645e9cb06dc87074232740d4366db18e7ba56 (patch) | |
tree | bbb634ed7150d0d959c203e1881569f1ea809960 /libavcodec/arm/h264pred_init_arm.c | |
parent | 92281850a2d878dae1d50e271886ba87013b6ff3 (diff) | |
download | ffmpeg-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/arm/h264pred_init_arm.c')
0 files changed, 0 insertions, 0 deletions