Statistics
| Branch: | Revision:

ffmpeg / libavcodec / arm / ac3dsp_arm.S @ aa05f212

History | View | Annotate | Download (1.72 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_compute_mantissa_size_arm, export=1
24
        push            {r4-r8,lr}
25
        ldm             r0,  {r4-r8}
26
        mov             r3,  r0
27
        mov             r0,  #0
28
1:
29
        ldrb            lr,  [r1], #1
30
        subs            r2,  r2,  #1
31
        blt             2f
32
        cmp             lr,  #4
33
        bgt             3f
34
        subs            lr,  lr,  #1
35
        addlt           r4,  r4,  #1
36
        addeq           r5,  r5,  #1
37
        ble             1b
38
        subs            lr,  lr,  #2
39
        addlt           r6,  r6,  #1
40
        addeq           r7,  r7,  #1
41
        addgt           r8,  r8,  #1
42
        b               1b
43
3:
44
        cmp             lr,  #14
45
        sublt           lr,  lr,  #1
46
        addgt           r0,  r0,  #16
47
        addle           r0,  r0,  lr
48
        b               1b
49
2:
50
        stm             r3,  {r4-r8}
51
        pop             {r4-r8,pc}
52
endfunc