annotate arm/dsputil_arm_s.S @ 8688:5cf9f2f663b0 libavcodec

cosmetics: Add empty line for consistent formatting. patch by Gwenol«± Beauchesne, gbeauchesne splitted-desktop com
author diego
date Thu, 29 Jan 2009 22:08:32 +0000
parents 5698999894ec
children 47245bb9e85f
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 @
8359
9281a8a9387a ARM: replace "armv4l" with "arm"
mru
parents: 8072
diff changeset
2 @ ARMv4 optimized DSP utils
2734
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
6528
28d0e7dac45d pld instruction are used in libavcodec/armv4l/dsputil_arm_s.S which can be used
diego
parents: 5641
diff changeset
22 #include "config.h"
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
23 #include "asm.S"
6528
28d0e7dac45d pld instruction are used in libavcodec/armv4l/dsputil_arm_s.S which can be used
diego
parents: 5641
diff changeset
24
8070
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
25 preserve8
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
26
8590
7a463923ecd1 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 8359
diff changeset
27 #if !HAVE_PLD
6528
28d0e7dac45d pld instruction are used in libavcodec/armv4l/dsputil_arm_s.S which can be used
diego
parents: 5641
diff changeset
28 .macro pld reg
28d0e7dac45d pld instruction are used in libavcodec/armv4l/dsputil_arm_s.S which can be used
diego
parents: 5641
diff changeset
29 .endm
28d0e7dac45d pld instruction are used in libavcodec/armv4l/dsputil_arm_s.S which can be used
diego
parents: 5641
diff changeset
30 #endif
28d0e7dac45d pld instruction are used in libavcodec/armv4l/dsputil_arm_s.S which can be used
diego
parents: 5641
diff changeset
31
8590
7a463923ecd1 Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 8359
diff changeset
32 #if HAVE_ARMV5TE
8070
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
33 function ff_prefetch_arm, export=1
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
34 subs r2, r2, #1
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
35 pld [r0]
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
36 add r0, r0, r1
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
37 bne ff_prefetch_arm
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
38 bx lr
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
39 .endfunc
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
40 #endif
59be7e4941e8 ARM: move prefetch_arm to dsputil_arm_s.S
mru
parents: 8069
diff changeset
41
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
42 .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
43 mov \Rd0, \Rn0, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
44 mov \Rd1, \Rn1, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
45 mov \Rd2, \Rn2, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
46 mov \Rd3, \Rn3, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
47 orr \Rd0, \Rd0, \Rn1, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
48 orr \Rd1, \Rd1, \Rn2, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
49 orr \Rd2, \Rd2, \Rn3, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
50 orr \Rd3, \Rd3, \Rn4, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
51 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
52 .macro ADJ_ALIGN_DOUBLEWORD shift, R0, R1, R2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
53 mov \R0, \R0, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
54 orr \R0, \R0, \R1, lsl #(32 - \shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
55 mov \R1, \R1, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
56 orr \R1, \R1, \R2, lsl #(32 - \shift * 8)
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 .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
59 mov \Rdst0, \Rsrc0, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
60 mov \Rdst1, \Rsrc1, lsr #(\shift * 8)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
61 orr \Rdst0, \Rdst0, \Rsrc1, lsl #(32 - (\shift * 8))
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
62 orr \Rdst1, \Rdst1, \Rsrc2, lsl #(32 - (\shift * 8))
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
63 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
64
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
65 .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
66 @ Rd = (Rn | Rm) - (((Rn ^ Rm) & ~0x01010101) >> 1)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
67 @ Rmask = 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
68 @ Rn = destroy
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
69 eor \Rd0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
70 eor \Rd1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
71 orr \Rn0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
72 orr \Rn1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
73 and \Rd0, \Rd0, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
74 and \Rd1, \Rd1, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
75 sub \Rd0, \Rn0, \Rd0, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
76 sub \Rd1, \Rn1, \Rd1, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
77 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
78
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
79 .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
80 @ Rd = (Rn & Rm) - (((Rn ^ Rm) & ~0x01010101) >> 1)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
81 @ Rmask = 0xFEFEFEFE
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
82 @ Rn = destroy
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
83 eor \Rd0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
84 eor \Rd1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
85 and \Rn0, \Rn0, \Rm0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
86 and \Rn1, \Rn1, \Rm1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
87 and \Rd0, \Rd0, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
88 and \Rd1, \Rd1, \Rmask
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
89 add \Rd0, \Rn0, \Rd0, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
90 add \Rd1, \Rn1, \Rd1, lsr #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
91 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
92
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
93 .macro JMP_ALIGN tmp, reg
8680
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
94 ands \tmp, \reg, #3
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
95 bic \reg, \reg, #3
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
96 beq 1f
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
97 subs \tmp, \tmp, #1
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
98 beq 2f
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
99 subs \tmp, \tmp, #1
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
100 beq 3f
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
101 b 4f
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
102 .endm
83453ea78558 ARM: replace jump tables with conditional branches
mru
parents: 8679
diff changeset
103
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
104 @ ----------------------------------------------------------------
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
105 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
106 function put_pixels16_arm, export=1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
107 @ 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
108 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
109 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
110 stmfd sp!, {r4-r11, lr} @ R14 is also called LR
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
111 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
112 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
113 ldmia r1, {r4-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
114 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
115 stmia r0, {r4-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
116 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
117 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
118 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
119 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
120 ldmfd sp!, {r4-r11, pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
121 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
122 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
123 ldmia r1, {r4-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
124 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
125 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
126 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
127 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
128 stmia r0, {r9-r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
129 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
130 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
131 ldmfd sp!, {r4-r11, pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
132 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
133 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
134 ldmia r1, {r4-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
135 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
136 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
137 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
138 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
139 stmia r0, {r9-r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
140 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
141 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
142 ldmfd sp!, {r4-r11, pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
143 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
144 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
145 ldmia r1, {r4-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
146 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
147 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
148 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
149 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
150 stmia r0, {r9-r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
151 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
152 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
153 ldmfd sp!, {r4-r11,pc}
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
154 .endfunc
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
155
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
156 @ ----------------------------------------------------------------
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
157 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
158 function put_pixels8_arm, export=1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
159 @ 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
160 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
161 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
162 stmfd sp!, {r4-r5,lr} @ R14 is also called LR
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
163 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
164 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
165 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
166 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
167 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
168 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
169 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
170 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
171 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
172 ldmfd sp!, {r4-r5,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
173 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
174 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
175 ldmia r1, {r4-r5, r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
176 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
177 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
178 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
179 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
180 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
181 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
182 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
183 ldmfd sp!, {r4-r5,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
184 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
185 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
186 ldmia r1, {r4-r5, r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
187 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
188 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
189 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
190 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
191 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
192 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
193 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
194 ldmfd sp!, {r4-r5,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
195 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
196 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
197 ldmia r1, {r4-r5, r12}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
198 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
199 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
200 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
201 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
202 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
203 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
204 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
205 ldmfd sp!, {r4-r5,pc}
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
206 .endfunc
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
207
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
208 @ ----------------------------------------------------------------
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
209 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
210 function put_pixels8_x2_arm, export=1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
211 @ 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
212 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
213 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
214 stmfd sp!, {r4-r10,lr} @ R14 is also called LR
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
215 ldr r12, =0xfefefefe
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
216 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
217 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
218 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
219 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
220 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
221 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
222 RND_AVG32 r8, r9, r4, r5, r6, r7, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
223 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
224 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
225 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
226 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
227 ldmfd sp!, {r4-r10,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
228 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
229 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
230 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
231 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
232 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
233 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
234 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
235 RND_AVG32 r4, r5, r6, r7, r8, r9, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
236 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
237 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
238 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
239 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
240 ldmfd sp!, {r4-r10,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
241 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
242 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
243 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
244 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
245 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
246 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
247 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
248 RND_AVG32 r4, r5, r6, r7, r8, r9, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
249 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
250 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
251 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
252 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
253 ldmfd sp!, {r4-r10,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
254 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
255 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
256 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
257 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
258 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
259 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
260 RND_AVG32 r8, r9, r6, r7, r5, r10, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
261 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
262 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
263 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
264 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
265 ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
266 .endfunc
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
267
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
268 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
269 function put_no_rnd_pixels8_x2_arm, export=1
2734
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
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
274 ldr r12, =0xfefefefe
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
275 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
276 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
277 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
278 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
279 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
280 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
281 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
282 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
283 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
284 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
285 bne 1b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
286 ldmfd sp!, {r4-r10,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
287 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
288 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
289 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
290 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
291 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
292 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
293 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
294 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
295 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
296 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
297 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
298 bne 2b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
299 ldmfd sp!, {r4-r10,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
300 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
301 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
302 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
303 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
304 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
305 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
306 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
307 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
308 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
309 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
310 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
311 bne 3b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
312 ldmfd sp!, {r4-r10,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
313 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
314 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
315 ldmia r1, {r4-r5, r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
316 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
317 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
318 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
319 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
320 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
321 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
322 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
323 bne 4b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
324 ldmfd sp!, {r4-r10,pc} @@ update PC with LR content.
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
325 .endfunc
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
326
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
327
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
328 @ ----------------------------------------------------------------
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
329 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
330 function put_pixels8_y2_arm, export=1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
331 @ 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
332 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
333 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
334 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
335 mov r3, r3, lsr #1
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
336 ldr r12, =0xfefefefe
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
337 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
338 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
339 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
340 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
341 6: ldmia r1, {r6-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
342 add r1, r1, r2
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 RND_AVG32 r8, r9, r4, r5, r6, r7, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
345 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
346 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
347 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
348 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
349 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
350 RND_AVG32 r8, r9, r6, r7, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
351 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
352 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
353 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
354 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
355 ldmfd sp!, {r4-r11,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
356 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
357 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
358 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
359 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
360 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
361 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
362 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
363 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
364 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
365 ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
366 RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
367 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
368 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
369 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
370 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
371 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
372 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
373 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
374 RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
375 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
376 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
377 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
378 ldmfd sp!, {r4-r11,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
379 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
380 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
381 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
382 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
383 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
384 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
385 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
386 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
387 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
388 ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
389 RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
390 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
391 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
392 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
393 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
394 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
395 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
396 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
397 RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
398 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
399 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
400 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
401 ldmfd sp!, {r4-r11,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
402 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
403 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
404 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
405 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
406 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
407 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
408 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
409 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
410 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
411 ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
412 RND_AVG32 r10, r11, r4, r5, r7, r8, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
413 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
414 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
415 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
416 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
417 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
418 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
419 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
420 RND_AVG32 r10, r11, r7, r8, r4, r5, r12
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
421 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
422 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
423 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
424 ldmfd sp!, {r4-r11,pc}
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
425 .endfunc
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
426
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
427 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
428 function put_no_rnd_pixels8_y2_arm, export=1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
429 @ 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
430 @ block = word aligned, pixles = unaligned
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 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
433 mov r3, r3, lsr #1
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
434 ldr r12, =0xfefefefe
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
435 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
436 1:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
437 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
438 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
439 6: ldmia r1, {r6-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
440 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
441 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
442 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
443 ldmia r1, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
444 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
445 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
446 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
447 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
448 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
449 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
450 stmia r0, {r8-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
451 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
452 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
453 ldmfd sp!, {r4-r11,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
454 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
455 2:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
456 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
457 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
458 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
459 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
460 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
461 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
462 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
463 ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
464 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
465 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
466 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
467 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
468 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
469 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
470 ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
471 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
472 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
473 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
474 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
475 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
476 ldmfd sp!, {r4-r11,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
477 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
478 3:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
479 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
480 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
481 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
482 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
483 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
484 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
485 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
486 ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
487 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
488 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
489 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
490 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
491 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
492 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
493 ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
494 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
495 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
496 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
497 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
498 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
499 ldmfd sp!, {r4-r11,pc}
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
500 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
501 4:
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
502 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
503 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
504 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
505 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
506 6: ldmia r1, {r7-r9}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
507 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
508 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
509 ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
510 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
511 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
512 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
513 ldmia r1, {r4-r6}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
514 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
515 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
516 ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
517 subs r3, r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
518 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
519 stmia r0, {r10-r11}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
520 add r0, r0, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
521 bne 6b
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
522 ldmfd sp!, {r4-r11,pc}
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
523 .endfunc
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
524
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
525 .ltorg
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
526
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
527 @ ----------------------------------------------------------------
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
528 .macro RND_XY2_IT align, rnd
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
529 @ l1= (a & 0x03030303) + (b & 0x03030303) ?(+ 0x02020202)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
530 @ h1= ((a & 0xFCFCFCFCUL) >> 2) + ((b & 0xFCFCFCFCUL) >> 2)
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
531 .if \align == 0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
532 ldmia r1, {r6-r8}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
533 .elseif \align == 3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
534 ldmia r1, {r5-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
535 .else
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
536 ldmia r1, {r8-r10}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
537 .endif
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
538 add r1, r1, r2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
539 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
540 .if \align == 0
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
541 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
542 .elseif \align == 1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
543 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
544 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
545 .elseif \align == 2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
546 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
547 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
548 .elseif \align == 3
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
549 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
550 .endif
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
551 ldr r14, =0x03030303
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
552 tst r3, #1
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
553 and r8, r4, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
554 and r9, r5, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
555 and r10, r6, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
556 and r11, r7, r14
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
557 andeq r14, r14, r14, \rnd #1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
558 add r8, r8, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
559 add r9, r9, r11
8681
624ef0eb38f1 ARM: reorder some instructions in put_pixels*_arm for speed gains
mru
parents: 8680
diff changeset
560 ldr r12, =0xfcfcfcfc >> 2
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
561 addeq r8, r8, r14
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
562 addeq r9, r9, r14
8681
624ef0eb38f1 ARM: reorder some instructions in put_pixels*_arm for speed gains
mru
parents: 8680
diff changeset
563 and r4, r12, r4, lsr #2
624ef0eb38f1 ARM: reorder some instructions in put_pixels*_arm for speed gains
mru
parents: 8680
diff changeset
564 and r5, r12, r5, lsr #2
624ef0eb38f1 ARM: reorder some instructions in put_pixels*_arm for speed gains
mru
parents: 8680
diff changeset
565 and r6, r12, r6, lsr #2
624ef0eb38f1 ARM: reorder some instructions in put_pixels*_arm for speed gains
mru
parents: 8680
diff changeset
566 and r7, r12, r7, lsr #2
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
567 add r10, r4, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
568 add r11, r5, r7
5641
1e93e637fa21 Fix put_*_xy2_arm bug and enable put_pixels16_arm and put_pixels8_y2_arm.
diego
parents: 3947
diff changeset
569 subs r3, r3, #1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
570 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
571
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
572 .macro RND_XY2_EXPAND align, rnd
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
573 RND_XY2_IT \align, \rnd
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
574 6: stmfd sp!, {r8-r11}
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
575 RND_XY2_IT \align, \rnd
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
576 ldmfd sp!, {r4-r7}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
577 add r4, r4, r8
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
578 add r5, r5, r9
8681
624ef0eb38f1 ARM: reorder some instructions in put_pixels*_arm for speed gains
mru
parents: 8680
diff changeset
579 ldr r14, =0x0f0f0f0f
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
580 add r6, r6, r10
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
581 add r7, r7, r11
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
582 and r4, r14, r4, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
583 and r5, r14, r5, lsr #2
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
584 add r4, r4, r6
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
585 add r5, r5, r7
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
586 stmia r0, {r4-r5}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
587 add r0, r0, r2
5641
1e93e637fa21 Fix put_*_xy2_arm bug and enable put_pixels16_arm and put_pixels8_y2_arm.
diego
parents: 3947
diff changeset
588 bge 6b
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
589 ldmfd sp!, {r4-r11,pc}
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
590 .endm
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
591
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
592 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
593 function put_pixels8_xy2_arm, export=1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
594 @ 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
595 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
596 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
597 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
598 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
599 1:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
600 RND_XY2_EXPAND 0, lsl
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
601
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
602 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
603 2:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
604 RND_XY2_EXPAND 1, lsl
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
605
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
606 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
607 3:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
608 RND_XY2_EXPAND 2, lsl
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
609
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
610 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
611 4:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
612 RND_XY2_EXPAND 3, lsl
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
613 .endfunc
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
614
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
615 .align 5
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
616 function put_no_rnd_pixels8_xy2_arm, export=1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
617 @ 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
618 @ block = word aligned, pixles = unaligned
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
619 pld [r1]
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
620 stmfd sp!, {r4-r11,lr} @ R14 is also called LR
8682
5698999894ec ARM: remove some unused macro arguments
mru
parents: 8681
diff changeset
621 JMP_ALIGN r5, r1
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
622 1:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
623 RND_XY2_EXPAND 0, lsr
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
624
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
625 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
626 2:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
627 RND_XY2_EXPAND 1, lsr
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
628
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
629 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
630 3:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
631 RND_XY2_EXPAND 2, lsr
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 2734
diff changeset
632
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
633 .align 5
2734
aeea63c97878 Better ARM support for mplayer/ffmpeg, ported from atty fork
michael
parents:
diff changeset
634 4:
8679
9c1ea156d893 ARM: replace explicit literal loads with ldr Rd, =lit
mru
parents: 8678
diff changeset
635 RND_XY2_EXPAND 3, lsr
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 6528
diff changeset
636 .endfunc
8072
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
637
8678
6c256fc075e3 ARM: change alignment of loops in put_pixels*_arm to 32
mru
parents: 8590
diff changeset
638 .align 5
8072
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
639 @ void ff_add_pixels_clamped_ARM(int16_t *block, uint8_t *dest, int stride)
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
640 function ff_add_pixels_clamped_ARM, export=1
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
641 push {r4-r10}
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
642 mov r10, #8
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
643 1:
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
644 ldr r4, [r1] /* load dest */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
645 /* block[0] and block[1]*/
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
646 ldrsh r5, [r0]
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
647 ldrsh r7, [r0, #2]
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
648 and r6, r4, #0xFF
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
649 and r8, r4, #0xFF00
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
650 add r6, r5, r6
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
651 add r8, r7, r8, lsr #8
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
652 mvn r5, r5
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
653 mvn r7, r7
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
654 tst r6, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
655 movne r6, r5, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
656 tst r8, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
657 movne r8, r7, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
658 mov r9, r6
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
659 ldrsh r5, [r0, #4] /* moved form [A] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
660 orr r9, r9, r8, lsl #8
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
661 /* block[2] and block[3] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
662 /* [A] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
663 ldrsh r7, [r0, #6]
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
664 and r6, r4, #0xFF0000
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
665 and r8, r4, #0xFF000000
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
666 add r6, r5, r6, lsr #16
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
667 add r8, r7, r8, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
668 mvn r5, r5
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
669 mvn r7, r7
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
670 tst r6, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
671 movne r6, r5, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
672 tst r8, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
673 movne r8, r7, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
674 orr r9, r9, r6, lsl #16
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
675 ldr r4, [r1, #4] /* moved form [B] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
676 orr r9, r9, r8, lsl #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
677 /* store dest */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
678 ldrsh r5, [r0, #8] /* moved form [C] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
679 str r9, [r1]
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
680
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
681 /* load dest */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
682 /* [B] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
683 /* block[4] and block[5] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
684 /* [C] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
685 ldrsh r7, [r0, #10]
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
686 and r6, r4, #0xFF
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
687 and r8, r4, #0xFF00
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
688 add r6, r5, r6
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
689 add r8, r7, r8, lsr #8
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
690 mvn r5, r5
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
691 mvn r7, r7
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
692 tst r6, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
693 movne r6, r5, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
694 tst r8, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
695 movne r8, r7, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
696 mov r9, r6
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
697 ldrsh r5, [r0, #12] /* moved from [D] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
698 orr r9, r9, r8, lsl #8
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
699 /* block[6] and block[7] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
700 /* [D] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
701 ldrsh r7, [r0, #14]
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
702 and r6, r4, #0xFF0000
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
703 and r8, r4, #0xFF000000
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
704 add r6, r5, r6, lsr #16
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
705 add r8, r7, r8, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
706 mvn r5, r5
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
707 mvn r7, r7
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
708 tst r6, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
709 movne r6, r5, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
710 tst r8, #0x100
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
711 movne r8, r7, lsr #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
712 orr r9, r9, r6, lsl #16
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
713 add r0, r0, #16 /* moved from [E] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
714 orr r9, r9, r8, lsl #24
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
715 subs r10, r10, #1 /* moved from [F] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
716 /* store dest */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
717 str r9, [r1, #4]
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
718
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
719 /* [E] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
720 /* [F] */
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
721 add r1, r1, r2
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
722 bne 1b
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
723
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
724 pop {r4-r10}
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
725 bx lr
4b32e8762864 ARM: move add_pixels_clamped_ARM() to dsputil_arm_s.S
mru
parents: 8070
diff changeset
726 .endfunc