]> git.sesse.net Git - ffmpeg/blob - libavcodec/arm/fmtconvert_neon.S
Merge commit '87de6ddb7b7674e329d5c96677bd8685bc7f7855'
[ffmpeg] / libavcodec / arm / fmtconvert_neon.S
1 /*
2  * ARM NEON optimised Format Conversion Utils
3  * Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
4  *
5  * This file is part of FFmpeg.
6  *
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.
11  *
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.
16  *
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
20  */
21
22 #include "config.h"
23 #include "libavutil/arm/asm.S"
24
25 function ff_int32_to_float_fmul_scalar_neon, export=1
26 VFP     vdup.32         q0,  d0[0]
27 VFP     len     .req    r2
28 NOVFP   vdup.32         q0,  r2
29 NOVFP   len     .req    r3
30
31         vld1.32         {q1},[r1,:128]!
32         vcvt.f32.s32    q3,  q1
33         vld1.32         {q2},[r1,:128]!
34         vcvt.f32.s32    q8,  q2
35 1:      subs            len, len, #8
36         pld             [r1, #16]
37         vmul.f32        q9,  q3,  q0
38         vmul.f32        q10, q8,  q0
39         beq             2f
40         vld1.32         {q1},[r1,:128]!
41         vcvt.f32.s32    q3,  q1
42         vld1.32         {q2},[r1,:128]!
43         vcvt.f32.s32    q8,  q2
44         vst1.32         {q9}, [r0,:128]!
45         vst1.32         {q10},[r0,:128]!
46         b               1b
47 2:      vst1.32         {q9}, [r0,:128]!
48         vst1.32         {q10},[r0,:128]!
49         bx              lr
50         .unreq  len
51 endfunc