]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/ffmpeg-cvs-mactel.patch
* x264-patch was committed upstream
[vlc] / extras / contrib / src / Patches / ffmpeg-cvs-mactel.patch
1 Index: libavcodec/i386/dsputil_mmx.c
2 ===================================================================
3 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/dsputil_mmx.c,v
4 retrieving revision 1.109
5 diff -u -r1.109 dsputil_mmx.c
6 --- libavcodec/i386/dsputil_mmx.c       12 Jan 2006 22:43:17 -0000      1.109
7 +++ libavcodec/i386/dsputil_mmx.c       26 Jan 2006 22:02:55 -0000
8 @@ -52,7 +52,7 @@
9  static const uint64_t ff_pb_3F attribute_used __attribute__ ((aligned(8))) = 0x3F3F3F3F3F3F3F3FULL;
10  static const uint64_t ff_pb_FC attribute_used __attribute__ ((aligned(8))) = 0xFCFCFCFCFCFCFCFCULL;
11  
12 -#define JUMPALIGN() __asm __volatile (".balign 8"::)
13 +#define JUMPALIGN() __asm __volatile (".p2align 3"::)
14  #define MOVQ_ZERO(regd)  __asm __volatile ("pxor %%" #regd ", %%" #regd ::)
15  
16  #define MOVQ_WONE(regd) \
17 @@ -195,7 +195,7 @@
18      asm volatile(
19          "mov $-128, %%"REG_a"           \n\t"
20          "pxor %%mm7, %%mm7              \n\t"
21 -        ".balign 16                     \n\t"
22 +        ".p2align 4                     \n\t"
23          "1:                             \n\t"
24          "movq (%0), %%mm0               \n\t"
25          "movq (%0, %2), %%mm2           \n\t"
26 @@ -223,7 +223,7 @@
27      asm volatile(
28          "pxor %%mm7, %%mm7              \n\t"
29          "mov $-128, %%"REG_a"           \n\t"
30 -        ".balign 16                     \n\t"
31 +        ".p2align 4                     \n\t"
32          "1:                             \n\t"
33          "movq (%0), %%mm0               \n\t"
34          "movq (%1), %%mm2               \n\t"
35 @@ -366,7 +366,7 @@
36  {
37      __asm __volatile(
38           "lea (%3, %3), %%"REG_a"       \n\t"
39 -         ".balign 8                     \n\t"
40 +         ".p2align 3                    \n\t"
41           "1:                            \n\t"
42           "movd (%1), %%mm0              \n\t"
43           "movd (%1, %3), %%mm1          \n\t"
44 @@ -392,7 +392,7 @@
45  {
46      __asm __volatile(
47           "lea (%3, %3), %%"REG_a"       \n\t"
48 -         ".balign 8                     \n\t"
49 +         ".p2align 3                    \n\t"
50           "1:                            \n\t"
51           "movq (%1), %%mm0              \n\t"
52           "movq (%1, %3), %%mm1          \n\t"
53 @@ -418,7 +418,7 @@
54  {
55      __asm __volatile(
56           "lea (%3, %3), %%"REG_a"       \n\t"
57 -         ".balign 8                     \n\t"
58 +         ".p2align 3                    \n\t"
59           "1:                            \n\t"
60           "movq (%1), %%mm0              \n\t"
61           "movq 8(%1), %%mm4             \n\t"
62 Index: libavcodec/i386/dsputil_mmx_avg.h
63 ===================================================================
64 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/dsputil_mmx_avg.h,v
65 retrieving revision 1.29
66 diff -u -r1.29 dsputil_mmx_avg.h
67 --- libavcodec/i386/dsputil_mmx_avg.h   12 Jan 2006 22:43:17 -0000      1.29
68 +++ libavcodec/i386/dsputil_mmx_avg.h   26 Jan 2006 22:02:55 -0000
69 @@ -754,7 +754,7 @@
70          "lea (%3, %3), %%"REG_a"        \n\t"
71          "movq (%1), %%mm0               \n\t"
72          PAVGB" 1(%1), %%mm0             \n\t"
73 -        ".balign 8                      \n\t"
74 +        ".p2align 3                     \n\t"
75          "1:                             \n\t"
76          "movq (%1, %%"REG_a"), %%mm2    \n\t"
77          "movq (%1, %3), %%mm1           \n\t"
78 Index: libavcodec/i386/dsputil_mmx_rnd.h
79 ===================================================================
80 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/dsputil_mmx_rnd.h,v
81 retrieving revision 1.22
82 diff -u -r1.22 dsputil_mmx_rnd.h
83 --- libavcodec/i386/dsputil_mmx_rnd.h   12 Jan 2006 22:43:17 -0000      1.22
84 +++ libavcodec/i386/dsputil_mmx_rnd.h   26 Jan 2006 22:02:55 -0000
85 @@ -28,7 +28,7 @@
86      MOVQ_BFE(mm6);
87      __asm __volatile(
88          "lea    (%3, %3), %%"REG_a"     \n\t"
89 -        ".balign 8                      \n\t"
90 +        ".p2align 3                     \n\t"
91          "1:                             \n\t"
92          "movq   (%1), %%mm0             \n\t"
93          "movq   1(%1), %%mm1            \n\t"
94 @@ -69,7 +69,7 @@
95          "movq   %%mm4, (%3)             \n\t"
96          "add    %5, %3                  \n\t"
97          "decl   %0                      \n\t"
98 -        ".balign 8                      \n\t"
99 +        ".p2align 3                     \n\t"
100          "1:                             \n\t"
101          "movq   (%1), %%mm0             \n\t"
102          "movq   (%2), %%mm1             \n\t"
103 @@ -110,7 +110,7 @@
104      MOVQ_BFE(mm6);
105      __asm __volatile(
106          "lea        (%3, %3), %%"REG_a" \n\t"
107 -        ".balign 8                      \n\t"
108 +        ".p2align 3                     \n\t"
109          "1:                             \n\t"
110          "movq   (%1), %%mm0             \n\t"
111          "movq   1(%1), %%mm1            \n\t"
112 @@ -168,7 +168,7 @@
113          "movq   %%mm5, 8(%3)            \n\t"
114          "add    %5, %3                  \n\t"
115          "decl   %0                      \n\t"
116 -        ".balign 8                      \n\t"
117 +        ".p2align 3                     \n\t"
118          "1:                             \n\t"
119          "movq   (%1), %%mm0             \n\t"
120          "movq   (%2), %%mm1             \n\t"
121 @@ -206,7 +206,7 @@
122      __asm __volatile(
123          "lea (%3, %3), %%"REG_a"        \n\t"
124          "movq (%1), %%mm0               \n\t"
125 -        ".balign 8                      \n\t"
126 +        ".p2align 3                     \n\t"
127          "1:                             \n\t"
128          "movq   (%1, %3), %%mm1         \n\t"
129          "movq   (%1, %%"REG_a"),%%mm2   \n\t"
130 @@ -246,7 +246,7 @@
131          "paddusw %%mm1, %%mm5           \n\t"
132          "xor    %%"REG_a", %%"REG_a"    \n\t"
133          "add    %3, %1                  \n\t"
134 -        ".balign 8                      \n\t"
135 +        ".p2align 3                     \n\t"
136          "1:                             \n\t"
137          "movq   (%1, %%"REG_a"), %%mm0  \n\t"
138          "movq   1(%1, %%"REG_a"), %%mm2 \n\t"
139 @@ -458,7 +458,7 @@
140      __asm __volatile(
141          "lea    (%3, %3), %%"REG_a"     \n\t"
142          "movq   (%1), %%mm0             \n\t"
143 -        ".balign 8                      \n\t"
144 +        ".p2align 3                     \n\t"
145          "1:                             \n\t"
146          "movq   (%1, %3), %%mm1         \n\t"
147          "movq   (%1, %%"REG_a"), %%mm2  \n\t"
148 @@ -509,7 +509,7 @@
149          "paddusw %%mm1, %%mm5           \n\t"
150          "xor    %%"REG_a", %%"REG_a"    \n\t"
151          "add    %3, %1                  \n\t"
152 -        ".balign 8                      \n\t"
153 +        ".p2align 3                     \n\t"
154          "1:                             \n\t"
155          "movq   (%1, %%"REG_a"), %%mm0  \n\t"
156          "movq   1(%1, %%"REG_a"), %%mm2 \n\t"
157 Index: libavcodec/i386/fdct_mmx.c
158 ===================================================================
159 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/fdct_mmx.c,v
160 retrieving revision 1.19
161 diff -u -r1.19 fdct_mmx.c
162 --- libavcodec/i386/fdct_mmx.c  22 Dec 2005 01:10:09 -0000      1.19
163 +++ libavcodec/i386/fdct_mmx.c  26 Jan 2006 22:02:55 -0000
164 @@ -350,61 +350,67 @@
165  
166  static always_inline void fdct_row_sse2(const int16_t *in, int16_t *out)
167  {
168 +#define FDCT_ROW_SSE2_H1(i,t) \
169 +        "movq      " #i "(%0), %%xmm2      \n\t" \
170 +        "movq      " #i "+8(%0), %%xmm0    \n\t" \
171 +        "movdqa    " #t "+32(%1), %%xmm3   \n\t" \
172 +        "movdqa    " #t "+48(%1), %%xmm7   \n\t" \
173 +        "movdqa    " #t "(%1), %%xmm4      \n\t" \
174 +        "movdqa    " #t "+16(%1), %%xmm5   \n\t"
175 +
176 +#define FDCT_ROW_SSE2_H2(i,t) \
177 +        "movq      " #i "(%0), %%xmm2      \n\t" \
178 +        "movq      " #i "+8(%0), %%xmm0    \n\t" \
179 +        "movdqa    " #t "+32(%1), %%xmm3   \n\t" \
180 +        "movdqa    " #t "+48(%1), %%xmm7   \n\t"
181 +
182 +#define FDCT_ROW_SSE2(i) \
183 +        "movq      %%xmm2, %%xmm1       \n\t" \
184 +        "pshuflw   $27, %%xmm0, %%xmm0  \n\t" \
185 +        "paddsw    %%xmm0, %%xmm1       \n\t" \
186 +        "psubsw    %%xmm0, %%xmm2       \n\t" \
187 +        "punpckldq %%xmm2, %%xmm1       \n\t" \
188 +        "pshufd    $78, %%xmm1, %%xmm2  \n\t" \
189 +        "pmaddwd   %%xmm2, %%xmm3       \n\t" \
190 +        "pmaddwd   %%xmm1, %%xmm7       \n\t" \
191 +        "pmaddwd   %%xmm5, %%xmm2       \n\t" \
192 +        "pmaddwd   %%xmm4, %%xmm1       \n\t" \
193 +        "paddd     %%xmm7, %%xmm3       \n\t" \
194 +        "paddd     %%xmm2, %%xmm1       \n\t" \
195 +        "paddd     %%xmm6, %%xmm3       \n\t" \
196 +        "paddd     %%xmm6, %%xmm1       \n\t" \
197 +        "psrad     %3, %%xmm3           \n\t" \
198 +        "psrad     %3, %%xmm1           \n\t" \
199 +        "packssdw  %%xmm3, %%xmm1       \n\t" \
200 +        "movdqa    %%xmm1, " #i "(%4)   \n\t"
201 +
202      asm volatile(
203 -        ".macro FDCT_ROW_SSE2_H1 i t    \n\t"
204 -        "movq      \\i(%0), %%xmm2      \n\t"
205 -        "movq      \\i+8(%0), %%xmm0    \n\t"
206 -        "movdqa    \\t+32(%1), %%xmm3   \n\t"
207 -        "movdqa    \\t+48(%1), %%xmm7   \n\t"
208 -        "movdqa    \\t(%1), %%xmm4      \n\t"
209 -        "movdqa    \\t+16(%1), %%xmm5   \n\t"
210 -        ".endm                          \n\t"
211 -        ".macro FDCT_ROW_SSE2_H2 i t    \n\t"
212 -        "movq      \\i(%0), %%xmm2      \n\t"
213 -        "movq      \\i+8(%0), %%xmm0    \n\t"
214 -        "movdqa    \\t+32(%1), %%xmm3   \n\t"
215 -        "movdqa    \\t+48(%1), %%xmm7   \n\t"
216 -        ".endm                          \n\t"
217 -        ".macro FDCT_ROW_SSE2 i         \n\t"
218 -        "movq      %%xmm2, %%xmm1       \n\t"
219 -        "pshuflw   $27, %%xmm0, %%xmm0  \n\t"
220 -        "paddsw    %%xmm0, %%xmm1       \n\t"
221 -        "psubsw    %%xmm0, %%xmm2       \n\t"
222 -        "punpckldq %%xmm2, %%xmm1       \n\t"
223 -        "pshufd    $78, %%xmm1, %%xmm2  \n\t"
224 -        "pmaddwd   %%xmm2, %%xmm3       \n\t"
225 -        "pmaddwd   %%xmm1, %%xmm7       \n\t"
226 -        "pmaddwd   %%xmm5, %%xmm2       \n\t"
227 -        "pmaddwd   %%xmm4, %%xmm1       \n\t"
228 -        "paddd     %%xmm7, %%xmm3       \n\t"
229 -        "paddd     %%xmm2, %%xmm1       \n\t"
230 -        "paddd     %%xmm6, %%xmm3       \n\t"
231 -        "paddd     %%xmm6, %%xmm1       \n\t"
232 -        "psrad     %3, %%xmm3           \n\t"
233 -        "psrad     %3, %%xmm1           \n\t"
234 -        "packssdw  %%xmm3, %%xmm1       \n\t"
235 -        "movdqa    %%xmm1, \\i(%4)      \n\t"
236 -        ".endm                          \n\t"
237 +//        ".macro FDCT_ROW_SSE2_H1 i t    \n\t"
238 +//        ".endm                          \n\t"
239 +//        ".macro FDCT_ROW_SSE2_H2 i t    \n\t"
240 +//        ".endm                          \n\t"
241 +//        ".macro FDCT_ROW_SSE2 i         \n\t"
242 +//        ".endm                          \n\t"
243          "movdqa    (%2), %%xmm6         \n\t"
244 -        "FDCT_ROW_SSE2_H1 0 0           \n\t"
245 -        "FDCT_ROW_SSE2 0                \n\t"
246 -        "FDCT_ROW_SSE2_H2 64 0          \n\t"
247 -        "FDCT_ROW_SSE2 64               \n\t"
248 -
249 -        "FDCT_ROW_SSE2_H1 16 64         \n\t"
250 -        "FDCT_ROW_SSE2 16               \n\t"
251 -        "FDCT_ROW_SSE2_H2 112 64        \n\t"
252 -        "FDCT_ROW_SSE2 112              \n\t"
253 -
254 -        "FDCT_ROW_SSE2_H1 32 128        \n\t"
255 -        "FDCT_ROW_SSE2 32               \n\t"
256 -        "FDCT_ROW_SSE2_H2 96 128        \n\t"
257 -        "FDCT_ROW_SSE2 96               \n\t"
258 -
259 -        "FDCT_ROW_SSE2_H1 48 192        \n\t"
260 -        "FDCT_ROW_SSE2 48               \n\t"
261 -        "FDCT_ROW_SSE2_H2 80 192        \n\t"
262 -        "FDCT_ROW_SSE2 80               \n\t"
263 +        FDCT_ROW_SSE2_H1(0,0)
264 +        FDCT_ROW_SSE2(0)
265 +        FDCT_ROW_SSE2_H2(64,0)
266 +        FDCT_ROW_SSE2(64)
267 +
268 +        FDCT_ROW_SSE2_H1(16,64)
269 +        FDCT_ROW_SSE2(16)
270 +        FDCT_ROW_SSE2_H2(112,64)
271 +        FDCT_ROW_SSE2(112)
272 +
273 +        FDCT_ROW_SSE2_H1(32,128)
274 +        FDCT_ROW_SSE2(32)
275 +        FDCT_ROW_SSE2_H2(96,128)
276 +        FDCT_ROW_SSE2(96)
277 +
278 +        FDCT_ROW_SSE2_H1(48,192)
279 +        FDCT_ROW_SSE2(48)
280 +        FDCT_ROW_SSE2_H2(80,192)
281 +        FDCT_ROW_SSE2(80)
282          :
283          : "r" (in), "r" (tab_frw_01234567_sse2.tab_frw_01234567_sse2), "r" (fdct_r_row_sse2.fdct_r_row_sse2), "i" (SHIFT_FRW_ROW), "r" (out)
284      );
285 Index: libavcodec/i386/idct_mmx_xvid.c
286 ===================================================================
287 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/idct_mmx_xvid.c,v
288 retrieving revision 1.4
289 diff -u -r1.4 idct_mmx_xvid.c
290 --- libavcodec/i386/idct_mmx_xvid.c     12 Jan 2006 22:43:18 -0000      1.4
291 +++ libavcodec/i386/idct_mmx_xvid.c     26 Jan 2006 22:02:55 -0000
292 @@ -295,17 +295,17 @@
293    "movq 8+" #A1 ",%%mm1                \n\t"/* 1     ; x7 x6 x5 x4*/\
294    "movq %%mm0,%%mm2                \n\t"/* 2     ; x3 x2 x1 x0*/\
295    "movq " #A3 ",%%mm3                  \n\t"/* 3     ; w05 w04 w01 w00*/\
296 -  "pshufw $0b10001000,%%mm0,%%mm0  \n\t"/* x2 x0 x2 x0*/\
297 +  "pshufw $0x88,%%mm0,%%mm0  \n\t"/* x2 x0 x2 x0*/\
298    "movq 8+" #A3 ",%%mm4                \n\t"/* 4     ; w07 w06 w03 w02*/\
299    "movq %%mm1,%%mm5                \n\t"/* 5     ; x7 x6 x5 x4*/\
300    "pmaddwd %%mm0,%%mm3             \n\t"/* x2*w05+x0*w04 x2*w01+x0*w00*/\
301    "movq 32+" #A3 ",%%mm6               \n\t"/* 6     ; w21 w20 w17 w16*/\
302 -  "pshufw $0b10001000,%%mm1,%%mm1  \n\t"/* x6 x4 x6 x4*/\
303 +  "pshufw $0x88,%%mm1,%%mm1  \n\t"/* x6 x4 x6 x4*/\
304    "pmaddwd %%mm1,%%mm4             \n\t"/* x6*w07+x4*w06 x6*w03+x4*w02*/\
305    "movq 40+" #A3 ",%%mm7               \n\t"/* 7    ; w23 w22 w19 w18*/\
306 -  "pshufw $0b11011101,%%mm2,%%mm2  \n\t"/* x3 x1 x3 x1*/\
307 +  "pshufw $0xdd,%%mm2,%%mm2  \n\t"/* x3 x1 x3 x1*/\
308    "pmaddwd %%mm2,%%mm6             \n\t"/* x3*w21+x1*w20 x3*w17+x1*w16*/\
309 -  "pshufw $0b11011101,%%mm5,%%mm5  \n\t"/* x7 x5 x7 x5*/\
310 +  "pshufw $0xdd,%%mm5,%%mm5  \n\t"/* x7 x5 x7 x5*/\
311    "pmaddwd %%mm5,%%mm7             \n\t"/* x7*w23+x5*w22 x7*w19+x5*w18*/\
312    "paddd " #A4 ",%%mm3                 \n\t"/* +%4*/\
313    "pmaddwd 16+" #A3 ",%%mm0            \n\t"/* x2*w13+x0*w12 x2*w09+x0*w08*/\
314 @@ -330,7 +330,7 @@
315    "packssdw %%mm0,%%mm3            \n\t"/* 0     ; y3 y2 y1 y0*/\
316    "packssdw %%mm4,%%mm7            \n\t"/* 4     ; y6 y7 y4 y5*/\
317    "movq %%mm3, " #A2 "                  \n\t"/* 3     ; save y3 y2 y1 y0*/\
318 -  "pshufw $0b10110001,%%mm7,%%mm7  \n\t"/* y7 y6 y5 y4*/\
319 +  "pshufw $0xb1,%%mm7,%%mm7  \n\t"/* y7 y6 y5 y4*/\
320    "movq %%mm7,8                +" #A2 "\n\t"/* 7     ; save y7 y6 y5 y4*/\
321  
322  
323 Index: libavcodec/i386/motion_est_mmx.c
324 ===================================================================
325 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/motion_est_mmx.c,v
326 retrieving revision 1.19
327 diff -u -r1.19 motion_est_mmx.c
328 --- libavcodec/i386/motion_est_mmx.c    12 Jan 2006 22:43:18 -0000      1.19
329 +++ libavcodec/i386/motion_est_mmx.c    26 Jan 2006 22:02:55 -0000
330 @@ -34,7 +34,7 @@
331  {
332      long len= -(stride*h);
333      asm volatile(
334 -        ".balign 16                     \n\t"
335 +        ".p2align 4                     \n\t"
336          "1:                             \n\t"
337          "movq (%1, %%"REG_a"), %%mm0    \n\t"
338          "movq (%2, %%"REG_a"), %%mm2    \n\t"
339 @@ -70,7 +70,7 @@
340  {
341      long len= -(stride*h);
342      asm volatile(
343 -        ".balign 16                     \n\t"
344 +        ".p2align 4                     \n\t"
345          "1:                             \n\t"
346          "movq (%1, %%"REG_a"), %%mm0    \n\t"
347          "movq (%2, %%"REG_a"), %%mm2    \n\t"
348 @@ -92,7 +92,7 @@
349  {
350      long len= -(stride*h);
351      asm volatile(
352 -        ".balign 16                     \n\t"
353 +        ".p2align 4                     \n\t"
354          "1:                             \n\t"
355          "movq (%1, %%"REG_a"), %%mm0    \n\t"
356          "movq (%2, %%"REG_a"), %%mm2    \n\t"
357 @@ -118,7 +118,7 @@
358  { //FIXME reuse src
359      long len= -(stride*h);
360      asm volatile(
361 -        ".balign 16                     \n\t"
362 +        ".p2align 4                     \n\t"
363          "movq "MANGLE(bone)", %%mm5     \n\t"
364          "1:                             \n\t"
365          "movq (%1, %%"REG_a"), %%mm0    \n\t"
366 @@ -155,7 +155,7 @@
367  {
368      long len= -(stride*h);
369      asm volatile(
370 -        ".balign 16                     \n\t"
371 +        ".p2align 4                     \n\t"
372          "1:                             \n\t"
373          "movq (%1, %%"REG_a"), %%mm0    \n\t"
374          "movq (%2, %%"REG_a"), %%mm1    \n\t"
375 @@ -193,7 +193,7 @@
376  {
377      long len= -(stride*h);
378      asm volatile(
379 -        ".balign 16                     \n\t"
380 +        ".p2align 4                     \n\t"
381          "1:                             \n\t"
382          "movq (%1, %%"REG_a"), %%mm0    \n\t"
383          "movq (%2, %%"REG_a"), %%mm1    \n\t"
384 Index: libavcodec/i386/mpegvideo_mmx.c
385 ===================================================================
386 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/mpegvideo_mmx.c,v
387 retrieving revision 1.37
388 diff -u -r1.37 mpegvideo_mmx.c
389 --- libavcodec/i386/mpegvideo_mmx.c     12 Jan 2006 22:43:18 -0000      1.37
390 +++ libavcodec/i386/mpegvideo_mmx.c     26 Jan 2006 22:02:55 -0000
391 @@ -66,7 +66,7 @@
392                  "packssdw %%mm5, %%mm5          \n\t"
393                  "psubw %%mm5, %%mm7             \n\t"
394                  "pxor %%mm4, %%mm4              \n\t"
395 -                ".balign 16                     \n\t"
396 +                ".p2align 4                     \n\t"
397                  "1:                             \n\t"
398                  "movq (%0, %3), %%mm0           \n\t"
399                  "movq 8(%0, %3), %%mm1          \n\t"
400 @@ -129,7 +129,7 @@
401                  "packssdw %%mm5, %%mm5          \n\t"
402                  "psubw %%mm5, %%mm7             \n\t"
403                  "pxor %%mm4, %%mm4              \n\t"
404 -                ".balign 16                     \n\t"
405 +                ".p2align 4                     \n\t"
406                  "1:                             \n\t"
407                  "movq (%0, %3), %%mm0           \n\t"
408                  "movq 8(%0, %3), %%mm1          \n\t"
409 @@ -222,7 +222,7 @@
410                  "packssdw %%mm6, %%mm6          \n\t"
411                  "packssdw %%mm6, %%mm6          \n\t"
412                  "mov %3, %%"REG_a"              \n\t"
413 -                ".balign 16                     \n\t"
414 +                ".p2align 4                     \n\t"
415                  "1:                             \n\t"
416                  "movq (%0, %%"REG_a"), %%mm0    \n\t"
417                  "movq 8(%0, %%"REG_a"), %%mm1   \n\t"
418 @@ -285,7 +285,7 @@
419                  "packssdw %%mm6, %%mm6          \n\t"
420                  "packssdw %%mm6, %%mm6          \n\t"
421                  "mov %3, %%"REG_a"              \n\t"
422 -                ".balign 16                     \n\t"
423 +                ".p2align 4                     \n\t"
424                  "1:                             \n\t"
425                  "movq (%0, %%"REG_a"), %%mm0    \n\t"
426                  "movq 8(%0, %%"REG_a"), %%mm1   \n\t"
427 @@ -357,7 +357,7 @@
428                  "packssdw %%mm6, %%mm6          \n\t"
429                  "packssdw %%mm6, %%mm6          \n\t"
430                  "mov %3, %%"REG_a"              \n\t"
431 -                ".balign 16                     \n\t"
432 +                ".p2align 4                     \n\t"
433                  "1:                             \n\t"
434                  "movq (%0, %%"REG_a"), %%mm0    \n\t"
435                  "movq 8(%0, %%"REG_a"), %%mm1   \n\t"
436 @@ -418,7 +418,7 @@
437                  "packssdw %%mm6, %%mm6          \n\t"
438                  "packssdw %%mm6, %%mm6          \n\t"
439                  "mov %3, %%"REG_a"              \n\t"
440 -                ".balign 16                     \n\t"
441 +                ".p2align 4                     \n\t"
442                  "1:                             \n\t"
443                  "movq (%0, %%"REG_a"), %%mm0    \n\t"
444                  "movq 8(%0, %%"REG_a"), %%mm1   \n\t"
445 Index: libavcodec/i386/mpegvideo_mmx_template.c
446 ===================================================================
447 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/mpegvideo_mmx_template.c,v
448 retrieving revision 1.29
449 diff -u -r1.29 mpegvideo_mmx_template.c
450 --- libavcodec/i386/mpegvideo_mmx_template.c    12 Jan 2006 22:43:18 -0000      1.29
451 +++ libavcodec/i386/mpegvideo_mmx_template.c    26 Jan 2006 22:02:55 -0000
452 @@ -111,7 +111,7 @@
453              "pxor %%mm6, %%mm6                  \n\t"
454              "psubw (%3), %%mm6                  \n\t" // -bias[0]
455              "mov $-128, %%"REG_a"               \n\t"
456 -            ".balign 16                         \n\t"
457 +            ".p2align 4                         \n\t"
458              "1:                                 \n\t"
459              "pxor %%mm1, %%mm1                  \n\t" // 0
460              "movq (%1, %%"REG_a"), %%mm0        \n\t" // block[i]
461 @@ -155,7 +155,7 @@
462              "pxor %%mm7, %%mm7                  \n\t" // 0
463              "pxor %%mm4, %%mm4                  \n\t" // 0
464              "mov $-128, %%"REG_a"               \n\t"
465 -            ".balign 16                         \n\t"
466 +            ".p2align 4                         \n\t"
467              "1:                                 \n\t"
468              "pxor %%mm1, %%mm1                  \n\t" // 0
469              "movq (%1, %%"REG_a"), %%mm0        \n\t" // block[i]
470 Index: libavcodec/i386/simple_idct_mmx.c
471 ===================================================================
472 RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/simple_idct_mmx.c,v
473 retrieving revision 1.16
474 diff -u -r1.16 simple_idct_mmx.c
475 --- libavcodec/i386/simple_idct_mmx.c   12 Jan 2006 22:43:18 -0000      1.16
476 +++ libavcodec/i386/simple_idct_mmx.c   26 Jan 2006 22:02:55 -0000
477 @@ -459,13 +459,12 @@
478  
479  
480  //IDCT(      src0,   src4,   src1,    src5,    dst, rounder, shift)
481 -COL_IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
482 -COL_IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
483 -COL_IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
484 -COL_IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
485 +COL_IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
486 +COL_IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
487 +COL_IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
488 +COL_IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
489  
490  #else
491 -
492  #define DC_COND_IDCT(src0, src4, src1, src5, dst, rounder, shift) \
493          "movq " #src0 ", %%mm0          \n\t" /* R4     R0      r4      r0 */\
494          "movq " #src4 ", %%mm1          \n\t" /* R6     R2      r6      r2 */\
495 @@ -783,10 +782,10 @@
496  
497  
498  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
499 -IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
500 -IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
501 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
502 -IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
503 +IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
504 +IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
505 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
506 +IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
507          "jmp 9f                         \n\t"
508  
509          "#.balign 16                    \n\t"\
510 @@ -860,10 +859,10 @@
511          "movd %%mm5, 80+" #dst "        \n\t"
512  
513  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
514 -IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
515 -IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
516 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
517 -IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
518 +IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
519 +IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
520 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
521 +IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
522          "jmp 9f                         \n\t"
523  
524          "#.balign 16                    \n\t"\
525 @@ -928,10 +927,10 @@
526  
527  
528  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
529 -IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
530 -IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
531 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
532 -IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
533 +IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
534 +IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
535 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
536 +IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
537          "jmp 9f                         \n\t"
538  
539          "#.balign 16                    \n\t"\
540 @@ -1007,10 +1006,10 @@
541          "movd %%mm5, 80+" #dst "        \n\t"
542  
543  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
544 -IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
545 -IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
546 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
547 -IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
548 +IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
549 +IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
550 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
551 +IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
552          "jmp 9f                         \n\t"
553  
554          "#.balign 16                    \n\t"\
555 @@ -1073,10 +1072,10 @@
556  
557  
558  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
559 -IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
560 -IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
561 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
562 -IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
563 +IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
564 +IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
565 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
566 +IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
567          "jmp 9f                         \n\t"
568  
569          "#.balign 16                    \n\t"\
570 @@ -1141,10 +1140,10 @@
571  
572  
573  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
574 -IDCT(    0(%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
575 -//IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
576 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
577 -//IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
578 +IDCT(    0(%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
579 +//IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
580 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
581 +//IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
582          "jmp 9f                         \n\t"
583  
584  
585 @@ -1217,10 +1216,10 @@
586  
587  
588  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
589 -IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
590 -IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
591 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
592 -IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
593 +IDCT(    (%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
594 +IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
595 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
596 +IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
597          "jmp 9f                         \n\t"
598  
599  
600 @@ -1259,10 +1258,10 @@
601          "movq %%mm0, 80+" #dst "        \n\t"
602  
603  //IDCT(  src0,   src4,   src1,    src5,    dst, rounder, shift)
604 -IDCT(   0(%1), 64(%1), 32(%1),  96(%1),  0(%0),/nop, 20)
605 -//IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0),/nop, 20)
606 -IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0),/nop, 20)
607 -//IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0),/nop, 20)
608 +IDCT(   0(%1), 64(%1), 32(%1),  96(%1),  0(%0), "nop", 20)
609 +//IDCT(   8(%1), 72(%1), 40(%1), 104(%1),  4(%0), "nop", 20)
610 +IDCT(  16(%1), 80(%1), 48(%1), 112(%1),  8(%0), "nop", 20)
611 +//IDCT(  24(%1), 88(%1), 56(%1), 120(%1), 12(%0), "nop", 20)
612  
613  
614  #endif