2
* Copyright (c) 2008 Siarhei Siamashka <ssvb@users.sourceforge.net>
4
* This file is part of Libav.
6
* Libav is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
11
* Libav is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with Libav; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27
* ARM VFP optimized float to int16 conversion.
28
* Assume that len is a positive number and is multiple of 8, destination
29
* buffer is at least 4 bytes aligned (8 bytes alignment is better for
30
* performance), little endian byte sex
32
@ void ff_float_to_int16_vfp(int16_t *dst, const float *src, int len)
33
function ff_float_to_int16_vfp, export=1
51
vldmiagt r1!, {s16-s23}
56
pkhbt r3, r3, r4, lsl #16
57
pkhbt r4, r5, r6, lsl #16
58
vcvtgt.s32.f32 s0, s16
59
vcvtgt.s32.f32 s1, s17
60
vcvtgt.s32.f32 s2, s18
61
vcvtgt.s32.f32 s3, s19
62
vcvtgt.s32.f32 s4, s20
63
vcvtgt.s32.f32 s5, s21
64
vcvtgt.s32.f32 s6, s22
65
vcvtgt.s32.f32 s7, s23
70
pkhbt r5, r7, r8, lsl #16
71
pkhbt r6, ip, lr, lsl #16