Statistics
| Branch: | Revision:

ffmpeg / libavcodec / arm / ac3dsp_neon.S @ f4855a90

History | View | Annotate | Download (1.99 KB)

1
/*
2
 * Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
3
 *
4
 * This file is part of Libav.
5
 *
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.
10
 *
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.
15
 *
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
19
 */
20

    
21
#include "asm.S"
22

    
23
function ff_ac3_max_msb_abs_int16_neon, export=1
24
        vmov.i16        q0,  #0
25
        vmov.i16        q2,  #0
26
1:      vld1.16         {q1},     [r0,:128]!
27
        vabs.s16        q1,  q1
28
        vld1.16         {q3},     [r0,:128]!
29
        vabs.s16        q3,  q3
30
        vorr            q0,  q0,  q1
31
        vorr            q2,  q2,  q3
32
        subs            r1,  r1,  #16
33
        bgt             1b
34
        vorr            q0,  q0,  q2
35
        vorr            d0,  d0,  d1
36
        vpmax.u16       d0,  d0,  d0
37
        vpmax.u16       d0,  d0,  d0
38
        vmov.u16        r0,  d0[0]
39
        bx              lr
40
endfunc
41

    
42
function ff_ac3_exponent_min_neon, export=1
43
        cmp             r1,  #0
44
        bxeq            lr
45
        push            {lr}
46
        mov             r12, #256
47
1:
48
        vld1.8          {q0},     [r0,:128]
49
        mov             lr,  r1
50
        add             r3,  r0,  #256
51
2:      vld1.8          {q1},     [r3,:128], r12
52
        subs            lr,  lr,  #1
53
        vmin.u8         q0,  q0,  q1
54
        bgt             2b
55
        subs            r2,  r2,  #16
56
        vst1.8          {q0},     [r0,:128]!
57
        bgt             1b
58
        pop             {pc}
59
endfunc