Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[openembedded.git] / packages / gstreamer / gst-ffmpeg / armv5.patch
1 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/configure.ac gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/configure.ac
2 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/configure.ac  2006-09-23 15:35:21.000000000 +0200
3 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/configure.ac      2007-05-01 12:23:39.000000000 +0200
4 @@ -190,7 +190,7 @@
5      ARCH_X86=yes
6      ;;
7    # armv4l is a subset of armv5tel
8 -  armv4l|armv5tel)
9 +  arm|armv4l|armv5tel|armv5te)
10      TARGET_ARCH="armv4l"
11      ARCH_ARMV4L=yes
12      ;;
13 @@ -364,11 +364,8 @@
14  AC_FF_ALLOW_DISABLE(HAVE_IWMMXT, iwmmxt, use ARM/IWMMXT optimizations,[
15    if test x$TARGET_ARCH = xarmv4l; then
16      AC_MSG_CHECKING(for support of IWMMXT optimizations)
17 -    AC_TRY_RUN([
18 -        int main () {
19 +    AC_TRY_COMPILE(,[
20            __asm__ __volatile__ ("wunpckelub wr6, wr4");
21 -          return 0;
22 -        }
23        ],[ HAVE_IWMMXT=yes && AC_MSG_RESULT(yes) ],[
24          HAVE_IWMMXT=no && AC_MSG_RESULT(no) ])
25    else
26 @@ -376,6 +373,19 @@
27    fi
28  ])
29  
30 +dnl ARMV5TE
31 +AC_FF_ALLOW_DISABLE(HAVE_ARMV5TE, armv5te, use ARMV5TE optimizations,[
32 +  if test x$TARGET_ARCH = xarmv4l; then
33 +    AC_MSG_CHECKING(for support of ARMV5TE specific instructions)
34 +    AC_TRY_COMPILE(, [
35 +          __asm__ __volatile__ ("smulbb a4,ip,a3");
36 +      ],[ HAVE_ARMV5TE=yes && AC_MSG_RESULT(yes) ],[
37 +        HAVE_ARMV5TE=no && AC_MSG_RESULT(no) ])
38 +  else
39 +    HAVE_ARMV5TE=no
40 +  fi
41 +])
42 +
43  dnl GProf (-p)
44  AC_FF_ALLOW_ENABLE(HAVE_GPROF, gprof, profiling with gprof,[
45    GPROF_FLAGS="-p"
46 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_arm.c gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_arm.c
47 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_arm.c       2006-09-20 20:55:37.000000000 +0200
48 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_arm.c   2007-05-01 12:23:40.000000000 +0200
49   * ARMv4L optimized DSP utils
50   * Copyright (c) 2001 Lionel Ulmer.
51   *
52 - * This library is free software; you can redistribute it and/or
53 + * This file is part of FFmpeg.
54 + *
55 + * FFmpeg is free software; you can redistribute it and/or
56   * modify it under the terms of the GNU Lesser General Public
57   * License as published by the Free Software Foundation; either
58 - * version 2 of the License, or (at your option) any later version.
59 + * version 2.1 of the License, or (at your option) any later version.
60   *
61 - * This library is distributed in the hope that it will be useful,
62 + * FFmpeg is distributed in the hope that it will be useful,
63   * but WITHOUT ANY WARRANTY; without even the implied warranty of
64   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
65   * Lesser General Public License for more details.
66   *
67   * You should have received a copy of the GNU Lesser General Public
68 - * License along with this library; if not, write to the Free Software
69 + * License along with FFmpeg; if not, write to the Free Software
70   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
71   */
72  
73 -#include "dsputil.h"
74 +#include "../dsputil.h"
75  #ifdef HAVE_IPP
76  #include "ipp.h"
77  #endif
78 @@ -27,6 +29,12 @@
79  extern void j_rev_dct_ARM(DCTELEM *data);
80  extern void simple_idct_ARM(DCTELEM *data);
81  
82 +extern void simple_idct_armv5te(DCTELEM *data);
83 +extern void simple_idct_put_armv5te(uint8_t *dest, int line_size,
84 +                                    DCTELEM *data);
85 +extern void simple_idct_add_armv5te(uint8_t *dest, int line_size,
86 +                                    DCTELEM *data);
87 +
88  /* XXX: local hack */
89  static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
90  static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
91 @@ -196,8 +204,10 @@
92      ff_add_pixels_clamped = c->add_pixels_clamped;
93  
94      if(idct_algo == FF_IDCT_AUTO){
95 -#ifdef HAVE_IPP
96 +#if defined(HAVE_IPP)
97          idct_algo = FF_IDCT_IPP;
98 +#elif defined(HAVE_ARMV5TE)
99 +        idct_algo = FF_IDCT_SIMPLEARMV5TE;
100  #else
101          idct_algo = FF_IDCT_ARM;
102  #endif
103 @@ -213,6 +223,13 @@
104          c->idct_add= simple_idct_ARM_add;
105          c->idct    = simple_idct_ARM;
106          c->idct_permutation_type= FF_NO_IDCT_PERM;
107 +#ifdef HAVE_ARMV5TE
108 +    } else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
109 +        c->idct_put= simple_idct_put_armv5te;
110 +        c->idct_add= simple_idct_add_armv5te;
111 +        c->idct    = simple_idct_armv5te;
112 +        c->idct_permutation_type = FF_NO_IDCT_PERM;
113 +#endif
114  #ifdef HAVE_IPP
115      } else if (idct_algo==FF_IDCT_IPP){
116          c->idct_put= simple_idct_ipp_put;
117 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_arm_s.S     2006-02-19 00:04:59.000000000 +0100
118 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_arm_s.S 2007-05-01 12:23:40.000000000 +0200
119 @@ -2,20 +2,29 @@
120  @ ARMv4L optimized DSP utils
121  @ Copyright (c) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
122  @
123 -@ This library is free software; you can redistribute it and/or
124 +@ This file is part of FFmpeg.
125 +@
126 +@ FFmpeg is free software; you can redistribute it and/or
127  @ modify it under the terms of the GNU Lesser General Public
128  @ License as published by the Free Software Foundation; either
129 -@ version 2 of the License, or (at your option) any later version.
130 +@ version 2.1 of the License, or (at your option) any later version.
131  @
132 -@ This library is distributed in the hope that it will be useful,
133 +@ FFmpeg is distributed in the hope that it will be useful,
134  @ but WITHOUT ANY WARRANTY; without even the implied warranty of
135  @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
136  @ Lesser General Public License for more details.
137  @
138  @ You should have received a copy of the GNU Lesser General Public
139 -@ License along with this library; if not, write to the Free Software
140 +@ License along with FFmpeg; if not, write to the Free Software
141  @ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
142  @
143 +#if defined(__ARM_ARCH_5__) || \
144 +    defined(__ARM_ARCH_5T__) || \
145 +    defined(__ARM_ARCH_5TE__)
146 +#define PLD(code...)   code
147 +#else
148 +#define PLD(code...)
149 +#endif
150  
151  .macro  ADJ_ALIGN_QUADWORD_D shift, Rd0, Rd1, Rd2, Rd3, Rn0, Rn1, Rn2, Rn3, Rn4
152          mov \Rd0, \Rn0, lsr #(\shift * 8)
153 @@ -74,7 +83,7 @@
154  put_pixels16_arm:
155          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
156          @ block = word aligned, pixles = unaligned
157 -        pld [r1]
158 +        PLD ( pld [r1] )
159          stmfd sp!, {r4-r11, lr} @ R14 is also called LR
160          adr r5, 5f
161          ands r4, r1, #3
162 @@ -85,7 +94,7 @@
163          ldmia r1, {r4-r7}
164          add r1, r1, r2
165          stmia r0, {r4-r7}
166 -        pld [r1]
167 +        PLD ( pld [r1] )
168          subs r3, r3, #1
169          add r0, r0, r2
170          bne 1b
171 @@ -95,7 +104,7 @@
172          ldmia r1, {r4-r8}
173          add r1, r1, r2
174          ADJ_ALIGN_QUADWORD_D 1, r9, r10, r11, r12, r4, r5, r6, r7, r8
175 -        pld [r1]
176 +        PLD ( pld [r1] )
177          subs r3, r3, #1
178          stmia r0, {r9-r12}
179          add r0, r0, r2
180 @@ -106,7 +115,7 @@
181          ldmia r1, {r4-r8}
182          add r1, r1, r2
183          ADJ_ALIGN_QUADWORD_D 2, r9, r10, r11, r12, r4, r5, r6, r7, r8
184 -        pld [r1]
185 +        PLD ( pld [r1] )
186          subs r3, r3, #1
187          stmia r0, {r9-r12}
188          add r0, r0, r2
189 @@ -117,7 +126,7 @@
190          ldmia r1, {r4-r8}
191          add r1, r1, r2
192          ADJ_ALIGN_QUADWORD_D 3, r9, r10, r11, r12, r4, r5, r6, r7, r8
193 -        pld [r1]
194 +        PLD ( pld [r1] )
195          subs r3, r3, #1
196          stmia r0, {r9-r12}
197          add r0, r0, r2
198 @@ -136,7 +145,7 @@
199  put_pixels8_arm:
200          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
201          @ block = word aligned, pixles = unaligned
202 -        pld [r1]
203 +        PLD ( pld [r1] )
204          stmfd sp!, {r4-r5,lr} @ R14 is also called LR
205          adr r5, 5f
206          ands r4, r1, #3
207 @@ -147,7 +156,7 @@
208          ldmia r1, {r4-r5}
209          add r1, r1, r2
210          subs r3, r3, #1
211 -        pld [r1]
212 +        PLD ( pld [r1] )
213          stmia r0, {r4-r5}
214          add r0, r0, r2
215          bne 1b
216 @@ -157,7 +166,7 @@
217          ldmia r1, {r4-r5, r12}
218          add r1, r1, r2
219          ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r12
220 -        pld [r1]
221 +        PLD ( pld [r1] )
222          subs r3, r3, #1
223          stmia r0, {r4-r5}
224          add r0, r0, r2
225 @@ -168,7 +177,7 @@
226          ldmia r1, {r4-r5, r12}
227          add r1, r1, r2
228          ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r12
229 -        pld [r1]
230 +        PLD ( pld [r1] )
231          subs r3, r3, #1
232          stmia r0, {r4-r5}
233          add r0, r0, r2
234 @@ -179,7 +188,7 @@
235          ldmia r1, {r4-r5, r12}
236          add r1, r1, r2
237          ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r12
238 -        pld [r1]
239 +        PLD ( pld [r1] )
240          subs r3, r3, #1
241          stmia r0, {r4-r5}
242          add r0, r0, r2
243 @@ -198,7 +207,7 @@
244  put_pixels8_x2_arm:
245          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
246          @ block = word aligned, pixles = unaligned
247 -        pld [r1]
248 +        PLD ( pld [r1] )
249          stmfd sp!, {r4-r10,lr} @ R14 is also called LR
250          adr r5, 5f
251          ands r4, r1, #3
252 @@ -210,7 +219,7 @@
253          ldmia r1, {r4-r5, r10}
254          add r1, r1, r2
255          ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
256 -        pld [r1]
257 +        PLD ( pld [r1] )
258          RND_AVG32 r8, r9, r4, r5, r6, r7, r12
259          subs r3, r3, #1
260          stmia r0, {r8-r9}
261 @@ -223,7 +232,7 @@
262          add r1, r1, r2
263          ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
264          ADJ_ALIGN_DOUBLEWORD_D 2, r8, r9, r4, r5, r10
265 -        pld [r1]
266 +        PLD ( pld [r1] )
267          RND_AVG32 r4, r5, r6, r7, r8, r9, r12
268          subs r3, r3, #1
269          stmia r0, {r4-r5}
270 @@ -236,7 +245,7 @@
271          add r1, r1, r2
272          ADJ_ALIGN_DOUBLEWORD_D 2, r6, r7, r4, r5, r10
273          ADJ_ALIGN_DOUBLEWORD_D 3, r8, r9, r4, r5, r10
274 -        pld [r1]
275 +        PLD ( pld [r1] )
276          RND_AVG32 r4, r5, r6, r7, r8, r9, r12
277          subs r3, r3, #1
278          stmia r0, {r4-r5}
279 @@ -248,7 +257,7 @@
280          ldmia r1, {r4-r5, r10}
281          add r1, r1, r2
282          ADJ_ALIGN_DOUBLEWORD_D 3, r6, r7, r4, r5, r10
283 -        pld [r1]
284 +        PLD ( pld [r1] )
285          RND_AVG32 r8, r9, r6, r7, r5, r10, r12
286          subs r3, r3, #1
287          stmia r0, {r8-r9}
288 @@ -267,7 +276,7 @@
289  put_no_rnd_pixels8_x2_arm:
290          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
291          @ block = word aligned, pixles = unaligned
292 -        pld [r1]
293 +        PLD ( pld [r1] )
294          stmfd sp!, {r4-r10,lr} @ R14 is also called LR
295          adr r5, 5f
296          ands r4, r1, #3
297 @@ -279,7 +288,7 @@
298          ldmia r1, {r4-r5, r10}
299          add r1, r1, r2
300          ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
301 -        pld [r1]
302 +        PLD ( pld [r1] )
303          NO_RND_AVG32 r8, r9, r4, r5, r6, r7, r12
304          subs r3, r3, #1
305          stmia r0, {r8-r9}
306 @@ -292,7 +301,7 @@
307          add r1, r1, r2
308          ADJ_ALIGN_DOUBLEWORD_D 1, r6, r7, r4, r5, r10
309          ADJ_ALIGN_DOUBLEWORD_D 2, r8, r9, r4, r5, r10
310 -        pld [r1]
311 +        PLD ( pld [r1] )
312          NO_RND_AVG32 r4, r5, r6, r7, r8, r9, r12
313          subs r3, r3, #1
314          stmia r0, {r4-r5}
315 @@ -305,7 +314,7 @@
316          add r1, r1, r2
317          ADJ_ALIGN_DOUBLEWORD_D 2, r6, r7, r4, r5, r10
318          ADJ_ALIGN_DOUBLEWORD_D 3, r8, r9, r4, r5, r10
319 -        pld [r1]
320 +        PLD ( pld [r1] )
321          NO_RND_AVG32 r4, r5, r6, r7, r8, r9, r12
322          subs r3, r3, #1
323          stmia r0, {r4-r5}
324 @@ -317,7 +326,7 @@
325          ldmia r1, {r4-r5, r10}
326          add r1, r1, r2
327          ADJ_ALIGN_DOUBLEWORD_D 3, r6, r7, r4, r5, r10
328 -        pld [r1]
329 +        PLD ( pld [r1] )
330          NO_RND_AVG32 r8, r9, r6, r7, r5, r10, r12
331          subs r3, r3, #1
332          stmia r0, {r8-r9}
333 @@ -338,7 +347,7 @@
334  put_pixels8_y2_arm:
335          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
336          @ block = word aligned, pixles = unaligned
337 -        pld [r1]
338 +        PLD ( pld [r1] )
339          stmfd sp!, {r4-r11,lr} @ R14 is also called LR
340          adr r5, 5f
341          ands r4, r1, #3
342 @@ -352,13 +361,13 @@
343          add r1, r1, r2
344  6:      ldmia r1, {r6-r7}
345          add r1, r1, r2
346 -        pld [r1]
347 +        PLD ( pld [r1] )
348          RND_AVG32 r8, r9, r4, r5, r6, r7, r12
349          ldmia r1, {r4-r5}
350          add r1, r1, r2
351          stmia r0, {r8-r9}
352          add r0, r0, r2
353 -        pld [r1]
354 +        PLD ( pld [r1] )
355          RND_AVG32 r8, r9, r6, r7, r4, r5, r12
356          subs r3, r3, #1
357          stmia r0, {r8-r9}
358 @@ -369,18 +378,18 @@
359  2:
360          ldmia r1, {r4-r6}
361          add r1, r1, r2
362 -        pld [r1]
363 +        PLD ( pld [r1] )
364          ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
365  6:      ldmia r1, {r7-r9}
366          add r1, r1, r2
367 -        pld [r1]
368 +        PLD ( pld [r1] )
369          ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
370          RND_AVG32 r10, r11, r4, r5, r7, r8, r12
371          stmia r0, {r10-r11}
372          add r0, r0, r2
373          ldmia r1, {r4-r6}
374          add r1, r1, r2
375 -        pld [r1]
376 +        PLD ( pld [r1] )
377          ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
378          subs r3, r3, #1
379          RND_AVG32 r10, r11, r7, r8, r4, r5, r12
380 @@ -392,18 +401,18 @@
381  3:
382          ldmia r1, {r4-r6}
383          add r1, r1, r2
384 -        pld [r1]
385 +        PLD ( pld [r1] )
386          ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
387  6:      ldmia r1, {r7-r9}
388          add r1, r1, r2
389 -        pld [r1]
390 +        PLD ( pld [r1] )
391          ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
392          RND_AVG32 r10, r11, r4, r5, r7, r8, r12
393          stmia r0, {r10-r11}
394          add r0, r0, r2
395          ldmia r1, {r4-r6}
396          add r1, r1, r2
397 -        pld [r1]
398 +        PLD ( pld [r1] )
399          ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
400          subs r3, r3, #1
401          RND_AVG32 r10, r11, r7, r8, r4, r5, r12
402 @@ -415,18 +424,18 @@
403  4:
404          ldmia r1, {r4-r6}
405          add r1, r1, r2
406 -        pld [r1]
407 +        PLD ( pld [r1] )
408          ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
409  6:      ldmia r1, {r7-r9}
410          add r1, r1, r2
411 -        pld [r1]
412 +        PLD ( pld [r1] )
413          ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
414          RND_AVG32 r10, r11, r4, r5, r7, r8, r12
415          stmia r0, {r10-r11}
416          add r0, r0, r2
417          ldmia r1, {r4-r6}
418          add r1, r1, r2
419 -        pld [r1]
420 +        PLD ( pld [r1] )
421          ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
422          subs r3, r3, #1
423          RND_AVG32 r10, r11, r7, r8, r4, r5, r12
424 @@ -447,7 +456,7 @@
425  put_no_rnd_pixels8_y2_arm:
426          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
427          @ block = word aligned, pixles = unaligned
428 -        pld [r1]
429 +        PLD ( pld [r1] )
430          stmfd sp!, {r4-r11,lr} @ R14 is also called LR
431          adr r5, 5f
432          ands r4, r1, #3
433 @@ -461,13 +470,13 @@
434          add r1, r1, r2
435  6:      ldmia r1, {r6-r7}
436          add r1, r1, r2
437 -        pld [r1]
438 +        PLD ( pld [r1] )
439          NO_RND_AVG32 r8, r9, r4, r5, r6, r7, r12
440          ldmia r1, {r4-r5}
441          add r1, r1, r2
442          stmia r0, {r8-r9}
443          add r0, r0, r2
444 -        pld [r1]
445 +        PLD ( pld [r1] )
446          NO_RND_AVG32 r8, r9, r6, r7, r4, r5, r12
447          subs r3, r3, #1
448          stmia r0, {r8-r9}
449 @@ -478,18 +487,18 @@
450  2:
451          ldmia r1, {r4-r6}
452          add r1, r1, r2
453 -        pld [r1]
454 +        PLD ( pld [r1] )
455          ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
456  6:      ldmia r1, {r7-r9}
457          add r1, r1, r2
458 -        pld [r1]
459 +        PLD ( pld [r1] )
460          ADJ_ALIGN_DOUBLEWORD 1, r7, r8, r9
461          NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
462          stmia r0, {r10-r11}
463          add r0, r0, r2
464          ldmia r1, {r4-r6}
465          add r1, r1, r2
466 -        pld [r1]
467 +        PLD ( pld [r1] )
468          ADJ_ALIGN_DOUBLEWORD 1, r4, r5, r6
469          subs r3, r3, #1
470          NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
471 @@ -501,18 +510,18 @@
472  3:
473          ldmia r1, {r4-r6}
474          add r1, r1, r2
475 -        pld [r1]
476 +        PLD ( pld [r1] )
477          ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
478  6:      ldmia r1, {r7-r9}
479          add r1, r1, r2
480 -        pld [r1]
481 +        PLD ( pld [r1] )
482          ADJ_ALIGN_DOUBLEWORD 2, r7, r8, r9
483          NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
484          stmia r0, {r10-r11}
485          add r0, r0, r2
486          ldmia r1, {r4-r6}
487          add r1, r1, r2
488 -        pld [r1]
489 +        PLD ( pld [r1] )
490          ADJ_ALIGN_DOUBLEWORD 2, r4, r5, r6
491          subs r3, r3, #1
492          NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
493 @@ -524,18 +533,18 @@
494  4:
495          ldmia r1, {r4-r6}
496          add r1, r1, r2
497 -        pld [r1]
498 +        PLD ( pld [r1] )
499          ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
500  6:      ldmia r1, {r7-r9}
501          add r1, r1, r2
502 -        pld [r1]
503 +        PLD ( pld [r1] )
504          ADJ_ALIGN_DOUBLEWORD 3, r7, r8, r9
505          NO_RND_AVG32 r10, r11, r4, r5, r7, r8, r12
506          stmia r0, {r10-r11}
507          add r0, r0, r2
508          ldmia r1, {r4-r6}
509          add r1, r1, r2
510 -        pld [r1]
511 +        PLD ( pld [r1] )
512          ADJ_ALIGN_DOUBLEWORD 3, r4, r5, r6
513          subs r3, r3, #1
514          NO_RND_AVG32 r10, r11, r7, r8, r4, r5, r12
515 @@ -562,7 +571,7 @@
516          ldmia r1, {r8-r10}
517  .endif
518          add r1, r1, r2
519 -        pld [r1]
520 +        PLD ( pld [r1] )
521  .if \align == 0
522          ADJ_ALIGN_DOUBLEWORD_D 1, r4, r5, r6, r7, r8
523  .elseif \align == 1
524 @@ -624,7 +633,7 @@
525  put_pixels8_xy2_arm:
526          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
527          @ block = word aligned, pixles = unaligned
528 -        pld [r1]
529 +        PLD ( pld [r1] )
530          stmfd sp!, {r4-r11,lr} @ R14 is also called LR
531          adrl r12, 5f
532          ands r4, r1, #3
533 @@ -661,7 +670,7 @@
534  put_no_rnd_pixels8_xy2_arm:
535          @ void func(uint8_t *block, const uint8_t *pixels, int line_size, int h)
536          @ block = word aligned, pixles = unaligned
537 -        pld [r1]
538 +        PLD ( pld [r1] )
539          stmfd sp!, {r4-r11,lr} @ R14 is also called LR
540          adrl r12, 5f
541          ands r4, r1, #3
542 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt.c gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt.c
543 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt.c    2006-02-19 00:04:59.000000000 +0100
544 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt.c        2007-05-01 12:23:40.000000000 +0200
545 @@ -2,18 +2,20 @@
546   * iWMMXt optimized DSP utils
547   * Copyright (c) 2004 AGAWA Koji
548   *
549 - * This library is free software; you can redistribute it and/or
550 + * This file is part of FFmpeg.
551 + *
552 + * FFmpeg is free software; you can redistribute it and/or
553   * modify it under the terms of the GNU Lesser General Public
554   * License as published by the Free Software Foundation; either
555 - * version 2 of the License, or (at your option) any later version.
556 + * version 2.1 of the License, or (at your option) any later version.
557   *
558 - * This library is distributed in the hope that it will be useful,
559 + * FFmpeg is distributed in the hope that it will be useful,
560   * but WITHOUT ANY WARRANTY; without even the implied warranty of
561   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
562   * Lesser General Public License for more details.
563   *
564   * You should have received a copy of the GNU Lesser General Public
565 - * License along with this library; if not, write to the Free Software
566 + * License along with FFmpeg; if not, write to the Free Software
567   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
568   */
569  
570 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt_rnd.h gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt_rnd.h
571 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt_rnd.h        2006-09-20 20:55:37.000000000 +0200
572 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt_rnd.h    2007-05-01 12:23:40.000000000 +0200
573 @@ -2,18 +2,20 @@
574   * iWMMXt optimized DSP utils
575   * copyright (c) 2004 AGAWA Koji
576   *
577 - * This library is free software; you can redistribute it and/or
578 + * This file is part of FFmpeg.
579 + *
580 + * FFmpeg is free software; you can redistribute it and/or
581   * modify it under the terms of the GNU Lesser General Public
582   * License as published by the Free Software Foundation; either
583 - * version 2 of the License, or (at your option) any later version.
584 + * version 2.1 of the License, or (at your option) any later version.
585   *
586 - * This library is distributed in the hope that it will be useful,
587 + * FFmpeg is distributed in the hope that it will be useful,
588   * but WITHOUT ANY WARRANTY; without even the implied warranty of
589   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
590   * Lesser General Public License for more details.
591   *
592   * You should have received a copy of the GNU Lesser General Public
593 - * License along with this library; if not, write to the Free Software
594 + * License along with FFmpeg; if not, write to the Free Software
595   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
596   */
597  
598 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/Makefile.am gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/Makefile.am
599 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/Makefile.am 2006-09-22 06:07:23.000000000 +0200
600 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/Makefile.am     2007-05-01 12:23:40.000000000 +0200
601 @@ -7,9 +7,14 @@
602  iwmmxt_libs = libiwmmxt.la
603  endif
604  
605 +if HAVE_ARMV5TE
606 +armv5te_libs = libarmv5te.la
607 +endif
608 +
609  noinst_LTLIBRARIES = \
610         libarmv4l.la \
611 -       $(iwmmxt_libs)
612 +       $(iwmmxt_libs) \
613 +       $(armv5te_libs)
614  
615  libarmv4l_la_SOURCES = \
616         jrevdct_arm.S \
617 @@ -18,6 +23,9 @@
618         dsputil_arm.c \
619         mpegvideo_arm.c
620  
621 +libarmv5te_la_SOURCES = \
622 +       simple_idct_armv5te.S
623 +
624  libiwmmxt_la_SOURCES = \
625         dsputil_iwmmxt.c \
626         mpegvideo_iwmmxt.c
627 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/mathops.h gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/mathops.h
628 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/mathops.h   2006-09-22 06:07:23.000000000 +0200
629 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/mathops.h       2007-05-01 12:23:40.000000000 +0200
630 @@ -2,18 +2,20 @@
631   * simple math operations
632   * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> et al
633   *
634 - * This library is free software; you can redistribute it and/or
635 + * This file is part of FFmpeg.
636 + *
637 + * FFmpeg is free software; you can redistribute it and/or
638   * modify it under the terms of the GNU Lesser General Public
639   * License as published by the Free Software Foundation; either
640 - * version 2 of the License, or (at your option) any later version.
641 + * version 2.1 of the License, or (at your option) any later version.
642   *
643 - * This library is distributed in the hope that it will be useful,
644 + * FFmpeg is distributed in the hope that it will be useful,
645   * but WITHOUT ANY WARRANTY; without even the implied warranty of
646   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
647   * Lesser General Public License for more details.
648   *
649   * You should have received a copy of the GNU Lesser General Public
650 - * License along with this library; if not, write to the Free Software
651 + * License along with FFmpeg; if not, write to the Free Software
652   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
653   */
654  
655 @@ -39,9 +41,9 @@
656  #   define MAC16(rt, ra, rb) \
657          asm ("smlabb %0, %2, %3, %0" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
658  /* signed 16x16 -> 32 multiply */
659 -#   define MUL16(ra, rb) \
660 -        ({ int __rt;\
661 -         asm ("smulbb %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb));
662 +#   define MUL16(ra, rb)                                                \
663 +        ({ int __rt;                                                    \
664 +         asm ("smulbb %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb));  \
665           __rt; })
666  
667  #endif
668 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_arm.c gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_arm.c
669 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_arm.c     2006-02-19 00:04:59.000000000 +0100
670 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_arm.c 2007-05-01 12:23:40.000000000 +0200
671 @@ -1,25 +1,27 @@
672  /*
673   * Copyright (c) 2002 Michael Niedermayer
674   *
675 - * This library is free software; you can redistribute it and/or
676 + * This file is part of FFmpeg.
677 + *
678 + * FFmpeg is free software; you can redistribute it and/or
679   * modify it under the terms of the GNU Lesser General Public
680   * License as published by the Free Software Foundation; either
681 - * version 2 of the License, or (at your option) any later version.
682 + * version 2.1 of the License, or (at your option) any later version.
683   *
684 - * This library is distributed in the hope that it will be useful,
685 + * FFmpeg is distributed in the hope that it will be useful,
686   * but WITHOUT ANY WARRANTY; without even the implied warranty of
687   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
688   * Lesser General Public License for more details.
689   *
690   * You should have received a copy of the GNU Lesser General Public
691 - * License along with this library; if not, write to the Free Software
692 + * License along with FFmpeg; if not, write to the Free Software
693   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
694   *
695   */
696  
697 -#include "dsputil.h"
698 -#include "mpegvideo.h"
699 -#include "avcodec.h"
700 +#include "../dsputil.h"
701 +#include "../mpegvideo.h"
702 +#include "../avcodec.h"
703  
704  extern void MPV_common_init_iwmmxt(MpegEncContext *s);
705  
706 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_iwmmxt.c gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_iwmmxt.c
707 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_iwmmxt.c  2006-09-20 20:55:37.000000000 +0200
708 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/mpegvideo_iwmmxt.c      2007-05-01 12:23:40.000000000 +0200
709 @@ -1,18 +1,20 @@
710  /*
711   * copyright (c) 2004 AGAWA Koji
712   *
713 - * This library is free software; you can redistribute it and/or
714 + * This file is part of FFmpeg.
715 + *
716 + * FFmpeg is free software; you can redistribute it and/or
717   * modify it under the terms of the GNU Lesser General Public
718   * License as published by the Free Software Foundation; either
719 - * version 2 of the License, or (at your option) any later version.
720 + * version 2.1 of the License, or (at your option) any later version.
721   *
722 - * This library is distributed in the hope that it will be useful,
723 + * FFmpeg is distributed in the hope that it will be useful,
724   * but WITHOUT ANY WARRANTY; without even the implied warranty of
725   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
726   * Lesser General Public License for more details.
727   *
728   * You should have received a copy of the GNU Lesser General Public
729 - * License along with this library; if not, write to the Free Software
730 + * License along with FFmpeg; if not, write to the Free Software
731   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
732   */
733  
734 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_arm.S gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_arm.S
735 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_arm.S   2006-09-20 20:55:37.000000000 +0200
736 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_arm.S       2007-05-01 12:23:40.000000000 +0200
737 @@ -5,18 +5,20 @@
738   *
739   * Author: Frederic Boulay <dilb@handhelds.org>
740   *
741 - * This library is free software; you can redistribute it and/or
742 + * This file is part of FFmpeg.
743 + *
744 + * FFmpeg is free software; you can redistribute it and/or
745   * modify it under the terms of the GNU Lesser General Public
746   * License as published by the Free Software Foundation; either
747 - * version 2 of the License, or (at your option) any later version.
748 + * version 2.1 of the License, or (at your option) any later version.
749   *
750 - * This library is distributed in the hope that it will be useful,
751 + * FFmpeg is distributed in the hope that it will be useful,
752   * but WITHOUT ANY WARRANTY; without even the implied warranty of
753   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
754   * Lesser General Public License for more details.
755   *
756   * You should have received a copy of the GNU Lesser General Public
757 - * License along with this library; if not, write to the Free Software
758 + * License along with FFmpeg; if not, write to the Free Software
759   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
760   *
761   * The function defined in this file, is derived from the simple_idct function
762 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_armv5te.S gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_armv5te.S
763 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_armv5te.S       1970-01-01 01:00:00.000000000 +0100
764 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/armv4l/simple_idct_armv5te.S   2007-05-01 12:23:40.000000000 +0200
765 @@ -0,0 +1,718 @@
766 +/*
767 + * Simple IDCT
768 + *
769 + * Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at>
770 + * Copyright (c) 2006 Mans Rullgard <mru@inprovide.com>
771 + *
772 + * This file is part of FFmpeg.
773 + *
774 + * FFmpeg is free software; you can redistribute it and/or
775 + * modify it under the terms of the GNU Lesser General Public
776 + * License as published by the Free Software Foundation; either
777 + * version 2.1 of the License, or (at your option) any later version.
778 + *
779 + * FFmpeg is distributed in the hope that it will be useful,
780 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
781 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
782 + * Lesser General Public License for more details.
783 + *
784 + * You should have received a copy of the GNU Lesser General Public
785 + * License along with FFmpeg; if not, write to the Free Software
786 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
787 + */
788 +
789 +#define W1  22725   /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
790 +#define W2  21407   /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
791 +#define W3  19266   /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
792 +#define W4  16383   /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
793 +#define W5  12873   /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
794 +#define W6  8867    /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
795 +#define W7  4520    /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
796 +#define ROW_SHIFT 11
797 +#define COL_SHIFT 20
798 +
799 +#define W13 (W1 | (W3 << 16))
800 +#define W26 (W2 | (W6 << 16))
801 +#define W57 (W5 | (W7 << 16))
802 +
803 +        .text
804 +        .align
805 +w13:    .long W13
806 +w26:    .long W26
807 +w57:    .long W57
808 +
809 +        .align
810 +        .func idct_row_armv5te
811 +idct_row_armv5te:
812 +        str    lr, [sp, #-4]!
813 +
814 +        ldrd   v1, [a1, #8]
815 +        ldrd   a3, [a1]              /* a3 = row[1:0], a4 = row[3:2] */
816 +        orrs   v1, v1, v2
817 +        cmpeq  v1, a4
818 +        cmpeq  v1, a3, lsr #16
819 +        beq    row_dc_only
820 +
821 +        mov    v1, #(1<<(ROW_SHIFT-1))
822 +        mov    ip, #16384
823 +        sub    ip, ip, #1            /* ip = W4 */
824 +        smlabb v1, ip, a3, v1        /* v1 = W4*row[0]+(1<<(RS-1)) */
825 +        ldr    ip, [pc, #(w26-.-8)]  /* ip = W2 | (W6 << 16) */
826 +        smultb a2, ip, a4
827 +        smulbb lr, ip, a4
828 +        add    v2, v1, a2
829 +        sub    v3, v1, a2
830 +        sub    v4, v1, lr
831 +        add    v1, v1, lr
832 +
833 +        ldr    ip, [pc, #(w13-.-8)]  /* ip = W1 | (W3 << 16) */
834 +        ldr    lr, [pc, #(w57-.-8)]  /* lr = W5 | (W7 << 16) */
835 +        smulbt v5, ip, a3
836 +        smultt v6, lr, a4
837 +        smlatt v5, ip, a4, v5
838 +        smultt a2, ip, a3
839 +        smulbt v7, lr, a3
840 +        sub    v6, v6, a2
841 +        smulbt a2, ip, a4
842 +        smultt fp, lr, a3
843 +        sub    v7, v7, a2
844 +        smulbt a2, lr, a4
845 +        ldrd   a3, [a1, #8]          /* a3=row[5:4] a4=row[7:6] */
846 +        sub    fp, fp, a2
847 +
848 +        orrs   a2, a3, a4
849 +        beq    1f
850 +
851 +        smlabt v5, lr, a3, v5
852 +        smlabt v6, ip, a3, v6
853 +        smlatt v5, lr, a4, v5
854 +        smlabt v6, lr, a4, v6
855 +        smlatt v7, lr, a3, v7
856 +        smlatt fp, ip, a3, fp
857 +        smulbt a2, ip, a4
858 +        smlatt v7, ip, a4, v7
859 +        sub    fp, fp, a2
860 +
861 +        ldr    ip, [pc, #(w26-.-8)]  /* ip = W2 | (W6 << 16) */
862 +        mov    a2, #16384
863 +        sub    a2, a2, #1            /* a2 =  W4 */
864 +        smulbb a2, a2, a3            /* a2 =  W4*row[4] */
865 +        smultb lr, ip, a4            /* lr =  W6*row[6] */
866 +        add    v1, v1, a2            /* v1 += W4*row[4] */
867 +        add    v1, v1, lr            /* v1 += W6*row[6] */
868 +        add    v4, v4, a2            /* v4 += W4*row[4] */
869 +        sub    v4, v4, lr            /* v4 -= W6*row[6] */
870 +        smulbb lr, ip, a4            /* lr =  W2*row[6] */
871 +        sub    v2, v2, a2            /* v2 -= W4*row[4] */
872 +        sub    v2, v2, lr            /* v2 -= W2*row[6] */
873 +        sub    v3, v3, a2            /* v3 -= W4*row[4] */
874 +        add    v3, v3, lr            /* v3 += W2*row[6] */
875 +
876 +1:      add    a2, v1, v5
877 +        mov    a3, a2, lsr #11
878 +        bic    a3, a3, #0x1f0000
879 +        sub    a2, v2, v6
880 +        mov    a2, a2, lsr #11
881 +        add    a3, a3, a2, lsl #16
882 +        add    a2, v3, v7
883 +        mov    a4, a2, lsr #11
884 +        bic    a4, a4, #0x1f0000
885 +        add    a2, v4, fp
886 +        mov    a2, a2, lsr #11
887 +        add    a4, a4, a2, lsl #16
888 +        strd   a3, [a1]
889 +
890 +        sub    a2, v4, fp
891 +        mov    a3, a2, lsr #11
892 +        bic    a3, a3, #0x1f0000
893 +        sub    a2, v3, v7
894 +        mov    a2, a2, lsr #11
895 +        add    a3, a3, a2, lsl #16
896 +        add    a2, v2, v6
897 +        mov    a4, a2, lsr #11
898 +        bic    a4, a4, #0x1f0000
899 +        sub    a2, v1, v5
900 +        mov    a2, a2, lsr #11
901 +        add    a4, a4, a2, lsl #16
902 +        strd   a3, [a1, #8]
903 +
904 +        ldr    pc, [sp], #4
905 +
906 +row_dc_only:
907 +        orr    a3, a3, a3, lsl #16
908 +        bic    a3, a3, #0xe000
909 +        mov    a3, a3, lsl #3
910 +        mov    a4, a3
911 +        strd   a3, [a1]
912 +        strd   a3, [a1, #8]
913 +
914 +        ldr    pc, [sp], #4
915 +        .endfunc
916 +
917 +        .macro idct_col
918 +        ldr    a4, [a1]              /* a4 = col[1:0] */
919 +        mov    ip, #16384
920 +        sub    ip, ip, #1            /* ip = W4 */
921 +#if 0
922 +        mov    v1, #(1<<(COL_SHIFT-1))
923 +        smlabt v2, ip, a4, v1        /* v2 = W4*col[1] + (1<<(COL_SHIFT-1)) */
924 +        smlabb v1, ip, a4, v1        /* v1 = W4*col[0] + (1<<(COL_SHIFT-1)) */
925 +        ldr    a4, [a1, #(16*4)]
926 +#else
927 +        mov    v1, #((1<<(COL_SHIFT-1))/W4) /* this matches the C version */
928 +        add    v2, v1, a4, asr #16
929 +        rsb    v2, v2, v2, lsl #14
930 +        mov    a4, a4, lsl #16
931 +        add    v1, v1, a4, asr #16
932 +        ldr    a4, [a1, #(16*4)]
933 +        rsb    v1, v1, v1, lsl #14
934 +#endif
935 +
936 +        smulbb lr, ip, a4
937 +        smulbt a3, ip, a4
938 +        sub    v3, v1, lr
939 +        sub    v5, v1, lr
940 +        add    v7, v1, lr
941 +        add    v1, v1, lr
942 +        sub    v4, v2, a3
943 +        sub    v6, v2, a3
944 +        add    fp, v2, a3
945 +        ldr    ip, [pc, #(w26-.-8)]
946 +        ldr    a4, [a1, #(16*2)]
947 +        add    v2, v2, a3
948 +
949 +        smulbb lr, ip, a4
950 +        smultb a3, ip, a4
951 +        add    v1, v1, lr
952 +        sub    v7, v7, lr
953 +        add    v3, v3, a3
954 +        sub    v5, v5, a3
955 +        smulbt lr, ip, a4
956 +        smultt a3, ip, a4
957 +        add    v2, v2, lr
958 +        sub    fp, fp, lr
959 +        add    v4, v4, a3
960 +        ldr    a4, [a1, #(16*6)]
961 +        sub    v6, v6, a3
962 +
963 +        smultb lr, ip, a4
964 +        smulbb a3, ip, a4
965 +        add    v1, v1, lr
966 +        sub    v7, v7, lr
967 +        sub    v3, v3, a3
968 +        add    v5, v5, a3
969 +        smultt lr, ip, a4
970 +        smulbt a3, ip, a4
971 +        add    v2, v2, lr
972 +        sub    fp, fp, lr
973 +        sub    v4, v4, a3
974 +        add    v6, v6, a3
975 +
976 +        stmfd  sp!, {v1, v2, v3, v4, v5, v6, v7, fp}
977 +
978 +        ldr    ip, [pc, #(w13-.-8)]
979 +        ldr    a4, [a1, #(16*1)]
980 +        ldr    lr, [pc, #(w57-.-8)]
981 +        smulbb v1, ip, a4
982 +        smultb v3, ip, a4
983 +        smulbb v5, lr, a4
984 +        smultb v7, lr, a4
985 +        smulbt v2, ip, a4
986 +        smultt v4, ip, a4
987 +        smulbt v6, lr, a4
988 +        smultt fp, lr, a4
989 +        rsb    v4, v4, #0
990 +        ldr    a4, [a1, #(16*3)]
991 +        rsb    v3, v3, #0
992 +
993 +        smlatb v1, ip, a4, v1
994 +        smlatb v3, lr, a4, v3
995 +        smulbb a3, ip, a4
996 +        smulbb a2, lr, a4
997 +        sub    v5, v5, a3
998 +        sub    v7, v7, a2
999 +        smlatt v2, ip, a4, v2
1000 +        smlatt v4, lr, a4, v4
1001 +        smulbt a3, ip, a4
1002 +        smulbt a2, lr, a4
1003 +        sub    v6, v6, a3
1004 +        ldr    a4, [a1, #(16*5)]
1005 +        sub    fp, fp, a2
1006 +
1007 +        smlabb v1, lr, a4, v1
1008 +        smlabb v3, ip, a4, v3
1009 +        smlatb v5, lr, a4, v5
1010 +        smlatb v7, ip, a4, v7
1011 +        smlabt v2, lr, a4, v2
1012 +        smlabt v4, ip, a4, v4
1013 +        smlatt v6, lr, a4, v6
1014 +        ldr    a3, [a1, #(16*7)]
1015 +        smlatt fp, ip, a4, fp
1016 +
1017 +        smlatb v1, lr, a3, v1
1018 +        smlabb v3, lr, a3, v3
1019 +        smlatb v5, ip, a3, v5
1020 +        smulbb a4, ip, a3
1021 +        smlatt v2, lr, a3, v2
1022 +        sub    v7, v7, a4
1023 +        smlabt v4, lr, a3, v4
1024 +        smulbt a4, ip, a3
1025 +        smlatt v6, ip, a3, v6
1026 +        sub    fp, fp, a4
1027 +        .endm
1028 +
1029 +        .align
1030 +        .func idct_col_armv5te
1031 +idct_col_armv5te:
1032 +        str    lr, [sp, #-4]!
1033 +
1034 +        idct_col
1035 +
1036 +        ldmfd  sp!, {a3, a4}
1037 +        adds   a2, a3, v1
1038 +        mov    a2, a2, lsr #20
1039 +        orrmi  a2, a2, #0xf000
1040 +        add    ip, a4, v2
1041 +        mov    ip, ip, asr #20
1042 +        orr    a2, a2, ip, lsl #16
1043 +        str    a2, [a1]
1044 +        subs   a3, a3, v1
1045 +        mov    a2, a3, lsr #20
1046 +        orrmi  a2, a2, #0xf000
1047 +        sub    a4, a4, v2
1048 +        mov    a4, a4, asr #20
1049 +        orr    a2, a2, a4, lsl #16
1050 +        ldmfd  sp!, {a3, a4}
1051 +        str    a2, [a1, #(16*7)]
1052 +
1053 +        subs   a2, a3, v3
1054 +        mov    a2, a2, lsr #20
1055 +        orrmi  a2, a2, #0xf000
1056 +        sub    ip, a4, v4
1057 +        mov    ip, ip, asr #20
1058 +        orr    a2, a2, ip, lsl #16
1059 +        str    a2, [a1, #(16*1)]
1060 +        adds   a3, a3, v3
1061 +        mov    a2, a3, lsr #20
1062 +        orrmi  a2, a2, #0xf000
1063 +        add    a4, a4, v4
1064 +        mov    a4, a4, asr #20
1065 +        orr    a2, a2, a4, lsl #16
1066 +        ldmfd  sp!, {a3, a4}
1067 +        str    a2, [a1, #(16*6)]
1068 +
1069 +        adds   a2, a3, v5
1070 +        mov    a2, a2, lsr #20
1071 +        orrmi  a2, a2, #0xf000
1072 +        add    ip, a4, v6
1073 +        mov    ip, ip, asr #20
1074 +        orr    a2, a2, ip, lsl #16
1075 +        str    a2, [a1, #(16*2)]
1076 +        subs   a3, a3, v5
1077 +        mov    a2, a3, lsr #20
1078 +        orrmi  a2, a2, #0xf000
1079 +        sub    a4, a4, v6
1080 +        mov    a4, a4, asr #20
1081 +        orr    a2, a2, a4, lsl #16
1082 +        ldmfd  sp!, {a3, a4}
1083 +        str    a2, [a1, #(16*5)]
1084 +
1085 +        adds   a2, a3, v7
1086 +        mov    a2, a2, lsr #20
1087 +        orrmi  a2, a2, #0xf000
1088 +        add    ip, a4, fp
1089 +        mov    ip, ip, asr #20
1090 +        orr    a2, a2, ip, lsl #16
1091 +        str    a2, [a1, #(16*3)]
1092 +        subs   a3, a3, v7
1093 +        mov    a2, a3, lsr #20
1094 +        orrmi  a2, a2, #0xf000
1095 +        sub    a4, a4, fp
1096 +        mov    a4, a4, asr #20
1097 +        orr    a2, a2, a4, lsl #16
1098 +        str    a2, [a1, #(16*4)]
1099 +
1100 +        ldr    pc, [sp], #4
1101 +        .endfunc
1102 +
1103 +        .align
1104 +        .func idct_col_put_armv5te
1105 +idct_col_put_armv5te:
1106 +        str    lr, [sp, #-4]!
1107 +
1108 +        idct_col
1109 +
1110 +        ldmfd  sp!, {a3, a4}
1111 +        ldr    lr, [sp, #32]
1112 +        add    a2, a3, v1
1113 +        movs   a2, a2, asr #20
1114 +        movmi  a2, #0
1115 +        cmp    a2, #255
1116 +        movgt  a2, #255
1117 +        add    ip, a4, v2
1118 +        movs   ip, ip, asr #20
1119 +        movmi  ip, #0
1120 +        cmp    ip, #255
1121 +        movgt  ip, #255
1122 +        orr    a2, a2, ip, lsl #8
1123 +        sub    a3, a3, v1
1124 +        movs   a3, a3, asr #20
1125 +        movmi  a3, #0
1126 +        cmp    a3, #255
1127 +        movgt  a3, #255
1128 +        sub    a4, a4, v2
1129 +        movs   a4, a4, asr #20
1130 +        movmi  a4, #0
1131 +        cmp    a4, #255
1132 +        ldr    v1, [sp, #28]
1133 +        movgt  a4, #255
1134 +        strh   a2, [v1]
1135 +        add    a2, v1, #2
1136 +        str    a2, [sp, #28]
1137 +        orr    a2, a3, a4, lsl #8
1138 +        rsb    v2, lr, lr, lsl #3
1139 +        ldmfd  sp!, {a3, a4}
1140 +        strh   a2, [v2, v1]!
1141 +
1142 +        sub    a2, a3, v3
1143 +        movs   a2, a2, asr #20
1144 +        movmi  a2, #0
1145 +        cmp    a2, #255
1146 +        movgt  a2, #255
1147 +        sub    ip, a4, v4
1148 +        movs   ip, ip, asr #20
1149 +        movmi  ip, #0
1150 +        cmp    ip, #255
1151 +        movgt  ip, #255
1152 +        orr    a2, a2, ip, lsl #8
1153 +        strh   a2, [v1, lr]!
1154 +        add    a3, a3, v3
1155 +        movs   a2, a3, asr #20
1156 +        movmi  a2, #0
1157 +        cmp    a2, #255
1158 +        movgt  a2, #255
1159 +        add    a4, a4, v4
1160 +        movs   a4, a4, asr #20
1161 +        movmi  a4, #0
1162 +        cmp    a4, #255
1163 +        movgt  a4, #255
1164 +        orr    a2, a2, a4, lsl #8
1165 +        ldmfd  sp!, {a3, a4}
1166 +        strh   a2, [v2, -lr]!
1167 +
1168 +        add    a2, a3, v5
1169 +        movs   a2, a2, asr #20
1170 +        movmi  a2, #0
1171 +        cmp    a2, #255
1172 +        movgt  a2, #255
1173 +        add    ip, a4, v6
1174 +        movs   ip, ip, asr #20
1175 +        movmi  ip, #0
1176 +        cmp    ip, #255
1177 +        movgt  ip, #255
1178 +        orr    a2, a2, ip, lsl #8
1179 +        strh   a2, [v1, lr]!
1180 +        sub    a3, a3, v5
1181 +        movs   a2, a3, asr #20
1182 +        movmi  a2, #0
1183 +        cmp    a2, #255
1184 +        movgt  a2, #255
1185 +        sub    a4, a4, v6
1186 +        movs   a4, a4, asr #20
1187 +        movmi  a4, #0
1188 +        cmp    a4, #255
1189 +        movgt  a4, #255
1190 +        orr    a2, a2, a4, lsl #8
1191 +        ldmfd  sp!, {a3, a4}
1192 +        strh   a2, [v2, -lr]!
1193 +
1194 +        add    a2, a3, v7
1195 +        movs   a2, a2, asr #20
1196 +        movmi  a2, #0
1197 +        cmp    a2, #255
1198 +        movgt  a2, #255
1199 +        add    ip, a4, fp
1200 +        movs   ip, ip, asr #20
1201 +        movmi  ip, #0
1202 +        cmp    ip, #255
1203 +        movgt  ip, #255
1204 +        orr    a2, a2, ip, lsl #8
1205 +        strh   a2, [v1, lr]
1206 +        sub    a3, a3, v7
1207 +        movs   a2, a3, asr #20
1208 +        movmi  a2, #0
1209 +        cmp    a2, #255
1210 +        movgt  a2, #255
1211 +        sub    a4, a4, fp
1212 +        movs   a4, a4, asr #20
1213 +        movmi  a4, #0
1214 +        cmp    a4, #255
1215 +        movgt  a4, #255
1216 +        orr    a2, a2, a4, lsl #8
1217 +        strh   a2, [v2, -lr]
1218 +
1219 +        ldr    pc, [sp], #4
1220 +        .endfunc
1221 +
1222 +        .align
1223 +        .func idct_col_add_armv5te
1224 +idct_col_add_armv5te:
1225 +        str    lr, [sp, #-4]!
1226 +
1227 +        idct_col
1228 +
1229 +        ldr    lr, [sp, #36]
1230 +
1231 +        ldmfd  sp!, {a3, a4}
1232 +        ldrh   ip, [lr]
1233 +        add    a2, a3, v1
1234 +        mov    a2, a2, asr #20
1235 +        sub    a3, a3, v1
1236 +        and    v1, ip, #255
1237 +        adds   a2, a2, v1
1238 +        movmi  a2, #0
1239 +        cmp    a2, #255
1240 +        movgt  a2, #255
1241 +        add    v1, a4, v2
1242 +        mov    v1, v1, asr #20
1243 +        adds   v1, v1, ip, lsr #8
1244 +        movmi  v1, #0
1245 +        cmp    v1, #255
1246 +        movgt  v1, #255
1247 +        orr    a2, a2, v1, lsl #8
1248 +        ldr    v1, [sp, #32]
1249 +        sub    a4, a4, v2
1250 +        rsb    v2, v1, v1, lsl #3
1251 +        ldrh   ip, [v2, lr]!
1252 +        strh   a2, [lr]
1253 +        mov    a3, a3, asr #20
1254 +        and    a2, ip, #255
1255 +        adds   a3, a3, a2
1256 +        movmi  a3, #0
1257 +        cmp    a3, #255
1258 +        movgt  a3, #255
1259 +        mov    a4, a4, asr #20
1260 +        adds   a4, a4, ip, lsr #8
1261 +        movmi  a4, #0
1262 +        cmp    a4, #255
1263 +        movgt  a4, #255
1264 +        add    a2, lr, #2
1265 +        str    a2, [sp, #28]
1266 +        orr    a2, a3, a4, lsl #8
1267 +        strh   a2, [v2]
1268 +
1269 +        ldmfd  sp!, {a3, a4}
1270 +        ldrh   ip, [lr, v1]!
1271 +        sub    a2, a3, v3
1272 +        mov    a2, a2, asr #20
1273 +        add    a3, a3, v3
1274 +        and    v3, ip, #255
1275 +        adds   a2, a2, v3
1276 +        movmi  a2, #0
1277 +        cmp    a2, #255
1278 +        movgt  a2, #255
1279 +        sub    v3, a4, v4
1280 +        mov    v3, v3, asr #20
1281 +        adds   v3, v3, ip, lsr #8
1282 +        movmi  v3, #0
1283 +        cmp    v3, #255
1284 +        movgt  v3, #255
1285 +        orr    a2, a2, v3, lsl #8
1286 +        add    a4, a4, v4
1287 +        ldrh   ip, [v2, -v1]!
1288 +        strh   a2, [lr]
1289 +        mov    a3, a3, asr #20
1290 +        and    a2, ip, #255
1291 +        adds   a3, a3, a2
1292 +        movmi  a3, #0
1293 +        cmp    a3, #255
1294 +        movgt  a3, #255
1295 +        mov    a4, a4, asr #20
1296 +        adds   a4, a4, ip, lsr #8
1297 +        movmi  a4, #0
1298 +        cmp    a4, #255
1299 +        movgt  a4, #255
1300 +        orr    a2, a3, a4, lsl #8
1301 +        strh   a2, [v2]
1302 +
1303 +        ldmfd  sp!, {a3, a4}
1304 +        ldrh   ip, [lr, v1]!
1305 +        add    a2, a3, v5
1306 +        mov    a2, a2, asr #20
1307 +        sub    a3, a3, v5
1308 +        and    v3, ip, #255
1309 +        adds   a2, a2, v3
1310 +        movmi  a2, #0
1311 +        cmp    a2, #255
1312 +        movgt  a2, #255
1313 +        add    v3, a4, v6
1314 +        mov    v3, v3, asr #20
1315 +        adds   v3, v3, ip, lsr #8
1316 +        movmi  v3, #0
1317 +        cmp    v3, #255
1318 +        movgt  v3, #255
1319 +        orr    a2, a2, v3, lsl #8
1320 +        sub    a4, a4, v6
1321 +        ldrh   ip, [v2, -v1]!
1322 +        strh   a2, [lr]
1323 +        mov    a3, a3, asr #20
1324 +        and    a2, ip, #255
1325 +        adds   a3, a3, a2
1326 +        movmi  a3, #0
1327 +        cmp    a3, #255
1328 +        movgt  a3, #255
1329 +        mov    a4, a4, asr #20
1330 +        adds   a4, a4, ip, lsr #8
1331 +        movmi  a4, #0
1332 +        cmp    a4, #255
1333 +        movgt  a4, #255
1334 +        orr    a2, a3, a4, lsl #8
1335 +        strh   a2, [v2]
1336 +
1337 +        ldmfd  sp!, {a3, a4}
1338 +        ldrh   ip, [lr, v1]!
1339 +        add    a2, a3, v7
1340 +        mov    a2, a2, asr #20
1341 +        sub    a3, a3, v7
1342 +        and    v3, ip, #255
1343 +        adds   a2, a2, v3
1344 +        movmi  a2, #0
1345 +        cmp    a2, #255
1346 +        movgt  a2, #255
1347 +        add    v3, a4, fp
1348 +        mov    v3, v3, asr #20
1349 +        adds   v3, v3, ip, lsr #8
1350 +        movmi  v3, #0
1351 +        cmp    v3, #255
1352 +        movgt  v3, #255
1353 +        orr    a2, a2, v3, lsl #8
1354 +        sub    a4, a4, fp
1355 +        ldrh   ip, [v2, -v1]!
1356 +        strh   a2, [lr]
1357 +        mov    a3, a3, asr #20
1358 +        and    a2, ip, #255
1359 +        adds   a3, a3, a2
1360 +        movmi  a3, #0
1361 +        cmp    a3, #255
1362 +        movgt  a3, #255
1363 +        mov    a4, a4, asr #20
1364 +        adds   a4, a4, ip, lsr #8
1365 +        movmi  a4, #0
1366 +        cmp    a4, #255
1367 +        movgt  a4, #255
1368 +        orr    a2, a3, a4, lsl #8
1369 +        strh   a2, [v2]
1370 +
1371 +        ldr    pc, [sp], #4
1372 +        .endfunc
1373 +
1374 +        .align
1375 +        .global simple_idct_armv5te
1376 +        .func simple_idct_armv5te
1377 +simple_idct_armv5te:
1378 +        stmfd  sp!, {v1, v2, v3, v4, v5, v6, v7, fp, lr}
1379 +
1380 +        bl     idct_row_armv5te
1381 +        add    a1, a1, #16
1382 +        bl     idct_row_armv5te
1383 +        add    a1, a1, #16
1384 +        bl     idct_row_armv5te
1385 +        add    a1, a1, #16
1386 +        bl     idct_row_armv5te
1387 +        add    a1, a1, #16
1388 +        bl     idct_row_armv5te
1389 +        add    a1, a1, #16
1390 +        bl     idct_row_armv5te
1391 +        add    a1, a1, #16
1392 +        bl     idct_row_armv5te
1393 +        add    a1, a1, #16
1394 +        bl     idct_row_armv5te
1395 +
1396 +        sub    a1, a1, #(16*7)
1397 +
1398 +        bl     idct_col_armv5te
1399 +        add    a1, a1, #4
1400 +        bl     idct_col_armv5te
1401 +        add    a1, a1, #4
1402 +        bl     idct_col_armv5te
1403 +        add    a1, a1, #4
1404 +        bl     idct_col_armv5te
1405 +
1406 +        ldmfd  sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
1407 +        .endfunc
1408 +
1409 +        .align
1410 +        .global simple_idct_add_armv5te
1411 +        .func simple_idct_add_armv5te
1412 +simple_idct_add_armv5te:
1413 +        stmfd  sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
1414 +
1415 +        mov    a1, a3
1416 +
1417 +        bl     idct_row_armv5te
1418 +        add    a1, a1, #16
1419 +        bl     idct_row_armv5te
1420 +        add    a1, a1, #16
1421 +        bl     idct_row_armv5te
1422 +        add    a1, a1, #16
1423 +        bl     idct_row_armv5te
1424 +        add    a1, a1, #16
1425 +        bl     idct_row_armv5te
1426 +        add    a1, a1, #16
1427 +        bl     idct_row_armv5te
1428 +        add    a1, a1, #16
1429 +        bl     idct_row_armv5te
1430 +        add    a1, a1, #16
1431 +        bl     idct_row_armv5te
1432 +
1433 +        sub    a1, a1, #(16*7)
1434 +
1435 +        bl     idct_col_add_armv5te
1436 +        add    a1, a1, #4
1437 +        bl     idct_col_add_armv5te
1438 +        add    a1, a1, #4
1439 +        bl     idct_col_add_armv5te
1440 +        add    a1, a1, #4
1441 +        bl     idct_col_add_armv5te
1442 +
1443 +        add    sp, sp, #8
1444 +        ldmfd  sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
1445 +        .endfunc
1446 +
1447 +        .align
1448 +        .global simple_idct_put_armv5te
1449 +        .func simple_idct_put_armv5te
1450 +simple_idct_put_armv5te:
1451 +        stmfd  sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
1452 +
1453 +        mov    a1, a3
1454 +
1455 +        bl     idct_row_armv5te
1456 +        add    a1, a1, #16
1457 +        bl     idct_row_armv5te
1458 +        add    a1, a1, #16
1459 +        bl     idct_row_armv5te
1460 +        add    a1, a1, #16
1461 +        bl     idct_row_armv5te
1462 +        add    a1, a1, #16
1463 +        bl     idct_row_armv5te
1464 +        add    a1, a1, #16
1465 +        bl     idct_row_armv5te
1466 +        add    a1, a1, #16
1467 +        bl     idct_row_armv5te
1468 +        add    a1, a1, #16
1469 +        bl     idct_row_armv5te
1470 +
1471 +        sub    a1, a1, #(16*7)
1472 +
1473 +        bl     idct_col_put_armv5te
1474 +        add    a1, a1, #4
1475 +        bl     idct_col_put_armv5te
1476 +        add    a1, a1, #4
1477 +        bl     idct_col_put_armv5te
1478 +        add    a1, a1, #4
1479 +        bl     idct_col_put_armv5te
1480 +
1481 +        add    sp, sp, #8
1482 +        ldmfd  sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
1483 +        .endfunc
1484 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/avcodec.h gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/avcodec.h
1485 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/avcodec.h  2006-09-20 20:55:36.000000000 +0200
1486 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/avcodec.h      2007-05-01 12:23:40.000000000 +0200
1487 @@ -1217,6 +1217,7 @@
1488  #define FF_IDCT_IPP          13
1489  #define FF_IDCT_XVIDMMX      14
1490  #define FF_IDCT_CAVS         15
1491 +#define FF_IDCT_SIMPLEARMV5TE 16
1492  
1493      /**
1494       * slice count.
1495 diff  -Nur gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/Makefile.am gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/Makefile.am
1496 --- gst-ffmpeg-0.10.2/gst-libs/ext/ffmpeg/libavcodec/Makefile.am        2006-09-22 06:07:23.000000000 +0200
1497 +++ gst-ffmpeg-0.10.2.new/gst-libs/ext/ffmpeg/libavcodec/Makefile.am    2007-05-01 12:23:40.000000000 +0200
1498 @@ -19,7 +19,10 @@
1499  if HAVE_IWMMXT
1500  iwmmxt_libs = armv4l/libiwmmxt.la
1501  endif
1502 -armv4l_libs = armv4l/libarmv4l.la $(iwmmxt_libs)
1503 +if HAVE_ARMV5TE
1504 +armv5te_libs = armv4l/libarmv5te.la
1505 +endif
1506 +armv4l_libs = armv4l/libarmv4l.la $(iwmmxt_libs) $(armv5te_libs)
1507  armv4l_dirs = armv4l
1508  endif
1509