aboutsummaryrefslogtreecommitdiffstats
path: root/libavresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-14 14:38:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-14 14:46:13 +0200
commit82c0055c5e71f2289936e6c2528bed5826c18c43 (patch)
treee4510e6a8cf751182378f293f7a8bc4f253c0097 /libavresample
parentdb51c65961bd692fc6ebb12c2f4183699d3db9c0 (diff)
parentb5198a2637b7b45b0049a1d4b386a06f016f2520 (diff)
downloadffmpeg-82c0055c5e71f2289936e6c2528bed5826c18c43.tar.gz
Merge commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520'
* commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520': configure: tms470: add mapping for -mfpu=vfpv3-d16 flag configure: recognise Minix as OS configure: work around bug in ash shell eval-test: make table static const lavr: handle clipping in the float to s32 conversion nut: support pcm codecs not mapped in avi Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavresample')
-rw-r--r--libavresample/x86/audio_convert.asm8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
index 2ebdbc1ec0..25166afff2 100644
--- a/libavresample/x86/audio_convert.asm
+++ b/libavresample/x86/audio_convert.asm
@@ -28,6 +28,7 @@ SECTION_RODATA 32
pf_s32_inv_scale: times 8 dd 0x30000000
pf_s32_scale: times 8 dd 0x4f000000
+pf_s32_clip: times 8 dd 0x4effffff
pf_s16_inv_scale: times 4 dd 0x38000000
pf_s16_scale: times 4 dd 0x47000000
pb_shuf_unpack_even: db -1, -1, 0, 1, -1, -1, 2, 3, -1, -1, 8, 9, -1, -1, 10, 11
@@ -197,17 +198,22 @@ cglobal conv_flt_to_s16, 3,3,5, dst, src, len
;------------------------------------------------------------------------------
%macro CONV_FLT_TO_S32 0
-cglobal conv_flt_to_s32, 3,3,5, dst, src, len
+cglobal conv_flt_to_s32, 3,3,6, dst, src, len
lea lenq, [lend*4]
add srcq, lenq
add dstq, lenq
neg lenq
mova m4, [pf_s32_scale]
+ mova m5, [pf_s32_clip]
.loop:
mulps m0, m4, [srcq+lenq ]
mulps m1, m4, [srcq+lenq+1*mmsize]
mulps m2, m4, [srcq+lenq+2*mmsize]
mulps m3, m4, [srcq+lenq+3*mmsize]
+ minps m0, m0, m5
+ minps m1, m1, m5
+ minps m2, m2, m5
+ minps m3, m3, m5
cvtps2dq m0, m0
cvtps2dq m1, m1
cvtps2dq m2, m2