annotate armv4l/dsputil_arm_s.S @ 4807:30ac525752b9 libavcodec

prev1/2 -> prev[2]
author michael
date Sat, 07 Apr 2007 21:27:58 +0000
parents c8c591fe26f8
children 1e93e637fa21
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
1 @
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
2 @ ARMv4L optimized DSP utils
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
3 @ Copyright (c) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
4 @
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
5 @ This file is part of FFmpeg.
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
6 @
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
7 @ FFmpeg is free software; you can redistribute it and/or
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
8 @ modify it under the terms of the GNU Lesser General Public
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
9 @ License as published by the Free Software Foundation; either
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
10 @ version 2.1 of the License, or (at your option) any later version.
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
11 @
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
12 @ FFmpeg is distributed in the hope that it will be useful,
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
13 @ but WITHOUT ANY WARRANTY; without even the implied warranty of
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
14 @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
15 @ Lesser General Public License for more details.
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
16 @
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
17 @ You should have received a copy of the GNU Lesser General Public
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3036
diff changeset
18 @ License along with FFmpeg; if not, write to the Free Software
3036
0b546eab515d Update licensing information: The FSF changed postal address.
diego
parents: 2967
diff changeset
19 @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
20 @
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
21
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
22 .macro ADJ_ALIGN_QUADWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
23 mov \Rd0, \Rn0, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
24 mov \Rd1, \Rn1, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
25 mov \Rd2, \Rn2, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
26 mov \Rd3, \Rn3, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
27 orr \Rd0, \Rd0, \Rn1, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
28 orr \Rd1, \Rd1, \Rn2, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
29 orr \Rd2, \Rd2, \Rn3, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
30 orr \Rd3, \Rd3, \Rn4, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
31 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
32 .macro ADJ_ALIGN_DOUBLEWORD shift, R0, R1, R2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
33 mov \R0, \R0, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
34 orr \R0, \R0, \R1, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
35 mov \R1, \R1, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
36 orr \R1, \R1, \R2, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
37 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
38 .macro ADJ_ALIGN_DOUBLEWORD_D shift, Rdst0, Rdst1, Rsrc0, Rsrc1, Rsrc2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
39 mov \Rdst0, \Rsrc0, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
40 mov \Rdst1, \Rsrc1, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
41 orr \Rdst0, \Rdst0, \Rsrc1, lsl #(32 - (\shift * 8))
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
42 orr \Rdst1, \Rdst1, \Rsrc2, lsl #(32 - (\shift * 8))
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
43 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
44
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
45 .macro RND_AVG32 Rd0, Rd1, Rn0, Rn1, Rm0, Rm1, Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
46 @ Rd = (Rn | Rm) - (((Rn ^ Rm) & ~0x01010101) >> 1)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
47 @ Rmask = 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
48 @ Rn = destroy
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
49 eor \Rd0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
50 eor \Rd1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
51 orr \Rn0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
52 orr \Rn1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
53 and \Rd0, \Rd0, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
54 and \Rd1, \Rd1, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
55 sub \Rd0, \Rn0, \Rd0, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
56 sub \Rd1, \Rn1, \Rd1, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
57 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
58
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
59 .macro NO_RND_AVG32 Rd0, Rd1, Rn0, Rn1, Rm0, Rm1, Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
60 @ Rd = (Rn & Rm) - (((Rn ^ Rm) & ~0x01010101) >> 1)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
61 @ Rmask = 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
62 @ Rn = destroy
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
63 eor \Rd0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
64 eor \Rd1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
65 and \Rn0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
66 and \Rn1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
67 and \Rd0, \Rd0, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
68 and \Rd1, \Rd1, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
69 add \Rd0, \Rn0, \Rd0, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
70 add \Rd1, \Rn1, \Rd1, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
71 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
72
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
73 @ ----------------------------------------------------------------
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
74 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
75 .global put_pixels16_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
76 put_pixels16_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
77 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
78 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
79 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
80 stmfd sp!, {r4-r11, lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
81 adr r5, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
82 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
83 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
84 add r5, r5, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
85 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
86 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
87 ldmia r1, {r4-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
88 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
89 stmia r0, {r4-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
90 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
91 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
92 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
93 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
94 ldmfd sp!, {r4-r11, pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
95 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
96 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
97 ldmia r1, {r4-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
98 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
99 ADJ_ALIGN_QUADWORD_D 1, r9, r10, r11, r12, r4, r5, r6, r7, r8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
100 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
101 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
102 stmia r0, {r9-r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
103 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
104 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
105 ldmfd sp!, {r4-r11, pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
106 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
107 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
108 ldmia r1, {r4-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
109 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
110 ADJ_ALIGN_QUADWORD_D 2, r9, r10, r11, r12, r4, r5, r6, r7, r8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
111 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
112 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
113 stmia r0, {r9-r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
114 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
115 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
116 ldmfd sp!, {r4-r11, pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
117 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
118 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
119 ldmia r1, {r4-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
120 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
121 ADJ_ALIGN_QUADWORD_D 3, r9, r10, r11, r12, r4, r5, r6, r7, r8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
122 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
123 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
124 stmia r0, {r9-r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
125 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
126 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
127 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
128 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
129 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
130 .word 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
131 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
132 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
133 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
134
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
135 @ ----------------------------------------------------------------
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
136 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
137 .global put_pixels8_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
138 put_pixels8_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
139 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
140 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
141 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
142 stmfd sp!, {r4-r5,lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
143 adr r5, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
144 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
145 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
146 add r5, r5, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
147 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
148 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
149 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
150 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
151 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
152 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
153 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
154 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
155 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
156 ldmfd sp!, {r4-r5,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
157 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
158 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
159 ldmia r1, {r4-r5, r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
160 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
161 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
162 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
163 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
164 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
165 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
166 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
167 ldmfd sp!, {r4-r5,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
168 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
169 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
170 ldmia r1, {r4-r5, r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
171 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
172 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
173 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
174 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
175 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
176 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
177 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
178 ldmfd sp!, {r4-r5,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
179 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
180 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
181 ldmia r1, {r4-r5, r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
182 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
183 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
184 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
185 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
186 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
187 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
188 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
189 ldmfd sp!, {r4-r5,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
190 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
191 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
192 .word 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
193 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
194 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
195 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
196
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
197 @ ----------------------------------------------------------------
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
198 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
199 .global put_pixels8_x2_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
200 put_pixels8_x2_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
201 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
202 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
203 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
204 stmfd sp!, {r4-r10,lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
205 adr r5, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
206 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
207 ldr r12, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
208 add r5, r5, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
209 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
210 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
211 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
212 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
213 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
214 ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
215 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
216 RND_AVG32 r8, r9, r4, r5, r6, r7, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
217 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
218 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
219 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
220 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
221 ldmfd sp!, {r4-r10,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
222 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
223 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
224 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
225 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
226 ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
227 ADJ_ALIGN_DOUBLEWORD_D 2, r8, r9, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
228 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
229 RND_AVG32 r4, r5, r6, r7, r8, r9, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
230 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
231 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
232 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
233 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
234 ldmfd sp!, {r4-r10,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
235 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
236 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
237 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
238 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
239 ADJ_ALIGN_DOUBLEWORD_D 2, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
240 ADJ_ALIGN_DOUBLEWORD_D 3, r8, r9, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
241 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
242 RND_AVG32 r4, r5, r6, r7, r8, r9, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
243 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
244 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
245 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
246 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
247 ldmfd sp!, {r4-r10,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
248 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
249 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
250 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
251 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
252 ADJ_ALIGN_DOUBLEWORD_D 3, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
253 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
254 RND_AVG32 r8, r9, r6, r7, r5, r10, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
255 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
256 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
257 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
258 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
259 ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
260 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
261 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
262 .word 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
263 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
264 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
265 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
266
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
267 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
268 .global put_no_rnd_pixels8_x2_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
269 put_no_rnd_pixels8_x2_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
270 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
271 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
272 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
273 stmfd sp!, {r4-r10,lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
274 adr r5, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
275 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
276 ldr r12, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
277 add r5, r5, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
278 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
279 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
280 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
281 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
282 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
283 ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
284 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
285 NO_RND_AVG32 r8, r9, r4, r5, r6, r7, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
286 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
287 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
288 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
289 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
290 ldmfd sp!, {r4-r10,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
291 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
292 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
293 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
294 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
295 ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
296 ADJ_ALIGN_DOUBLEWORD_D 2, r8, r9, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
297 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
298 NO_RND_AVG32 r4, r5, r6, r7, r8, r9, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
299 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
300 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
301 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
302 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
303 ldmfd sp!, {r4-r10,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
304 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
305 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
306 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
307 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
308 ADJ_ALIGN_DOUBLEWORD_D 2, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
309 ADJ_ALIGN_DOUBLEWORD_D 3, r8, r9, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
310 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
311 NO_RND_AVG32 r4, r5, r6, r7, r8, r9, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
312 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
313 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
314 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
315 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
316 ldmfd sp!, {r4-r10,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
317 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
318 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
319 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
320 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
321 ADJ_ALIGN_DOUBLEWORD_D 3, r6, r7, r4, r5, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
322 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
323 NO_RND_AVG32 r8, r9, r6, r7, r5, r10, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
324 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
325 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
326 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
327 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
328 ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
329 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
330 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
331 .word 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
332 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
333 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
334 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
335
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
336
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
337 @ ----------------------------------------------------------------
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
338 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
339 .global put_pixels8_y2_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
340 put_pixels8_y2_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
341 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
342 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
343 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
344 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
345 adr r5, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
346 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
347 mov r3, r3, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
348 ldr r12, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
349 add r5, r5, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
350 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
351 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
352 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
353 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
354 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
355 6: ldmia r1, {r6-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
356 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
357 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
358 RND_AVG32 r8, r9, r4, r5, r6, r7, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
359 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
360 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
361 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
362 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
363 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
364 RND_AVG32 r8, r9, r6, r7, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
365 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
366 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
367 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
368 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
369 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
370 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
371 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
372 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
373 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
374 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
375 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
376 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
377 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
378 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
379 ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
380 RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
381 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
382 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
383 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
384 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
385 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
386 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
387 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
388 RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
389 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
390 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
391 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
392 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
393 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
394 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
395 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
396 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
397 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
398 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
399 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
400 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
401 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
402 ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
403 RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
404 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
405 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
406 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
407 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
408 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
409 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
410 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
411 RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
412 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
413 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
414 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
415 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
416 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
417 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
418 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
419 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
420 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
421 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
422 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
423 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
424 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
425 ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
426 RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
427 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
428 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
429 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
430 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
431 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
432 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
433 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
434 RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
435 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
436 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
437 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
438 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
439
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
440 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
441 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
442 .word 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
443 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
444 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
445 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
446
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
447 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
448 .global put_no_rnd_pixels8_y2_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
449 put_no_rnd_pixels8_y2_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
450 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
451 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
452 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
453 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
454 adr r5, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
455 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
456 mov r3, r3, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
457 ldr r12, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
458 add r5, r5, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
459 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
460 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
461 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
462 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
463 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
464 6: ldmia r1, {r6-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
465 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
466 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
467 NO_RND_AVG32 r8, r9, r4, r5, r6, r7, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
468 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
469 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
470 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
471 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
472 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
473 NO_RND_AVG32 r8, r9, r6, r7, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
474 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
475 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
476 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
477 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
478 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
479 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
480 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
481 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
482 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
483 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
484 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
485 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
486 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
487 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
488 ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
489 NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
490 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
491 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
492 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
493 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
494 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
495 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
496 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
497 NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
498 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
499 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
500 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
501 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
502 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
503 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
504 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
505 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
506 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
507 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
508 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
509 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
510 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
511 ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
512 NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
513 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
514 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
515 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
516 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
517 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
518 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
519 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
520 NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
521 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
522 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
523 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
524 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
525 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
526 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
527 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
528 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
529 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
530 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
531 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
532 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
533 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
534 ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
535 NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
536 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
537 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
538 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
539 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
540 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
541 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
542 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
543 NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
544 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
545 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
546 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
547 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
548 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
549 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
550 .word 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
551 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
552 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
553 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
554
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
555 @ ----------------------------------------------------------------
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
556 .macro RND_XY2_IT align, rnd
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
557 @ l1= (a & 0x03030303) + (b & 0x03030303) ?(+ 0x02020202)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
558 @ h1= ((a & 0xFCFCFCFCUL) >> 2) + ((b & 0xFCFCFCFCUL) >> 2)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
559 .if \align == 0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
560 ldmia r1, {r6-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
561 .elseif \align == 3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
562 ldmia r1, {r5-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
563 .else
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
564 ldmia r1, {r8-r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
565 .endif
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
566 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
567 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
568 .if \align == 0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
569 ADJ_ALIGN_DOUBLEWORD_D 1, r4, r5, r6, r7, r8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
570 .elseif \align == 1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
571 ADJ_ALIGN_DOUBLEWORD_D 1, r4, r5, r8, r9, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
572 ADJ_ALIGN_DOUBLEWORD_D 2, r6, r7, r8, r9, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
573 .elseif \align == 2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
574 ADJ_ALIGN_DOUBLEWORD_D 2, r4, r5, r8, r9, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
575 ADJ_ALIGN_DOUBLEWORD_D 3, r6, r7, r8, r9, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
576 .elseif \align == 3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
577 ADJ_ALIGN_DOUBLEWORD_D 3, r4, r5, r5, r6, r7
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
578 .endif
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
579 ldr r14, [r12, #0] @ 0x03030303
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
580 tst r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
581 and r8, r4, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
582 and r9, r5, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
583 and r10, r6, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
584 and r11, r7, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
585 .if \rnd == 1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
586 ldreq r14, [r12, #16] @ 0x02020202
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
587 .else
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
588 ldreq r14, [r12, #28] @ 0x01010101
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
589 .endif
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
590 add r8, r8, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
591 add r9, r9, r11
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
592 addeq r8, r8, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
593 addeq r9, r9, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
594 ldr r14, [r12, #20] @ 0xFCFCFCFC >> 2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
595 and r4, r14, r4, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
596 and r5, r14, r5, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
597 and r6, r14, r6, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
598 and r7, r14, r7, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
599 add r10, r4, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
600 add r11, r5, r7
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
601 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
602
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
603 .macro RND_XY2_EXPAND align, rnd
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
604 RND_XY2_IT \align, \rnd
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
605 6: stmfd sp!, {r8-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
606 RND_XY2_IT \align, \rnd
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
607 ldmfd sp!, {r4-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
608 add r4, r4, r8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
609 add r5, r5, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
610 add r6, r6, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
611 add r7, r7, r11
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
612 ldr r14, [r12, #24] @ 0x0F0F0F0F
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
613 and r4, r14, r4, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
614 and r5, r14, r5, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
615 add r4, r4, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
616 add r5, r5, r7
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
617 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
618 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
619 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
620 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
621 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
622 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
623
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
624 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
625 .global put_pixels8_xy2_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
626 put_pixels8_xy2_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
627 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
628 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
629 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
630 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
631 adrl r12, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
632 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
633 add r5, r12, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
634 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
635 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
636 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
637 RND_XY2_EXPAND 0, 1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
638
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
639 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
640 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
641 RND_XY2_EXPAND 1, 1
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
642
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
643 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
644 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
645 RND_XY2_EXPAND 2, 1
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
646
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
647 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
648 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
649 RND_XY2_EXPAND 3, 1
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
650
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
651 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
652 .word 0x03030303
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
653 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
654 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
655 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
656 .word 0x02020202
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
657 .word 0xFCFCFCFC >> 2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
658 .word 0x0F0F0F0F
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
659 .word 0x01010101
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
660
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
661 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
662 .global put_no_rnd_pixels8_xy2_arm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
663 put_no_rnd_pixels8_xy2_arm:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
664 @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
665 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
666 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
667 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
668 adrl r12, 5f
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
669 ands r4, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
670 add r5, r12, r4, lsl #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
671 bic r1, r1, #3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
672 ldrne pc, [r5]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
673 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
674 RND_XY2_EXPAND 0, 0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
675
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
676 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
677 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
678 RND_XY2_EXPAND 1, 0
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
679
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
680 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
681 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
682 RND_XY2_EXPAND 2, 0
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
683
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
684 .align 8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
685 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
686 RND_XY2_EXPAND 3, 0
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
687
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
688 5:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
689 .word 0x03030303
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
690 .word 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
691 .word 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
692 .word 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
693 .word 0x02020202
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
694 .word 0xFCFCFCFC >> 2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
695 .word 0x0F0F0F0F
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
696 .word 0x01010101