Revision 245c7831

View differences:

libavcodec/arm/ac3dsp_init_arm.c
25 25

  
26 26
void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
27 27
int ff_ac3_max_msb_abs_int16_neon(const int16_t *src, int len);
28
void ff_ac3_lshift_int16_neon(int16_t *src, unsigned len, unsigned shift);
29
void ff_ac3_rshift_int32_neon(int32_t *src, unsigned len, unsigned shift);
28 30

  
29 31
av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
30 32
{
31 33
    if (HAVE_NEON) {
32 34
        c->ac3_exponent_min      = ff_ac3_exponent_min_neon;
33 35
        c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_neon;
36
        c->ac3_lshift_int16      = ff_ac3_lshift_int16_neon;
37
        c->ac3_rshift_int32      = ff_ac3_rshift_int32_neon;
34 38
    }
35 39
}
libavcodec/arm/ac3dsp_neon.S
57 57
        bgt             1b
58 58
        pop             {pc}
59 59
endfunc
60

  
61
function ff_ac3_lshift_int16_neon, export=1
62
        vdup.16         q0,  r2
63
1:      vld1.16         {q1},     [r0,:128]
64
        vshl.s16        q1,  q1,  q0
65
        vst1.16         {q1},     [r0,:128]!
66
        subs            r1,  r1,  #8
67
        bgt             1b
68
        bx              lr
69
endfunc
70

  
71
function ff_ac3_rshift_int32_neon, export=1
72
        rsb             r2,  r2,  #0
73
        vdup.32         q0,  r2
74
1:      vld1.32         {q1},     [r0,:128]
75
        vshl.s32        q1,  q1,  q0
76
        vst1.32         {q1},     [r0,:128]!
77
        subs            r1,  r1,  #4
78
        bgt             1b
79
        bx              lr
80
endfunc

Also available in: Unified diff