2 * ARM NEON optimised integer operations
3 * Copyright (c) 2009 Kostya Shishkov
5 * This file is part of FFmpeg.
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "libavutil/arm/asm.S"
24 @ scalarproduct_and_madd_int16(/*aligned*/v0,v1,v2,order,mul)
25 function ff_scalarproduct_and_madd_int16_neon, export=1
26 vld1.16 {d28[],d29[]}, [sp]
33 1: vld1.16 {d16-d17}, [r0,:128]!
34 vld1.16 {d18-d19}, [r1]!
35 vld1.16 {d20-d21}, [r2]!
36 vld1.16 {d22-d23}, [r0,:128]!
37 vld1.16 {d24-d25}, [r1]!
38 vld1.16 {d26-d27}, [r2]!
39 vmul.s16 q10, q10, q14
40 vmul.s16 q13, q13, q14
41 vmlal.s16 q0, d16, d18
42 vmlal.s16 q1, d17, d19
44 vadd.s16 q13, q11, q13
45 vmlal.s16 q2, d22, d24
46 vmlal.s16 q3, d23, d25
47 vst1.16 {q10}, [r12,:128]!
49 vst1.16 {q13}, [r12,:128]!
56 vpadd.s32 d0, d16, d17
57 vpadd.s32 d1, d18, d19