2 * Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
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
21 #ifndef AVCODEC_ARM_DCA_H
22 #define AVCODEC_ARM_DCA_H
27 #if HAVE_NEON && HAVE_INLINE_ASM
29 #define int8x8_fmul_int32 int8x8_fmul_int32
30 static inline void int8x8_fmul_int32(float *dst, const int8_t *src, int scale)
32 __asm__ ("vcvt.f32.s32 %2, %2, #4 \n"
33 "vld1.8 {d0}, [%1,:64] \n"
37 "vcvt.f32.s32 q0, q0 \n"
38 "vcvt.f32.s32 q1, q1 \n"
39 "vmul.f32 q0, q0, %y2 \n"
40 "vmul.f32 q1, q1, %y2 \n"
41 "vst1.32 {q0-q1}, [%m0,:128] \n"
42 : "=Um"(*(float (*)[8])dst)
43 : "r"(src), "x"(scale)
44 : "d0", "d1", "d2", "d3");
49 #endif /* AVCODEC_ARM_DCA_H */