2 @ Copyright (C) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
4 @ This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
5 @ See http://libmpeg2.sourceforge.net/ for updates.
7 @ mpeg2dec is free software; you can redistribute it and/or modify
8 @ it under the terms of the GNU General Public License as published by
9 @ the Free Software Foundation; either version 2 of the License, or
10 @ (at your option) any later version.
12 @ mpeg2dec is distributed in the hope that it will be useful,
13 @ but WITHOUT ANY WARRANTY; without even the implied warranty of
14 @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 @ GNU General Public License for more details.
17 @ You should have received a copy of the GNU General Public License
18 @ along with this program; if not, write to the Free Software
19 @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 @ ----------------------------------------------------------------
29 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
31 stmfd sp!, {r4-r11, lr} @ R14 is also called LR
33 adr r5, MC_put_o_16_align_jt
34 add r5, r5, r4, lsl #2
44 bne MC_put_o_16_align0
45 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
50 mov r9, r4, lsr #(\shift)
52 mov r10, r5, lsr #(\shift)
53 orr r9, r9, r5, lsl #(32-\shift)
54 mov r11, r6, lsr #(\shift)
55 orr r10, r10, r6, lsl #(32-\shift)
56 mov r12, r7, lsr #(\shift)
57 orr r11, r11, r7, lsl #(32-\shift)
58 orr r12, r12, r8, lsl #(32-\shift)
65 and r1, r1, #0xFFFFFFFC
68 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
70 and r1, r1, #0xFFFFFFFC
73 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
75 and r1, r1, #0xFFFFFFFC
78 ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
80 .word MC_put_o_16_align0
81 .word MC_put_o_16_align1
82 .word MC_put_o_16_align2
83 .word MC_put_o_16_align3
85 @ ----------------------------------------------------------------
89 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
91 stmfd sp!, {r4-r10, lr} @ R14 is also called LR
93 adr r5, MC_put_o_8_align_jt
94 add r5, r5, r4, lsl #2
103 bne MC_put_o_8_align0
104 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
109 mov r9, r4, lsr #(\shift)
111 mov r10, r5, lsr #(\shift)
112 orr r9, r9, r5, lsl #(32-\shift)
113 orr r10, r10, r6, lsl #(32-\shift)
120 and r1, r1, #0xFFFFFFFC
123 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
126 and r1, r1, #0xFFFFFFFC
129 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
132 and r1, r1, #0xFFFFFFFC
135 ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
138 .word MC_put_o_8_align0
139 .word MC_put_o_8_align1
140 .word MC_put_o_8_align2
141 .word MC_put_o_8_align3
143 @ ----------------------------------------------------------------
144 .macro AVG_PW rW1, rW2
145 mov \rW2, \rW2, lsl #24
146 orr \rW2, \rW2, \rW1, lsr #8
150 add \rW2, \rW2, r10, lsr #1
158 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
160 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
162 adr r5, MC_put_x_16_align_jt
165 add r5, r5, r4, lsl #2
168 .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4
169 mov \R0, \R0, lsr #(\shift)
170 orr \R0, \R0, \R1, lsl #(32 - \shift)
171 mov \R1, \R1, lsr #(\shift)
172 orr \R1, \R1, \R2, lsl #(32 - \shift)
173 mov \R2, \R2, lsr #(\shift)
174 orr \R2, \R2, \R3, lsl #(32 - \shift)
175 mov \R3, \R3, lsr #(\shift)
176 orr \R3, \R3, \R4, lsl #(32 - \shift)
177 mov \R4, \R4, lsr #(\shift)
178 @ and \R4, \R4, #0xFF
192 bne MC_put_x_16_align0
193 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
195 and r1, r1, #0xFFFFFFFC
199 ADJ_ALIGN_QW 8, r4, r5, r6, r7, r8
208 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
210 and r1, r1, #0xFFFFFFFC
214 ADJ_ALIGN_QW 16, r4, r5, r6, r7, r8
223 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
225 and r1, r1, #0xFFFFFFFC
229 ADJ_ALIGN_QW 24, r4, r5, r6, r7, r8
238 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
239 MC_put_x_16_align_jt:
241 .word MC_put_x_16_align0
242 .word MC_put_x_16_align1
243 .word MC_put_x_16_align2
244 .word MC_put_x_16_align3
246 @ ----------------------------------------------------------------
250 @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
252 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
254 adr r5, MC_put_x_8_align_jt
257 add r5, r5, r4, lsl #2
260 .macro ADJ_ALIGN_DW shift, R0, R1, R2
261 mov \R0, \R0, lsr #(\shift)
262 orr \R0, \R0, \R1, lsl #(32 - \shift)
263 mov \R1, \R1, lsr #(\shift)
264 orr \R1, \R1, \R2, lsl #(32 - \shift)
265 mov \R2, \R2, lsr #(\shift)
266 @ and \R4, \R4, #0xFF
278 bne MC_put_x_8_align0
279 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
281 and r1, r1, #0xFFFFFFFC
285 ADJ_ALIGN_DW 8, r4, r5, r6
292 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
294 and r1, r1, #0xFFFFFFFC
298 ADJ_ALIGN_DW 16, r4, r5, r6
305 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
307 and r1, r1, #0xFFFFFFFC
311 ADJ_ALIGN_DW 24, r4, r5, r6
318 ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
321 .word MC_put_x_8_align0
322 .word MC_put_x_8_align1
323 .word MC_put_x_8_align2
324 .word MC_put_x_8_align3