diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-01-27 15:20:43 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-01-28 00:07:35 +0000 |
commit | 9d06d7bce3babb82ed650c13ed13a57f6f626a71 (patch) | |
tree | 022760430dcd336114b22b841e8a0dcb51dbd62c /libavcodec/dsputil.c | |
parent | 97b04f5ed3ab3a62e57f0c16841fb8f10d0a174c (diff) | |
download | ffmpeg-9d06d7bce3babb82ed650c13ed13a57f6f626a71.tar.gz |
Remove the add bias hack for the C version of DSPContext.float_to_int16_*().
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 2ed0052977..03a5eeea45 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -3910,14 +3910,7 @@ static void vector_clipf_c(float *dst, const float *src, float min, float max, i } static av_always_inline int float_to_int16_one(const float *src){ - int_fast32_t tmp = *(const int32_t*)src; - if(tmp & 0xf0000){ - tmp = (0x43c0ffff - tmp)>>31; - // is this faster on some gcc/cpu combinations? -// if(tmp > 0x43c0ffff) tmp = 0xFFFF; -// else tmp = 0; - } - return tmp - 0x8000; + return av_clip_int16(lrintf(*src)); } void ff_float_to_int16_c(int16_t *dst, const float *src, long len){ |