annotate arm/vp3dsp_neon.S @ 9882:7b58b1410f48 libavcodec

Make documentation better match the code. Now AVCodecContext.sample_fmt is used. Patch by Brian Crowell <($firstname)@fluggo.com>
author vitor
date Tue, 23 Jun 2009 18:17:15 +0000
parents feaf99ca99a6
children 2c1c28f26a27
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9693
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
1 /*
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
2 * Copyright (c) 2009 David Conrad
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
3 *
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
4 * This file is part of FFmpeg.
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
5 *
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
10 *
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
14 * Lesser General Public License for more details.
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
15 *
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
19 */
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
20
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
21 #include "asm.S"
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
22
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
23 .macro vp3_loop_filter
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
24 vsubl.u8 q3, d18, d17
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
25 vsubl.u8 q2, d16, d19
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
26 vadd.i16 q1, q3, q3
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
27 vadd.i16 q2, q2, q3
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
28 vadd.i16 q0, q1, q2
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
29 vrshr.s16 q0, q0, #3
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
30 vmovl.u8 q9, d18
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
31 vdup.u16 q15, r2
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
32
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
33 vabs.s16 q1, q0
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
34 vshr.s16 q0, q0, #15
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
35 vqsub.u16 q2, q15, q1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
36 vqsub.u16 q3, q2, q1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
37 vsub.i16 q1, q2, q3
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
38 veor q1, q1, q0
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
39 vsub.i16 q0, q1, q0
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
40
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
41 vaddw.u8 q2, q0, d17
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
42 vsub.i16 q3, q9, q0
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
43 vqmovun.s16 d0, q2
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
44 vqmovun.s16 d1, q3
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
45 .endm
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
46
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
47 function ff_vp3_v_loop_filter_neon, export=1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
48 sub ip, r0, r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
49 sub r0, r0, r1, lsl #1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
50 vld1.64 {d16}, [r0,:64], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
51 vld1.64 {d17}, [r0,:64], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
52 vld1.64 {d18}, [r0,:64], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
53 vld1.64 {d19}, [r0,:64], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
54 ldrb r2, [r2, #129*4]
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
55
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
56 vp3_loop_filter
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
57
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
58 vst1.64 {d0}, [ip,:64], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
59 vst1.64 {d1}, [ip,:64], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
60 bx lr
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
61 .endfunc
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
62
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
63 function ff_vp3_h_loop_filter_neon, export=1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
64 sub ip, r0, #1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
65 sub r0, r0, #2
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
66 vld1.32 {d16[]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
67 vld1.32 {d17[]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
68 vld1.32 {d18[]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
69 vld1.32 {d19[]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
70 vld1.32 {d16[1]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
71 vld1.32 {d17[1]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
72 vld1.32 {d18[1]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
73 vld1.32 {d19[1]}, [r0], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
74 ldrb r2, [r2, #129*4]
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
75
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
76 vtrn.8 d16, d17
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
77 vtrn.8 d18, d19
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
78 vtrn.16 d16, d18
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
79 vtrn.16 d17, d19
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
80
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
81 vp3_loop_filter
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
82
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
83 vtrn.8 d0, d1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
84
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
85 vst1.16 {d0[0]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
86 vst1.16 {d1[0]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
87 vst1.16 {d0[1]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
88 vst1.16 {d1[1]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
89 vst1.16 {d0[2]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
90 vst1.16 {d1[2]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
91 vst1.16 {d0[3]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
92 vst1.16 {d1[3]}, [ip], r1
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
93 bx lr
feaf99ca99a6 ARM: actually add VP3 loop filter
conrad
parents:
diff changeset
94 .endfunc