annotate libmpeg2/motion_comp_arm_s.S @ 26903:5ed6787022c4

Merge vidix/dhahelperwin/Makefile into top-level Makefile.
author diego
date Fri, 30 May 2008 20:09:31 +0000
parents 62abac0c8637
children da2271c341ee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23236
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
1 @ motion_comp_arm_s.S
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
2 @ Copyright (C) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
3 @
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
4 @ This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
5 @ See http://libmpeg2.sourceforge.net/ for updates.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
6 @
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
7 @ mpeg2dec is free software; you can redistribute it and/or modify
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
8 @ it under the terms of the GNU General Public License as published by
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
9 @ the Free Software Foundation; either version 2 of the License, or
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
10 @ (at your option) any later version.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
11 @
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
12 @ mpeg2dec is distributed in the hope that it will be useful,
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
13 @ but WITHOUT ANY WARRANTY; without even the implied warranty of
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
14 @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
15 @ GNU General Public License for more details.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
16 @
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
17 @ You should have received a copy of the GNU General Public License
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
18 @ along with this program; if not, write to the Free Software
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
19 @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
20
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
21 .text
26283
62abac0c8637 cosmetics: Fix some typos and trailing whitespace in local changes.
diego
parents: 23236
diff changeset
22
23236
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
23 @ ----------------------------------------------------------------
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
24 .align
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
25 .global MC_put_o_16_arm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
26 MC_put_o_16_arm:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
27 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
28 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
29 stmfd sp!, {r4-r11, lr} @ R14 is also called LR
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
30 and r4, r1, #3
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
31 adr r5, MC_put_o_16_arm_align_jt
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
32 add r5, r5, r4, lsl #2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
33 ldr pc, [r5]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
34
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
35 MC_put_o_16_arm_align0:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
36 ldmia r1, {r4-r7}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
37 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
38 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
39 stmia r0, {r4-r7}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
40 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
41 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
42 bne MC_put_o_16_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
43 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
44
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
45 .macro PROC shift
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
46 ldmia r1, {r4-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
47 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
48 mov r9, r4, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
49 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
50 mov r10, r5, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
51 orr r9, r9, r5, lsl #(32-\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
52 mov r11, r6, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
53 orr r10, r10, r6, lsl #(32-\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
54 mov r12, r7, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
55 orr r11, r11, r7, lsl #(32-\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
56 orr r12, r12, r8, lsl #(32-\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
57 stmia r0, {r9-r12}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
58 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
59 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
60 .endm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
61
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
62 MC_put_o_16_arm_align1:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
63 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
64 1: PROC(8)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
65 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
66 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
67 MC_put_o_16_arm_align2:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
68 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
69 1: PROC(16)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
70 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
71 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
72 MC_put_o_16_arm_align3:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
73 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
74 1: PROC(24)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
75 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
76 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
77 MC_put_o_16_arm_align_jt:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
78 .word MC_put_o_16_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
79 .word MC_put_o_16_arm_align1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
80 .word MC_put_o_16_arm_align2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
81 .word MC_put_o_16_arm_align3
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
82
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
83 @ ----------------------------------------------------------------
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
84 .align
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
85 .global MC_put_o_8_arm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
86 MC_put_o_8_arm:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
87 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
88 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
89 stmfd sp!, {r4-r10, lr} @ R14 is also called LR
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
90 and r4, r1, #3
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
91 adr r5, MC_put_o_8_arm_align_jt
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
92 add r5, r5, r4, lsl #2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
93 ldr pc, [r5]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
94 MC_put_o_8_arm_align0:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
95 ldmia r1, {r4-r5}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
96 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
97 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
98 stmia r0, {r4-r5}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
99 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
100 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
101 bne MC_put_o_8_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
102 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
103
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
104 .macro PROC8 shift
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
105 ldmia r1, {r4-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
106 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
107 mov r9, r4, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
108 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
109 mov r10, r5, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
110 orr r9, r9, r5, lsl #(32-\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
111 orr r10, r10, r6, lsl #(32-\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
112 stmia r0, {r9-r10}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
113 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
114 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
115 .endm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
116
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
117 MC_put_o_8_arm_align1:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
118 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
119 1: PROC8(8)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
120 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
121 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
122
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
123 MC_put_o_8_arm_align2:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
124 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
125 1: PROC8(16)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
126 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
127 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
128
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
129 MC_put_o_8_arm_align3:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
130 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
131 1: PROC8(24)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
132 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
133 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
134
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
135 MC_put_o_8_arm_align_jt:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
136 .word MC_put_o_8_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
137 .word MC_put_o_8_arm_align1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
138 .word MC_put_o_8_arm_align2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
139 .word MC_put_o_8_arm_align3
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
140
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
141 @ ----------------------------------------------------------------
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
142 .macro AVG_PW rW1, rW2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
143 mov \rW2, \rW2, lsl #24
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
144 orr \rW2, \rW2, \rW1, lsr #8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
145 eor r9, \rW1, \rW2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
146 and \rW2, \rW1, \rW2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
147 and r10, r9, r12
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
148 add \rW2, \rW2, r10, lsr #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
149 and r10, r9, r11
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
150 add \rW2, \rW2, r10
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
151 .endm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
152
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
153 .align
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
154 .global MC_put_x_16_arm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
155 MC_put_x_16_arm:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
156 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
157 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
158 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
159 and r4, r1, #3
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
160 adr r5, MC_put_x_16_arm_align_jt
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
161 ldr r11, [r5]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
162 mvn r12, r11
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
163 add r5, r5, r4, lsl #2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
164 ldr pc, [r5, #4]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
165
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
166 .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
167 mov \R0, \R0, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
168 orr \R0, \R0, \R1, lsl #(32 - \shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
169 mov \R1, \R1, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
170 orr \R1, \R1, \R2, lsl #(32 - \shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
171 mov \R2, \R2, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
172 orr \R2, \R2, \R3, lsl #(32 - \shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
173 mov \R3, \R3, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
174 orr \R3, \R3, \R4, lsl #(32 - \shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
175 mov \R4, \R4, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
176 @ and \R4, \R4, #0xFF
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
177 .endm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
178
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
179 MC_put_x_16_arm_align0:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
180 ldmia r1, {r4-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
181 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
182 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
183 AVG_PW r7, r8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
184 AVG_PW r6, r7
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
185 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
186 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
187 stmia r0, {r5-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
188 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
189 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
190 bne MC_put_x_16_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
191 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
192 MC_put_x_16_arm_align1:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
193 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
194 1: ldmia r1, {r4-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
195 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
196 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
197 ADJ_ALIGN_QW 8, r4, r5, r6, r7, r8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
198 AVG_PW r7, r8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
199 AVG_PW r6, r7
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
200 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
201 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
202 stmia r0, {r5-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
203 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
204 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
205 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
206 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
207 MC_put_x_16_arm_align2:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
208 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
209 1: ldmia r1, {r4-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
210 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
211 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
212 ADJ_ALIGN_QW 16, r4, r5, r6, r7, r8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
213 AVG_PW r7, r8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
214 AVG_PW r6, r7
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
215 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
216 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
217 stmia r0, {r5-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
218 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
219 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
220 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
221 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
222 MC_put_x_16_arm_align3:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
223 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
224 1: ldmia r1, {r4-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
225 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
226 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
227 ADJ_ALIGN_QW 24, r4, r5, r6, r7, r8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
228 AVG_PW r7, r8
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
229 AVG_PW r6, r7
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
230 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
231 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
232 stmia r0, {r5-r8}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
233 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
234 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
235 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
236 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
237 MC_put_x_16_arm_align_jt:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
238 .word 0x01010101
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
239 .word MC_put_x_16_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
240 .word MC_put_x_16_arm_align1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
241 .word MC_put_x_16_arm_align2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
242 .word MC_put_x_16_arm_align3
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
243
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
244 @ ----------------------------------------------------------------
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
245 .align
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
246 .global MC_put_x_8_arm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
247 MC_put_x_8_arm:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
248 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
249 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
250 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
251 and r4, r1, #3
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
252 adr r5, MC_put_x_8_arm_align_jt
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
253 ldr r11, [r5]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
254 mvn r12, r11
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
255 add r5, r5, r4, lsl #2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
256 ldr pc, [r5, #4]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
257
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
258 .macro ADJ_ALIGN_DW shift, R0, R1, R2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
259 mov \R0, \R0, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
260 orr \R0, \R0, \R1, lsl #(32 - \shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
261 mov \R1, \R1, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
262 orr \R1, \R1, \R2, lsl #(32 - \shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
263 mov \R2, \R2, lsr #(\shift)
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
264 @ and \R4, \R4, #0xFF
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
265 .endm
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
266
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
267 MC_put_x_8_arm_align0:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
268 ldmia r1, {r4-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
269 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
270 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
271 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
272 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
273 stmia r0, {r5-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
274 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
275 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
276 bne MC_put_x_8_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
277 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
278 MC_put_x_8_arm_align1:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
279 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
280 1: ldmia r1, {r4-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
281 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
282 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
283 ADJ_ALIGN_DW 8, r4, r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
284 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
285 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
286 stmia r0, {r5-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
287 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
288 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
289 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
290 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
291 MC_put_x_8_arm_align2:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
292 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
293 1: ldmia r1, {r4-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
294 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
295 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
296 ADJ_ALIGN_DW 16, r4, r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
297 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
298 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
299 stmia r0, {r5-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
300 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
301 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
302 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
303 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
304 MC_put_x_8_arm_align3:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
305 and r1, r1, #0xFFFFFFFC
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
306 1: ldmia r1, {r4-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
307 add r1, r1, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
308 pld [r1]
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
309 ADJ_ALIGN_DW 24, r4, r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
310 AVG_PW r5, r6
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
311 AVG_PW r4, r5
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
312 stmia r0, {r5-r6}
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
313 subs r3, r3, #1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
314 add r0, r0, r2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
315 bne 1b
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
316 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
317 MC_put_x_8_arm_align_jt:
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
318 .word 0x01010101
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
319 .word MC_put_x_8_arm_align0
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
320 .word MC_put_x_8_arm_align1
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
321 .word MC_put_x_8_arm_align2
f0ddd02aec27 iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
diff changeset
322 .word MC_put_x_8_arm_align3