Mercurial > mplayer.hg
annotate libmpeg2/libmpeg-0.4.1.diff @ 26980:9cfe9182cda6
The VIDIX PCI files should be regenerated when the awk script
that creates them is changed.
author | diego |
---|---|
date | Sat, 07 Jun 2008 11:53:29 +0000 |
parents | 4559d4a7c3cb |
children | 33274ce3cce0 |
rev | line source |
---|---|
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
1 --- libmpeg2/cpu_accel.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
2 +++ libmpeg2/cpu_accel.c 2006-06-16 20:12:50.000000000 +0200 |
19026 | 3 @@ -22,6 +26,7 @@ |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
4 */ |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
5 |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
6 #include "config.h" |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
7 +#include "cpudetect.h" |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
8 |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
9 #include <inttypes.h> |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
10 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
11 @@ -30,9 +35,17 @@ |
13864 | 12 #include "mpeg2_internal.h" |
13 | |
14 #ifdef ACCEL_DETECT | |
15 -#ifdef ARCH_X86 | |
16 +#if defined(ARCH_X86) || defined(ARCH_X86_64) | |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
17 + |
26283
62abac0c8637
cosmetics: Fix some typos and trailing whitespace in local changes.
diego
parents:
26282
diff
changeset
|
18 +/* MPlayer imports libmpeg2 as decoder, which detects MMX / 3DNow! |
62abac0c8637
cosmetics: Fix some typos and trailing whitespace in local changes.
diego
parents:
26282
diff
changeset
|
19 + * instructions via assembly. However, it is regarded as duplicated work |
62abac0c8637
cosmetics: Fix some typos and trailing whitespace in local changes.
diego
parents:
26282
diff
changeset
|
20 + * in MPlayer, so that we enforce using MPlayer's implementation. |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
21 + */ |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
22 +#define USE_MPLAYER_CPUDETECT |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
23 + |
13864 | 24 static inline uint32_t arch_accel (void) |
25 { | |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
26 +#if !defined(USE_MPLAYER_CPUDETECT) |
13864 | 27 uint32_t eax, ebx, ecx, edx; |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
28 int AMD; |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
29 uint32_t caps; |
26282
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
30 @@ -105,7 +120,21 @@ |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
31 caps |= MPEG2_ACCEL_X86_MMXEXT; |
13864 | 32 |
33 return caps; | |
26283
62abac0c8637
cosmetics: Fix some typos and trailing whitespace in local changes.
diego
parents:
26282
diff
changeset
|
34 +#else /* USE_MPLAYER_CPUDETECT: Use MPlayer's CPU capability property. */ |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
35 + caps = 0; |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
36 + if (gCpuCaps.hasMMX) |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
37 + caps |= MPEG2_ACCEL_X86_MMX; |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
38 + if (gCpuCaps.hasSSE2) |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
39 + caps |= MPEG2_ACCEL_X86_SSE2; |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
40 + if (gCpuCaps.hasMMX2) |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
41 + caps |= MPEG2_ACCEL_X86_MMXEXT; |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
42 + if (gCpuCaps.has3DNow) |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
43 + caps |= MPEG2_ACCEL_X86_3DNOW; |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
44 + |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
45 + return caps; |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
46 + |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
47 +#endif /* USE_MPLAYER_CPUDETECT */ |
13020 | 48 } |
13864 | 49 -#endif /* ARCH_X86 */ |
50 +#endif /* ARCH_X86 || ARCH_X86_64 */ | |
13020 | 51 |
26282
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
52 #if defined(ARCH_PPC) || defined(ARCH_SPARC) |
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
53 @@ -212,7 +241,7 @@ |
13864 | 54 |
55 accel = 0; | |
56 #ifdef ACCEL_DETECT | |
57 -#if defined (ARCH_X86) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC) | |
58 +#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC) | |
59 accel = arch_accel (); | |
60 #endif | |
61 #endif | |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
62 --- libmpeg2/cpu_state.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
63 +++ libmpeg2/cpu_state.c 2006-06-16 20:12:50.000000000 +0200 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
64 @@ -29,14 +33,14 @@ |
13864 | 65 #include "mpeg2.h" |
66 #include "attributes.h" | |
67 #include "mpeg2_internal.h" | |
68 -#ifdef ARCH_X86 | |
69 +#if defined(ARCH_X86) || defined(ARCH_X86_64) | |
70 #include "mmx.h" | |
71 #endif | |
72 | |
73 void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL; | |
74 void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL; | |
75 | |
76 -#ifdef ARCH_X86 | |
77 +#if defined(ARCH_X86) || defined(ARCH_X86_64) | |
78 static void state_restore_mmx (cpu_state_t * state) | |
79 { | |
80 emms (); | |
21571 | 81 @@ -48,18 +48,18 @@ |
82 #endif | |
83 | |
26595 | 84 #ifdef ARCH_PPC |
21571 | 85 -#ifdef HAVE_ALTIVEC_H /* gnu */ |
86 -#define LI(a,b) "li " #a "," #b "\n\t" | |
87 -#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t" | |
88 -#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t" | |
89 -#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t" | |
90 -#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t" | |
91 -#else /* apple */ | |
25980
11181df06389
Do not check for __APPLE_ALTIVEC__, just check for __APPLE_CC__.
diego
parents:
24720
diff
changeset
|
92 +#if defined(__APPLE_CC__) /* apple */ |
21571 | 93 #define LI(a,b) "li r" #a "," #b "\n\t" |
94 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t" | |
95 #define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t" | |
96 #define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t" | |
97 #define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t" | |
98 +#else /* gnu */ | |
99 +#define LI(a,b) "li " #a "," #b "\n\t" | |
100 +#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t" | |
101 +#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t" | |
102 +#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t" | |
103 +#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t" | |
104 #endif | |
105 | |
106 static void state_save_altivec (cpu_state_t * state) | |
26282
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
107 @@ -115,9 +119,9 @@ |
13864 | 108 |
109 void mpeg2_cpu_state_init (uint32_t accel) | |
110 { | |
111 -#ifdef ARCH_X86 | |
112 +#if defined(ARCH_X86) || defined(ARCH_X86_64) | |
113 if (accel & MPEG2_ACCEL_X86_MMX) { | |
12937 | 114 mpeg2_cpu_state_restore = state_restore_mmx; |
115 } | |
116 #endif | |
26282
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
117 #ifdef ARCH_PPC |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
118 --- libmpeg2/decode.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
119 +++ libmpeg2/decode.c 2006-06-16 20:12:50.000000000 +0200 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
120 @@ -351,6 +355,15 @@ |
12937 | 121 fbuf->buf[1] = buf[1]; |
122 fbuf->buf[2] = buf[2]; | |
123 fbuf->id = id; | |
124 + // HACK! FIXME! At first I frame, copy pointers to prediction frame too! | |
125 + if (mpeg2dec->custom_fbuf && !mpeg2dec->fbuf[1]->buf[0]){ | |
126 + mpeg2dec->fbuf[1]->buf[0]=buf[0]; | |
127 + mpeg2dec->fbuf[1]->buf[1]=buf[1]; | |
128 + mpeg2dec->fbuf[1]->buf[2]=buf[2]; | |
129 + mpeg2dec->fbuf[1]->id=NULL; | |
130 + } | |
131 +// printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n", | |
132 +// mpeg2dec->fbuf[0]->buf[0],mpeg2dec->fbuf[1]->buf[0],mpeg2dec->fbuf[2]->buf[0]); | |
133 } | |
134 | |
135 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf) | |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
136 --- libmpeg2/header.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
137 +++ libmpeg2/header.c 2006-06-16 20:12:50.000000000 +0200 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
138 @@ -100,6 +104,9 @@ |
12937 | 139 mpeg2dec->decoder.convert = NULL; |
140 mpeg2dec->decoder.convert_id = NULL; | |
141 mpeg2dec->picture = mpeg2dec->pictures; | |
142 + memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t)); | |
143 + memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t)); | |
144 + memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t)); | |
145 mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf; | |
146 mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf; | |
147 mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf; | |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
148 @@ -551,6 +558,7 @@ |
12937 | 149 if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) { |
150 picture->nb_fields = (buffer[3] & 2) ? 3 : 2; | |
151 flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0; | |
152 + flags |= (buffer[3] & 2) ? PIC_FLAG_REPEAT_FIRST_FIELD : 0; | |
153 } else | |
154 picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2; | |
155 break; | |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
156 @@ -799,6 +807,7 @@ |
12937 | 157 mpeg2dec->scaled[index] = mpeg2dec->q_scale_type; |
158 for (i = 0; i < 32; i++) { | |
159 k = mpeg2dec->q_scale_type ? non_linear_scale[i] : (i << 1); | |
13147 | 160 + decoder->quantizer_scales[i] = k; |
12937 | 161 for (j = 0; j < 64; j++) |
162 decoder->quantizer_prescale[index][i][j] = | |
163 k * mpeg2dec->quantizer_matrix[index][j]; | |
26625
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
164 --- libmpeg2/idct.c (revision 26652) |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
165 +++ libmpeg2/idct.c (working copy) |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
166 @@ -250,7 +254,7 @@ |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
167 mpeg2_idct_mmx_init (); |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
168 } else |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
169 #endif |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
170 -#ifdef ARCH_PPC |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
171 +#ifdef HAVE_ALTIVEC |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
172 if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
173 mpeg2_idct_copy = mpeg2_idct_copy_altivec; |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
174 mpeg2_idct_add = mpeg2_idct_add_altivec; |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
175 --- libmpeg2/idct_mmx.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
176 +++ libmpeg2/idct_mmx.c 2006-06-16 20:12:50.000000000 +0200 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
177 @@ -23,7 +27,7 @@ |
13864 | 178 |
179 #include "config.h" | |
12937 | 180 |
13864 | 181 -#ifdef ARCH_X86 |
182 +#if defined(ARCH_X86) || defined(ARCH_X86_64) | |
183 | |
184 #include <inttypes.h> | |
12937 | 185 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
186 --- libmpeg2/motion_comp.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
187 +++ libmpeg2/motion_comp.c 2006-06-16 20:12:50.000000000 +0200 |
26625
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
188 @@ -46,7 +46,7 @@ |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
189 mpeg2_mc = mpeg2_mc_mmx; |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
190 else |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
191 #endif |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
192 -#ifdef ARCH_PPC |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
193 +#ifdef HAVE_ALTIVEC |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
194 if (accel & MPEG2_ACCEL_PPC_ALTIVEC) |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
195 mpeg2_mc = mpeg2_mc_altivec; |
5b89b42f6d50
Only compile and use libmpeg2 AltiVec code when AltiVec is available. The
diego
parents:
26595
diff
changeset
|
196 else |
26282
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
197 @@ -67,6 +61,13 @@ |
23236
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
198 mpeg2_mc = mpeg2_mc_vis; |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
199 else |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
200 #endif |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
201 +#ifdef ARCH_ARM |
26282
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
202 + if (accel & MPEG2_ACCEL_ARM_IWMMXT) |
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
203 + mpeg2_mc = mpeg2_mc_iwmmxt; |
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
204 + else if (accel & MPEG2_ACCEL_ARM) |
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
205 + mpeg2_mc = mpeg2_mc_arm; |
79ab4ecba54a
Revert local changes that pointlessly add #ifdefs all over libmpeg2 to disable
diego
parents:
26047
diff
changeset
|
206 + else |
23236
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
207 +#endif |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
208 mpeg2_mc = mpeg2_mc_c; |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
209 } |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
210 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
211 --- libmpeg2/motion_comp_mmx.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
212 +++ libmpeg2/motion_comp_mmx.c 2006-06-16 20:12:50.000000000 +0200 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
213 @@ -23,7 +27,7 @@ |
13864 | 214 |
215 #include "config.h" | |
216 | |
217 -#ifdef ARCH_X86 | |
218 +#if defined(ARCH_X86) || defined(ARCH_X86_64) | |
219 | |
220 #include <inttypes.h> | |
221 | |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
222 --- include/mpeg2.h 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
223 +++ libmpeg2/mpeg2.h 2006-06-16 20:12:50.000000000 +0200 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
224 @@ -82,6 +86,7 @@ |
13147 | 225 #define PIC_FLAG_COMPOSITE_DISPLAY 32 |
226 #define PIC_FLAG_SKIP 64 | |
227 #define PIC_FLAG_TAGS 128 | |
228 +#define PIC_FLAG_REPEAT_FIRST_FIELD 256 | |
229 #define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000 | |
230 | |
231 typedef struct mpeg2_picture_s { | |
26047 | 232 @@ -156,10 +160,13 @@ |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
233 #define MPEG2_ACCEL_X86_3DNOW 2 |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
234 #define MPEG2_ACCEL_X86_MMXEXT 4 |
26047 | 235 +#define MPEG2_ACCEL_X86_SSE2 8 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
236 #define MPEG2_ACCEL_PPC_ALTIVEC 1 |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
237 #define MPEG2_ACCEL_ALPHA 1 |
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
238 #define MPEG2_ACCEL_ALPHA_MVI 2 |
26046 | 239 #define MPEG2_ACCEL_SPARC_VIS 1 |
240 #define MPEG2_ACCEL_SPARC_VIS2 2 | |
241 +#define MPEG2_ACCEL_ARM 1 | |
242 +#define MPEG2_ACCEL_ARM_IWMMXT 2 | |
243 #define MPEG2_ACCEL_DETECT 0x80000000 | |
244 | |
245 uint32_t mpeg2_accel (uint32_t accel); | |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
246 --- libmpeg2/mpeg2_internal.h 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
247 +++ libmpeg2/mpeg2_internal.h 2006-06-16 20:12:50.000000000 +0200 |
26284 | 248 @@ -144,6 +148,11 @@ |
12937 | 249 int second_field; |
250 | |
251 int mpeg1; | |
252 + | |
13147 | 253 + int quantizer_scales[32]; |
12937 | 254 + int quantizer_scale; |
255 + char* quant_store; | |
256 + int quant_stride; | |
257 }; | |
258 | |
259 typedef struct { | |
26284 | 260 @@ -214,6 +224,9 @@ |
13147 | 261 int8_t q_scale_type, scaled[4]; |
262 uint8_t quantizer_matrix[4][64]; | |
263 uint8_t new_quantizer_matrix[4][64]; | |
264 + | |
265 + unsigned char *pending_buffer; | |
266 + int pending_length; | |
267 }; | |
268 | |
269 typedef struct { | |
23236
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
270 @@ -312,3 +312,5 @@ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
271 extern mpeg2_mc_t mpeg2_mc_altivec; |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
272 extern mpeg2_mc_t mpeg2_mc_alpha; |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
273 extern mpeg2_mc_t mpeg2_mc_vis; |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
274 +extern mpeg2_mc_t mpeg2_mc_arm; |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
275 +extern mpeg2_mc_t mpeg2_mc_iwmmxt; |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
276 --- libmpeg2/slice.c 2006-06-16 20:12:26.000000000 +0200 |
18730
93241711b635
sync with 18730 (Use MPlayer's CPU detection module instead of libmpeg2's)
gpoirier
parents:
14730
diff
changeset
|
277 +++ libmpeg2/slice.c 2006-06-16 20:12:50.000000000 +0200 |
19024
4733c3e4f353
Update with latest changes and make diff apply cleanly.
diego
parents:
18783
diff
changeset
|
278 @@ -142,6 +146,7 @@ |
13147 | 279 |
280 quantizer_scale_code = UBITS (bit_buf, 5); | |
281 DUMPBITS (bit_buf, bits, 5); | |
282 + decoder->quantizer_scale = decoder->quantizer_scales[quantizer_scale_code]; | |
283 | |
284 decoder->quantizer_matrix[0] = | |
285 decoder->quantizer_prescale[0][quantizer_scale_code]; | |
20640 | 286 @@ -1568,6 +1569,18 @@ |
12937 | 287 |
288 #define NEXT_MACROBLOCK \ | |
289 do { \ | |
20640 | 290 + if(decoder->quant_store) { \ |
291 + if (decoder->picture_structure == TOP_FIELD) \ | |
292 + decoder->quant_store[2*decoder->quant_stride*(decoder->v_offset>>4) \ | |
293 + +(decoder->offset>>4)] = decoder->quantizer_scale; \ | |
294 + else if (decoder->picture_structure == BOTTOM_FIELD) \ | |
295 + decoder->quant_store[2*decoder->quant_stride*(decoder->v_offset>>4) \ | |
296 + + decoder->quant_stride \ | |
297 + +(decoder->offset>>4)] = decoder->quantizer_scale; \ | |
298 + else \ | |
12937 | 299 + decoder->quant_store[decoder->quant_stride*(decoder->v_offset>>4) \ |
300 + +(decoder->offset>>4)] = decoder->quantizer_scale; \ | |
20640 | 301 + } \ |
12937 | 302 decoder->offset += 16; \ |
303 if (decoder->offset == decoder->width) { \ | |
304 do { /* just so we can use the break statement */ \ | |
21923
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
305 @@ -1604,6 +1604,12 @@ |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
306 } \ |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
307 } while (0) |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
308 |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
309 +static void motion_dummy (mpeg2_decoder_t * const decoder, |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
310 + motion_t * const motion, |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
311 + mpeg2_mc_fct * const * const table) |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
312 +{ |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
313 +} |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
314 + |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
315 void mpeg2_init_fbuf (mpeg2_decoder_t * decoder, uint8_t * current_fbuf[3], |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
316 uint8_t * forward_fbuf[3], uint8_t * backward_fbuf[3]) |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
317 { |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
318 @@ -1661,7 +1667,9 @@ |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
319 |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
320 if (decoder->mpeg1) { |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
321 decoder->motion_parser[0] = motion_zero_420; |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
322 + decoder->motion_parser[MC_FIELD] = motion_dummy; |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
323 decoder->motion_parser[MC_FRAME] = motion_mp1; |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
324 + decoder->motion_parser[MC_DMV] = motion_dummy; |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
325 decoder->motion_parser[4] = motion_reuse_420; |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
326 } else if (decoder->picture_structure == FRAME_PICTURE) { |
1658f7d97b27
fix crash with http://sam.zoy.org/zzuf/lol-mplayer.m2v
henry
parents:
21571
diff
changeset
|
327 if (decoder->chroma_format == 0) { |
21571 | 328 --- libmpeg2/idct_altivec.c 2004/08/02 11:26:43 12933 |
329 +++ libmpeg2/idct_altivec.c 2005/05/15 20:11:34 15484 | |
330 @@ -41,7 +41,7 @@ | |
331 typedef vector signed int vector_s32_t; | |
332 typedef vector unsigned int vector_u32_t; | |
333 | |
334 -#if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) | |
25980
11181df06389
Do not check for __APPLE_ALTIVEC__, just check for __APPLE_CC__.
diego
parents:
24720
diff
changeset
|
335 +#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_CC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) |
21571 | 336 /* work around gcc <3.3 vec_mergel bug */ |
337 static inline vector_s16_t my_vec_mergel (vector_s16_t const A, | |
338 vector_s16_t const B) | |
339 @@ -56,10 +56,10 @@ | |
340 #define vec_mergel my_vec_mergel | |
341 #endif | |
342 | |
343 -#ifdef HAVE_ALTIVEC_H /* gnu */ | |
344 -#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} | |
345 -#else /* apple */ | |
25980
11181df06389
Do not check for __APPLE_ALTIVEC__, just check for __APPLE_CC__.
diego
parents:
24720
diff
changeset
|
346 +#if defined(__APPLE_CC__) /* apple */ |
21571 | 347 #define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h) |
348 +#else /* gnu */ | |
349 +#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} | |
350 #endif | |
351 | |
352 static const vector_s16_t constants ATTR_ALIGN(16) = | |
23236
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
353 Index: libmpeg2/motion_comp_arm.c |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
354 =================================================================== |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
355 --- libmpeg2/motion_comp_arm.c (revision 0) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
356 +++ libmpeg2/motion_comp_arm.c (revision 0) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
357 @@ -0,0 +1,187 @@ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
358 +/* |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
359 + * motion_comp_arm.c |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
360 + * Copyright (C) 2004 AGAWA Koji <i (AT) atty (DOT) jp> |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
361 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
362 + * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
363 + * See http://libmpeg2.sourceforge.net/ for updates. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
364 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
365 + * mpeg2dec is free software; you can redistribute it and/or modify |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
366 + * it under the terms of the GNU General Public License as published by |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
367 + * the Free Software Foundation; either version 2 of the License, or |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
368 + * (at your option) any later version. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
369 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
370 + * mpeg2dec is distributed in the hope that it will be useful, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
371 + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
372 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
373 + * GNU General Public License for more details. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
374 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
375 + * You should have received a copy of the GNU General Public License |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
376 + * along with this program; if not, write to the Free Software |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
377 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
378 + */ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
379 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
380 +#include "config.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
381 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
382 +#ifdef ARCH_ARM |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
383 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
384 +#include <inttypes.h> |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
385 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
386 +#include "mpeg2.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
387 +#include "attributes.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
388 +#include "mpeg2_internal.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
389 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
390 +#define avg2(a,b) ((a+b+1)>>1) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
391 +#define avg4(a,b,c,d) ((a+b+c+d+2)>>2) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
392 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
393 +#define predict_o(i) (ref[i]) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
394 +#define predict_x(i) (avg2 (ref[i], ref[i+1])) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
395 +#define predict_y(i) (avg2 (ref[i], (ref+stride)[i])) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
396 +#define predict_xy(i) (avg4 (ref[i], ref[i+1], \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
397 + (ref+stride)[i], (ref+stride)[i+1])) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
398 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
399 +#define put(predictor,i) dest[i] = predictor (i) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
400 +#define avg(predictor,i) dest[i] = avg2 (predictor (i), dest[i]) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
401 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
402 +/* mc function template */ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
403 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
404 +#define MC_FUNC(op,xy) \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
405 +static void inline MC_##op##_##xy##_16_c (uint8_t * dest, const uint8_t * ref, \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
406 + const int stride, int height) \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
407 +{ \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
408 + do { \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
409 + op (predict_##xy, 0); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
410 + op (predict_##xy, 1); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
411 + op (predict_##xy, 2); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
412 + op (predict_##xy, 3); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
413 + op (predict_##xy, 4); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
414 + op (predict_##xy, 5); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
415 + op (predict_##xy, 6); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
416 + op (predict_##xy, 7); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
417 + op (predict_##xy, 8); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
418 + op (predict_##xy, 9); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
419 + op (predict_##xy, 10); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
420 + op (predict_##xy, 11); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
421 + op (predict_##xy, 12); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
422 + op (predict_##xy, 13); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
423 + op (predict_##xy, 14); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
424 + op (predict_##xy, 15); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
425 + ref += stride; \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
426 + dest += stride; \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
427 + } while (--height); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
428 +} \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
429 +static void MC_##op##_##xy##_8_c (uint8_t * dest, const uint8_t * ref, \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
430 + const int stride, int height) \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
431 +{ \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
432 + do { \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
433 + op (predict_##xy, 0); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
434 + op (predict_##xy, 1); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
435 + op (predict_##xy, 2); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
436 + op (predict_##xy, 3); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
437 + op (predict_##xy, 4); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
438 + op (predict_##xy, 5); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
439 + op (predict_##xy, 6); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
440 + op (predict_##xy, 7); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
441 + ref += stride; \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
442 + dest += stride; \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
443 + } while (--height); \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
444 +} \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
445 +/* definitions of the actual mc functions */ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
446 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
447 +MC_FUNC (put,o) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
448 +MC_FUNC (avg,o) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
449 +MC_FUNC (put,x) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
450 +MC_FUNC (avg,x) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
451 +MC_FUNC (put,y) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
452 +MC_FUNC (avg,y) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
453 +MC_FUNC (put,xy) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
454 +MC_FUNC (avg,xy) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
455 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
456 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
457 +extern void MC_put_o_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
458 + int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
459 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
460 +extern void MC_put_x_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
461 + int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
462 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
463 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
464 +static void MC_put_y_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
465 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
466 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
467 + MC_put_y_16_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
468 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
469 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
470 +static void MC_put_xy_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
471 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
472 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
473 + MC_put_xy_16_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
474 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
475 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
476 +extern void MC_put_o_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
477 + int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
478 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
479 +extern void MC_put_x_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
480 + int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
481 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
482 +static void MC_put_y_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
483 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
484 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
485 + MC_put_y_8_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
486 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
487 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
488 +static void MC_put_xy_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
489 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
490 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
491 + MC_put_xy_8_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
492 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
493 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
494 +static void MC_avg_o_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
495 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
496 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
497 + MC_avg_o_16_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
498 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
499 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
500 +static void MC_avg_x_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
501 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
502 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
503 + MC_avg_x_16_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
504 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
505 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
506 +static void MC_avg_y_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
507 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
508 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
509 + MC_avg_y_16_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
510 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
511 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
512 +static void MC_avg_xy_16_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
513 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
514 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
515 + MC_avg_xy_16_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
516 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
517 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
518 +static void MC_avg_o_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
519 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
520 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
521 + MC_avg_o_8_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
522 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
523 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
524 +static void MC_avg_x_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
525 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
526 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
527 + MC_avg_x_8_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
528 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
529 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
530 +static void MC_avg_y_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
531 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
532 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
533 + MC_avg_y_8_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
534 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
535 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
536 +static void MC_avg_xy_8_arm (uint8_t * dest, const uint8_t * ref, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
537 + int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
538 +{ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
539 + MC_avg_xy_8_c(dest, ref, stride, height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
540 +} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
541 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
542 +MPEG2_MC_EXTERN (arm) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
543 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
544 +#endif |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
545 Index: libmpeg2/motion_comp_arm_s.S |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
546 =================================================================== |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
547 --- libmpeg2/motion_comp_arm_s.S (revision 0) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
548 +++ libmpeg2/motion_comp_arm_s.S (revision 0) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
549 @@ -0,0 +1,322 @@ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
550 +@ motion_comp_arm_s.S |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
551 +@ Copyright (C) 2004 AGAWA Koji <i (AT) atty (DOT) jp> |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
552 +@ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
553 +@ This file is part of mpeg2dec, a free MPEG-2 video stream decoder. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
554 +@ See http://libmpeg2.sourceforge.net/ for updates. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
555 +@ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
556 +@ mpeg2dec is free software; you can redistribute it and/or modify |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
557 +@ it under the terms of the GNU General Public License as published by |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
558 +@ the Free Software Foundation; either version 2 of the License, or |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
559 +@ (at your option) any later version. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
560 +@ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
561 +@ mpeg2dec is distributed in the hope that it will be useful, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
562 +@ but WITHOUT ANY WARRANTY; without even the implied warranty of |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
563 +@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
564 +@ GNU General Public License for more details. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
565 +@ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
566 +@ You should have received a copy of the GNU General Public License |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
567 +@ along with this program; if not, write to the Free Software |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
568 +@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
569 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
570 + .text |
26283
62abac0c8637
cosmetics: Fix some typos and trailing whitespace in local changes.
diego
parents:
26282
diff
changeset
|
571 + |
23236
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
572 +@ ---------------------------------------------------------------- |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
573 + .align |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
574 + .global MC_put_o_16_arm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
575 +MC_put_o_16_arm: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
576 + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
577 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
578 + stmfd sp!, {r4-r11, lr} @ R14 is also called LR |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
579 + and r4, r1, #3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
580 + adr r5, MC_put_o_16_arm_align_jt |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
581 + add r5, r5, r4, lsl #2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
582 + ldr pc, [r5] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
583 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
584 +MC_put_o_16_arm_align0: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
585 + ldmia r1, {r4-r7} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
586 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
587 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
588 + stmia r0, {r4-r7} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
589 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
590 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
591 + bne MC_put_o_16_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
592 + ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
593 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
594 +.macro PROC shift |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
595 + ldmia r1, {r4-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
596 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
597 + mov r9, r4, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
598 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
599 + mov r10, r5, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
600 + orr r9, r9, r5, lsl #(32-\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
601 + mov r11, r6, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
602 + orr r10, r10, r6, lsl #(32-\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
603 + mov r12, r7, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
604 + orr r11, r11, r7, lsl #(32-\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
605 + orr r12, r12, r8, lsl #(32-\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
606 + stmia r0, {r9-r12} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
607 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
608 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
609 +.endm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
610 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
611 +MC_put_o_16_arm_align1: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
612 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
613 +1: PROC(8) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
614 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
615 + ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
616 +MC_put_o_16_arm_align2: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
617 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
618 +1: PROC(16) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
619 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
620 + ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
621 +MC_put_o_16_arm_align3: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
622 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
623 +1: PROC(24) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
624 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
625 + ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
626 +MC_put_o_16_arm_align_jt: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
627 + .word MC_put_o_16_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
628 + .word MC_put_o_16_arm_align1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
629 + .word MC_put_o_16_arm_align2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
630 + .word MC_put_o_16_arm_align3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
631 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
632 +@ ---------------------------------------------------------------- |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
633 + .align |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
634 + .global MC_put_o_8_arm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
635 +MC_put_o_8_arm: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
636 + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
637 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
638 + stmfd sp!, {r4-r10, lr} @ R14 is also called LR |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
639 + and r4, r1, #3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
640 + adr r5, MC_put_o_8_arm_align_jt |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
641 + add r5, r5, r4, lsl #2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
642 + ldr pc, [r5] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
643 +MC_put_o_8_arm_align0: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
644 + ldmia r1, {r4-r5} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
645 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
646 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
647 + stmia r0, {r4-r5} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
648 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
649 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
650 + bne MC_put_o_8_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
651 + ldmfd sp!, {r4-r10, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
652 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
653 +.macro PROC8 shift |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
654 + ldmia r1, {r4-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
655 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
656 + mov r9, r4, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
657 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
658 + mov r10, r5, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
659 + orr r9, r9, r5, lsl #(32-\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
660 + orr r10, r10, r6, lsl #(32-\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
661 + stmia r0, {r9-r10} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
662 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
663 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
664 +.endm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
665 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
666 +MC_put_o_8_arm_align1: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
667 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
668 +1: PROC8(8) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
669 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
670 + ldmfd sp!, {r4-r10, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
671 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
672 +MC_put_o_8_arm_align2: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
673 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
674 +1: PROC8(16) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
675 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
676 + ldmfd sp!, {r4-r10, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
677 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
678 +MC_put_o_8_arm_align3: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
679 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
680 +1: PROC8(24) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
681 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
682 + ldmfd sp!, {r4-r10, pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
683 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
684 +MC_put_o_8_arm_align_jt: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
685 + .word MC_put_o_8_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
686 + .word MC_put_o_8_arm_align1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
687 + .word MC_put_o_8_arm_align2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
688 + .word MC_put_o_8_arm_align3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
689 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
690 +@ ---------------------------------------------------------------- |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
691 +.macro AVG_PW rW1, rW2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
692 + mov \rW2, \rW2, lsl #24 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
693 + orr \rW2, \rW2, \rW1, lsr #8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
694 + eor r9, \rW1, \rW2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
695 + and \rW2, \rW1, \rW2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
696 + and r10, r9, r12 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
697 + add \rW2, \rW2, r10, lsr #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
698 + and r10, r9, r11 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
699 + add \rW2, \rW2, r10 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
700 +.endm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
701 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
702 + .align |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
703 + .global MC_put_x_16_arm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
704 +MC_put_x_16_arm: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
705 + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
706 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
707 + stmfd sp!, {r4-r11,lr} @ R14 is also called LR |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
708 + and r4, r1, #3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
709 + adr r5, MC_put_x_16_arm_align_jt |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
710 + ldr r11, [r5] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
711 + mvn r12, r11 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
712 + add r5, r5, r4, lsl #2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
713 + ldr pc, [r5, #4] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
714 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
715 +.macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
716 + mov \R0, \R0, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
717 + orr \R0, \R0, \R1, lsl #(32 - \shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
718 + mov \R1, \R1, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
719 + orr \R1, \R1, \R2, lsl #(32 - \shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
720 + mov \R2, \R2, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
721 + orr \R2, \R2, \R3, lsl #(32 - \shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
722 + mov \R3, \R3, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
723 + orr \R3, \R3, \R4, lsl #(32 - \shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
724 + mov \R4, \R4, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
725 +@ and \R4, \R4, #0xFF |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
726 +.endm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
727 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
728 +MC_put_x_16_arm_align0: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
729 + ldmia r1, {r4-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
730 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
731 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
732 + AVG_PW r7, r8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
733 + AVG_PW r6, r7 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
734 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
735 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
736 + stmia r0, {r5-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
737 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
738 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
739 + bne MC_put_x_16_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
740 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
741 +MC_put_x_16_arm_align1: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
742 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
743 +1: ldmia r1, {r4-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
744 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
745 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
746 + ADJ_ALIGN_QW 8, r4, r5, r6, r7, r8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
747 + AVG_PW r7, r8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
748 + AVG_PW r6, r7 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
749 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
750 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
751 + stmia r0, {r5-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
752 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
753 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
754 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
755 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
756 +MC_put_x_16_arm_align2: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
757 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
758 +1: ldmia r1, {r4-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
759 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
760 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
761 + ADJ_ALIGN_QW 16, r4, r5, r6, r7, r8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
762 + AVG_PW r7, r8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
763 + AVG_PW r6, r7 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
764 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
765 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
766 + stmia r0, {r5-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
767 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
768 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
769 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
770 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
771 +MC_put_x_16_arm_align3: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
772 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
773 +1: ldmia r1, {r4-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
774 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
775 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
776 + ADJ_ALIGN_QW 24, r4, r5, r6, r7, r8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
777 + AVG_PW r7, r8 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
778 + AVG_PW r6, r7 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
779 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
780 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
781 + stmia r0, {r5-r8} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
782 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
783 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
784 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
785 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
786 +MC_put_x_16_arm_align_jt: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
787 + .word 0x01010101 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
788 + .word MC_put_x_16_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
789 + .word MC_put_x_16_arm_align1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
790 + .word MC_put_x_16_arm_align2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
791 + .word MC_put_x_16_arm_align3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
792 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
793 +@ ---------------------------------------------------------------- |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
794 + .align |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
795 + .global MC_put_x_8_arm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
796 +MC_put_x_8_arm: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
797 + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
798 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
799 + stmfd sp!, {r4-r11,lr} @ R14 is also called LR |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
800 + and r4, r1, #3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
801 + adr r5, MC_put_x_8_arm_align_jt |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
802 + ldr r11, [r5] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
803 + mvn r12, r11 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
804 + add r5, r5, r4, lsl #2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
805 + ldr pc, [r5, #4] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
806 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
807 +.macro ADJ_ALIGN_DW shift, R0, R1, R2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
808 + mov \R0, \R0, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
809 + orr \R0, \R0, \R1, lsl #(32 - \shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
810 + mov \R1, \R1, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
811 + orr \R1, \R1, \R2, lsl #(32 - \shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
812 + mov \R2, \R2, lsr #(\shift) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
813 +@ and \R4, \R4, #0xFF |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
814 +.endm |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
815 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
816 +MC_put_x_8_arm_align0: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
817 + ldmia r1, {r4-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
818 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
819 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
820 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
821 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
822 + stmia r0, {r5-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
823 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
824 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
825 + bne MC_put_x_8_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
826 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
827 +MC_put_x_8_arm_align1: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
828 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
829 +1: ldmia r1, {r4-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
830 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
831 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
832 + ADJ_ALIGN_DW 8, r4, r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
833 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
834 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
835 + stmia r0, {r5-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
836 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
837 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
838 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
839 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
840 +MC_put_x_8_arm_align2: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
841 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
842 +1: ldmia r1, {r4-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
843 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
844 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
845 + ADJ_ALIGN_DW 16, r4, r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
846 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
847 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
848 + stmia r0, {r5-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
849 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
850 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
851 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
852 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
853 +MC_put_x_8_arm_align3: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
854 + and r1, r1, #0xFFFFFFFC |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
855 +1: ldmia r1, {r4-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
856 + add r1, r1, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
857 + pld [r1] |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
858 + ADJ_ALIGN_DW 24, r4, r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
859 + AVG_PW r5, r6 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
860 + AVG_PW r4, r5 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
861 + stmia r0, {r5-r6} |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
862 + subs r3, r3, #1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
863 + add r0, r0, r2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
864 + bne 1b |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
865 + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
866 +MC_put_x_8_arm_align_jt: |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
867 + .word 0x01010101 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
868 + .word MC_put_x_8_arm_align0 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
869 + .word MC_put_x_8_arm_align1 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
870 + .word MC_put_x_8_arm_align2 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
871 + .word MC_put_x_8_arm_align3 |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
872 Index: libmpeg2/motion_comp_iwmmxt.c |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
873 =================================================================== |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
874 --- libmpeg2/motion_comp_iwmmxt.c (revision 0) |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
875 +++ libmpeg2/motion_comp_iwmmxt.c (revision 0) |
26044 | 876 @@ -0,0 +1,59 @@ |
23236
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
877 +/* |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
878 + * motion_comp_iwmmxt.c |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
879 + * Copyright (C) 2004 AGAWA Koji <i (AT) atty (DOT) jp> |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
880 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
881 + * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
882 + * See http://libmpeg2.sourceforge.net/ for updates. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
883 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
884 + * mpeg2dec is free software; you can redistribute it and/or modify |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
885 + * it under the terms of the GNU General Public License as published by |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
886 + * the Free Software Foundation; either version 2 of the License, or |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
887 + * (at your option) any later version. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
888 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
889 + * mpeg2dec is distributed in the hope that it will be useful, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
890 + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
891 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
892 + * GNU General Public License for more details. |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
893 + * |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
894 + * You should have received a copy of the GNU General Public License |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
895 + * along with this program; if not, write to the Free Software |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
896 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
897 + */ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
898 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
899 +#include "config.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
900 + |
26044 | 901 +#if defined(ARCH_ARM) && defined(HAVE_IWMMXT) |
23236
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
902 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
903 +#include <inttypes.h> |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
904 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
905 +#include "mpeg2.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
906 +#include "attributes.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
907 +#include "mpeg2_internal.h" |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
908 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
909 +/* defined in libavcodec */ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
910 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
911 +extern void put_pixels16_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
912 +extern void put_pixels16_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
913 +extern void put_pixels16_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
914 +extern void put_pixels16_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
915 +extern void put_pixels8_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
916 +extern void put_pixels8_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
917 +extern void put_pixels8_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
918 +extern void put_pixels8_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
919 +extern void avg_pixels16_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
920 +extern void avg_pixels16_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
921 +extern void avg_pixels16_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
922 +extern void avg_pixels16_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
923 +extern void avg_pixels8_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
924 +extern void avg_pixels8_x2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
925 +extern void avg_pixels8_y2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
926 +extern void avg_pixels8_xy2_iwmmxt(uint8_t * dest, const uint8_t * ref, const int stride, int height); |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
927 + |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
928 +mpeg2_mc_t mpeg2_mc_iwmmxt = { |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
929 + {put_pixels16_iwmmxt, put_pixels16_x2_iwmmxt, put_pixels16_y2_iwmmxt, put_pixels16_xy2_iwmmxt, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
930 + put_pixels8_iwmmxt, put_pixels8_x2_iwmmxt, put_pixels8_y2_iwmmxt, put_pixels8_xy2_iwmmxt}, \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
931 + {avg_pixels16_iwmmxt, avg_pixels16_x2_iwmmxt, avg_pixels16_y2_iwmmxt, avg_pixels16_xy2_iwmmxt, |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
932 + avg_pixels8_iwmmxt, avg_pixels8_x2_iwmmxt, avg_pixels8_y2_iwmmxt, avg_pixels8_xy2_iwmmxt}, \ |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
933 +}; |
f0ddd02aec27
iWMMXt-accelerated DCT and motion compensation for ARM processors
gpoirier
parents:
21923
diff
changeset
|
934 + |
26044 | 935 +#endif /* defined(ARCH_ARM) && defined(HAVE_IWMMXT) */ |