Revision aa05f212

View differences:

libavcodec/arm/Makefile
1
OBJS-$(CONFIG_AC3DSP)                  += arm/ac3dsp_init_arm.o
1
OBJS-$(CONFIG_AC3DSP)                  += arm/ac3dsp_init_arm.o         \
2
                                          arm/ac3dsp_arm.o
3

  
2 4
OBJS-$(CONFIG_DCA_DECODER)             += arm/dcadsp_init_arm.o         \
3 5

  
4 6
ARMV6-OBJS-$(CONFIG_AC3DSP)            += arm/ac3dsp_armv6.o
libavcodec/arm/ac3dsp_arm.S
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
libavcodec/arm/ac3dsp_init_arm.c
34 34
                                     int snr_offset, int floor,
35 35
                                     const uint8_t *bap_tab, uint8_t *bap);
36 36

  
37
int ff_ac3_compute_mantissa_size_arm(int cnt[5], uint8_t *bap, int nb_coefs);
38

  
37 39
av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
38 40
{
41
    c->compute_mantissa_size     = ff_ac3_compute_mantissa_size_arm;
42

  
39 43
    if (HAVE_ARMV6) {
40 44
        c->bit_alloc_calc_bap    = ff_ac3_bit_alloc_calc_bap_armv6;
41 45
    }

Also available in: Unified diff