comparison libmpeg2/libmpeg2_changes.diff @ 29264:e83eef58b30a

Remove all kind of trailing whitespaces from all MPlayer's files. This affects all kind of spaces (' ',^I,^M,^L,...): actually [:space:] regex character set.
author bircoph
date Wed, 13 May 2009 15:22:13 +0000
parents 621228f94c83
children 020ae1402728
comparison
equal deleted inserted replaced
29263:0f1b5b68af32 29264:e83eef58b30a
1 --- libmpeg2/cpu_accel.c 2006-06-16 20:12:26.000000000 +0200 1 --- libmpeg2/cpu_accel.c 2006-06-16 20:12:26.000000000 +0200
2 +++ libmpeg2/cpu_accel.c 2006-06-16 20:12:50.000000000 +0200 2 +++ libmpeg2/cpu_accel.c 2006-06-16 20:12:50.000000000 +0200
3 @@ -29,9 +33,13 @@ 3 @@ -29,9 +33,13 @@
4 #include "attributes.h" 4 #include "attributes.h"
5 #include "mpeg2_internal.h" 5 #include "mpeg2_internal.h"
6 6
7 +#include "cpudetect.h" 7 +#include "cpudetect.h"
8 + 8 +
9 -#if defined(ARCH_X86) || defined(ARCH_X86_64) 9 -#if defined(ARCH_X86) || defined(ARCH_X86_64)
10 +#if ARCH_X86 || ARCH_X86_64 10 +#if ARCH_X86 || ARCH_X86_64
11 static inline uint32_t arch_accel (uint32_t accel) 11 static inline uint32_t arch_accel (uint32_t accel)
12 { 12 {
13 +/* Use MPlayer CPU detection instead of libmpeg2 variant. */ 13 +/* Use MPlayer CPU detection instead of libmpeg2 variant. */
14 +#if 0 14 +#if 0
15 if (accel & (MPEG2_ACCEL_X86_3DNOW | MPEG2_ACCEL_X86_MMXEXT)) 15 if (accel & (MPEG2_ACCEL_X86_3DNOW | MPEG2_ACCEL_X86_MMXEXT))
16 accel |= MPEG2_ACCEL_X86_MMX; 16 accel |= MPEG2_ACCEL_X86_MMX;
17 17
18 @@ -124,6 +132,21 @@ 18 @@ -124,6 +132,21 @@
19 #endif /* ACCEL_DETECT */ 19 #endif /* ACCEL_DETECT */
20 20
21 return accel; 21 return accel;
22 + 22 +
23 +#else /* 0 */ 23 +#else /* 0 */
24 + accel = 0; 24 + accel = 0;
25 + if (gCpuCaps.hasMMX) 25 + if (gCpuCaps.hasMMX)
34 + return accel; 34 + return accel;
35 + 35 +
36 +#endif /* 0 */ 36 +#endif /* 0 */
37 } 37 }
38 #endif /* ARCH_X86 || ARCH_X86_64 */ 38 #endif /* ARCH_X86 || ARCH_X86_64 */
39 39
40 @@ -127,7 +150,7 @@ 40 @@ -127,7 +150,7 @@
41 } 41 }
42 #endif /* ARCH_X86 || ARCH_X86_64 */ 42 #endif /* ARCH_X86 || ARCH_X86_64 */
43 43
44 -#if defined(ACCEL_DETECT) && (defined(ARCH_PPC) || defined(ARCH_SPARC)) 44 -#if defined(ACCEL_DETECT) && (defined(ARCH_PPC) || defined(ARCH_SPARC))
45 +#if defined(ACCEL_DETECT) && (ARCH_PPC || ARCH_SPARC) 45 +#if defined(ACCEL_DETECT) && (ARCH_PPC || ARCH_SPARC)
46 #include <signal.h> 46 #include <signal.h>
47 #include <setjmp.h> 47 #include <setjmp.h>
48 48
49 @@ -146,7 +169,7 @@ 49 @@ -146,7 +169,7 @@
50 } 50 }
51 #endif /* ACCEL_DETECT && (ARCH_PPC || ARCH_SPARC) */ 51 #endif /* ACCEL_DETECT && (ARCH_PPC || ARCH_SPARC) */
52 52
53 -#ifdef ARCH_PPC 53 -#ifdef ARCH_PPC
54 +#if ARCH_PPC 54 +#if ARCH_PPC
55 static uint32_t arch_accel (uint32_t accel) 55 static uint32_t arch_accel (uint32_t accel)
56 { 56 {
57 #ifdef ACCEL_DETECT 57 #ifdef ACCEL_DETECT
58 @@ -183,7 +206,7 @@ 58 @@ -183,7 +206,7 @@
59 } 59 }
60 #endif /* ARCH_PPC */ 60 #endif /* ARCH_PPC */
61 61
62 -#ifdef ARCH_SPARC 62 -#ifdef ARCH_SPARC
63 +#if ARCH_SPARC 63 +#if ARCH_SPARC
64 static uint32_t arch_accel (uint32_t accel) 64 static uint32_t arch_accel (uint32_t accel)
65 { 65 {
66 if (accel & MPEG2_ACCEL_SPARC_VIS2) 66 if (accel & MPEG2_ACCEL_SPARC_VIS2)
67 @@ -229,7 +252,7 @@ 67 @@ -229,7 +252,7 @@
68 } 68 }
69 #endif /* ARCH_SPARC */ 69 #endif /* ARCH_SPARC */
70 70
71 -#ifdef ARCH_ALPHA 71 -#ifdef ARCH_ALPHA
72 +#if ARCH_ALPHA 72 +#if ARCH_ALPHA
73 static inline uint32_t arch_accel (uint32_t accel) 73 static inline uint32_t arch_accel (uint32_t accel)
74 { 74 {
75 if (accel & MPEG2_ACCEL_ALPHA_MVI) 75 if (accel & MPEG2_ACCEL_ALPHA_MVI)
76 @@ -253,7 +276,7 @@ 76 @@ -253,7 +276,7 @@
77 77
78 uint32_t mpeg2_detect_accel (uint32_t accel) 78 uint32_t mpeg2_detect_accel (uint32_t accel)
79 { 79 {
80 -#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC) 80 -#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)
81 +#if ARCH_X86 || ARCH_X86_64 || ARCH_PPC || ARCH_ALPHA || ARCH_SPARC 81 +#if ARCH_X86 || ARCH_X86_64 || ARCH_PPC || ARCH_ALPHA || ARCH_SPARC
82 accel = arch_accel (accel); 82 accel = arch_accel (accel);
92 #include "mpeg2_internal.h" 92 #include "mpeg2_internal.h"
93 -#if defined(ARCH_X86) || defined(ARCH_X86_64) 93 -#if defined(ARCH_X86) || defined(ARCH_X86_64)
94 +#if ARCH_X86 || ARCH_X86_64 94 +#if ARCH_X86 || ARCH_X86_64
95 #include "mmx.h" 95 #include "mmx.h"
96 #endif 96 #endif
97 97
98 void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL; 98 void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL;
99 void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL; 99 void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL;
100 100
101 -#if defined(ARCH_X86) || defined(ARCH_X86_64) 101 -#if defined(ARCH_X86) || defined(ARCH_X86_64)
102 +#if ARCH_X86 || ARCH_X86_64 102 +#if ARCH_X86 || ARCH_X86_64
103 static void state_restore_mmx (cpu_state_t * state) 103 static void state_restore_mmx (cpu_state_t * state)
104 { 104 {
105 emms (); 105 emms ();
106 } 106 }
107 #endif 107 #endif
108 108
109 -#ifdef ARCH_PPC 109 -#ifdef ARCH_PPC
110 +#if ARCH_PPC 110 +#if ARCH_PPC
111 #if defined(__APPLE_CC__) /* apple */ 111 #if defined(__APPLE_CC__) /* apple */
112 #define LI(a,b) "li r" #a "," #b "\n\t" 112 #define LI(a,b) "li r" #a "," #b "\n\t"
113 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t" 113 #define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
114 @@ -115,12 +115,12 @@ 114 @@ -115,12 +115,12 @@
115 115
116 void mpeg2_cpu_state_init (uint32_t accel) 116 void mpeg2_cpu_state_init (uint32_t accel)
117 { 117 {
118 -#if defined(ARCH_X86) || defined(ARCH_X86_64) 118 -#if defined(ARCH_X86) || defined(ARCH_X86_64)
119 +#if ARCH_X86 || ARCH_X86_64 119 +#if ARCH_X86 || ARCH_X86_64
120 if (accel & MPEG2_ACCEL_X86_MMX) { 120 if (accel & MPEG2_ACCEL_X86_MMX) {
140 + mpeg2dec->fbuf[1]->id=NULL; 140 + mpeg2dec->fbuf[1]->id=NULL;
141 + } 141 + }
142 +// printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n", 142 +// printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n",
143 +// mpeg2dec->fbuf[0]->buf[0],mpeg2dec->fbuf[1]->buf[0],mpeg2dec->fbuf[2]->buf[0]); 143 +// mpeg2dec->fbuf[0]->buf[0],mpeg2dec->fbuf[1]->buf[0],mpeg2dec->fbuf[2]->buf[0]);
144 } 144 }
145 145
146 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf) 146 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf)
147 --- libmpeg2/header.c 2006-06-16 20:12:26.000000000 +0200 147 --- libmpeg2/header.c 2006-06-16 20:12:26.000000000 +0200
148 +++ libmpeg2/header.c 2006-06-16 20:12:50.000000000 +0200 148 +++ libmpeg2/header.c 2006-06-16 20:12:50.000000000 +0200
149 @@ -100,6 +104,9 @@ 149 @@ -100,6 +104,9 @@
150 mpeg2dec->decoder.convert = NULL; 150 mpeg2dec->decoder.convert = NULL;
165 decoder->quantizer_prescale[idx][i][j] = 165 decoder->quantizer_prescale[idx][i][j] =
166 k * mpeg2dec->quantizer_matrix[idx][j]; 166 k * mpeg2dec->quantizer_matrix[idx][j];
167 --- libmpeg2/idct.c (revision 26652) 167 --- libmpeg2/idct.c (revision 26652)
168 +++ libmpeg2/idct.c (working copy) 168 +++ libmpeg2/idct.c (working copy)
169 @@ -235,34 +239,40 @@ 169 @@ -235,34 +239,40 @@
170 170
171 void mpeg2_idct_init (uint32_t accel) 171 void mpeg2_idct_init (uint32_t accel)
172 { 172 {
173 -#ifdef ARCH_X86 173 -#ifdef ARCH_X86
174 +#if HAVE_SSE2 174 +#if HAVE_SSE2
175 if (accel & MPEG2_ACCEL_X86_SSE2) { 175 if (accel & MPEG2_ACCEL_X86_SSE2) {
209 - } else if (accel & MPEG2_ACCEL_ALPHA) { 209 - } else if (accel & MPEG2_ACCEL_ALPHA) {
210 + } else 210 + } else
211 +#elif ARCH_ALPHA 211 +#elif ARCH_ALPHA
212 + if (accel & MPEG2_ACCEL_ALPHA) { 212 + if (accel & MPEG2_ACCEL_ALPHA) {
213 int i; 213 int i;
214 214
215 mpeg2_idct_copy = mpeg2_idct_copy_alpha; 215 mpeg2_idct_copy = mpeg2_idct_copy_alpha;
216 Index: libmpeg2/idct_alpha.c 216 Index: libmpeg2/idct_alpha.c
217 =================================================================== 217 ===================================================================
218 --- libmpeg2/idct_alpha.c (revision 28324) 218 --- libmpeg2/idct_alpha.c (revision 28324)
219 +++ libmpeg2/idct_alpha.c (revision 28325) 219 +++ libmpeg2/idct_alpha.c (revision 28325)
220 @@ -24,7 +24,7 @@ 220 @@ -24,7 +24,7 @@
221 221
222 #include "config.h" 222 #include "config.h"
223 223
224 -#ifdef ARCH_ALPHA 224 -#ifdef ARCH_ALPHA
225 +#if ARCH_ALPHA 225 +#if ARCH_ALPHA
226 226
227 #include <stdlib.h> 227 #include <stdlib.h>
228 #include <inttypes.h> 228 #include <inttypes.h>
229 Index: libmpeg2/idct_altivec.c 229 Index: libmpeg2/idct_altivec.c
230 =================================================================== 230 ===================================================================
231 --- libmpeg2/idct_altivec.c (revision 28324) 231 --- libmpeg2/idct_altivec.c (revision 28324)
232 +++ libmpeg2/idct_altivec.c (revision 28325) 232 +++ libmpeg2/idct_altivec.c (revision 28325)
233 @@ -23,7 +23,7 @@ 233 @@ -23,7 +23,7 @@
234 234
235 #include "config.h" 235 #include "config.h"
236 236
237 -#ifdef ARCH_PPC 237 -#ifdef ARCH_PPC
238 +#if ARCH_PPC 238 +#if ARCH_PPC
239 239
240 #ifdef HAVE_ALTIVEC_H 240 #ifdef HAVE_ALTIVEC_H
241 #include <altivec.h> 241 #include <altivec.h>
242 Index: libmpeg2/idct_mmx.c 242 Index: libmpeg2/idct_mmx.c
243 =================================================================== 243 ===================================================================
244 --- libmpeg2/idct_mmx.c (revision 28324) 244 --- libmpeg2/idct_mmx.c (revision 28324)
245 +++ libmpeg2/idct_mmx.c (revision 28325) 245 +++ libmpeg2/idct_mmx.c (revision 28325)
246 @@ -23,7 +23,7 @@ 246 @@ -23,7 +23,7 @@
247 247
248 #include "config.h" 248 #include "config.h"
249 249
250 -#if defined(ARCH_X86) || defined(ARCH_X86_64) 250 -#if defined(ARCH_X86) || defined(ARCH_X86_64)
251 +#if ARCH_X86 || ARCH_X86_64 251 +#if ARCH_X86 || ARCH_X86_64
252 252
253 #include <inttypes.h> 253 #include <inttypes.h>
254 254
255 --- libmpeg2/motion_comp.c 2006-06-16 20:12:26.000000000 +0200 255 --- libmpeg2/motion_comp.c 2006-06-16 20:12:26.000000000 +0200
256 +++ libmpeg2/motion_comp.c 2006-06-16 20:12:50.000000000 +0200 256 +++ libmpeg2/motion_comp.c 2006-06-16 20:12:50.000000000 +0200
257 @@ -33,34 +37,40 @@ 257 @@ -33,34 +37,40 @@
258 258
259 void mpeg2_mc_init (uint32_t accel) 259 void mpeg2_mc_init (uint32_t accel)
260 { 260 {
261 -#ifdef ARCH_X86 261 -#ifdef ARCH_X86
262 +#if HAVE_MMX2 262 +#if HAVE_MMX2
263 if (accel & MPEG2_ACCEL_X86_MMXEXT) 263 if (accel & MPEG2_ACCEL_X86_MMXEXT)
307 Index: libmpeg2/motion_comp_alpha.c 307 Index: libmpeg2/motion_comp_alpha.c
308 =================================================================== 308 ===================================================================
309 --- libmpeg2/motion_comp_alpha.c (revision 28324) 309 --- libmpeg2/motion_comp_alpha.c (revision 28324)
310 +++ libmpeg2/motion_comp_alpha.c (revision 28325) 310 +++ libmpeg2/motion_comp_alpha.c (revision 28325)
311 @@ -22,7 +22,7 @@ 311 @@ -22,7 +22,7 @@
312 312
313 #include "config.h" 313 #include "config.h"
314 314
315 -#ifdef ARCH_ALPHA 315 -#ifdef ARCH_ALPHA
316 +#if ARCH_ALPHA 316 +#if ARCH_ALPHA
317 317
318 #include <inttypes.h> 318 #include <inttypes.h>
319 319
320 Index: libmpeg2/motion_comp_altivec.c 320 Index: libmpeg2/motion_comp_altivec.c
321 =================================================================== 321 ===================================================================
322 --- libmpeg2/motion_comp_altivec.c (revision 28324) 322 --- libmpeg2/motion_comp_altivec.c (revision 28324)
323 +++ libmpeg2/motion_comp_altivec.c (revision 28325) 323 +++ libmpeg2/motion_comp_altivec.c (revision 28325)
324 @@ -23,7 +23,7 @@ 324 @@ -23,7 +23,7 @@
325 325
326 #include "config.h" 326 #include "config.h"
327 327
328 -#ifdef ARCH_PPC 328 -#ifdef ARCH_PPC
329 +#if ARCH_PPC 329 +#if ARCH_PPC
330 330
331 #ifdef HAVE_ALTIVEC_H 331 #ifdef HAVE_ALTIVEC_H
332 #include <altivec.h> 332 #include <altivec.h>
333 Index: libmpeg2/motion_comp_arm.c 333 Index: libmpeg2/motion_comp_arm.c
334 =================================================================== 334 ===================================================================
335 --- libmpeg2/motion_comp_arm.c (revision 28324) 335 --- libmpeg2/motion_comp_arm.c (revision 28324)
336 +++ libmpeg2/motion_comp_arm.c (revision 28325) 336 +++ libmpeg2/motion_comp_arm.c (revision 28325)
337 @@ -22,7 +22,7 @@ 337 @@ -22,7 +22,7 @@
338 338
339 #include "config.h" 339 #include "config.h"
340 340
341 -#ifdef ARCH_ARM 341 -#ifdef ARCH_ARM
342 +#if ARCH_ARM 342 +#if ARCH_ARM
343 343
344 #include <inttypes.h> 344 #include <inttypes.h>
345 345
346 Index: libmpeg2/motion_comp_mmx.c 346 Index: libmpeg2/motion_comp_mmx.c
347 =================================================================== 347 ===================================================================
348 --- libmpeg2/motion_comp_mmx.c (revision 28324) 348 --- libmpeg2/motion_comp_mmx.c (revision 28324)
349 +++ libmpeg2/motion_comp_mmx.c (revision 28325) 349 +++ libmpeg2/motion_comp_mmx.c (revision 28325)
350 @@ -23,7 +23,7 @@ 350 @@ -23,7 +23,7 @@
351 351
352 #include "config.h" 352 #include "config.h"
353 353
354 -#if defined(ARCH_X86) || defined(ARCH_X86_64) 354 -#if defined(ARCH_X86) || defined(ARCH_X86_64)
355 +#if ARCH_X86 || ARCH_X86_64 355 +#if ARCH_X86 || ARCH_X86_64
356 356
357 #include <inttypes.h> 357 #include <inttypes.h>
358 358
359 Index: libmpeg2/motion_comp_vis.c 359 Index: libmpeg2/motion_comp_vis.c
360 =================================================================== 360 ===================================================================
361 --- libmpeg2/motion_comp_vis.c (revision 28324) 361 --- libmpeg2/motion_comp_vis.c (revision 28324)
362 +++ libmpeg2/motion_comp_vis.c (revision 28325) 362 +++ libmpeg2/motion_comp_vis.c (revision 28325)
363 @@ -22,7 +22,7 @@ 363 @@ -22,7 +22,7 @@
364 364
365 #include "config.h" 365 #include "config.h"
366 366
367 -#ifdef ARCH_SPARC 367 -#ifdef ARCH_SPARC
368 +#if ARCH_SPARC 368 +#if ARCH_SPARC
369 369
370 #include <inttypes.h> 370 #include <inttypes.h>
371 371
372 --- libmpeg2/mpeg2_internal.h 2006-06-16 20:12:26.000000000 +0200 372 --- libmpeg2/mpeg2_internal.h 2006-06-16 20:12:26.000000000 +0200
373 +++ libmpeg2/mpeg2_internal.h 2006-06-16 20:12:50.000000000 +0200 373 +++ libmpeg2/mpeg2_internal.h 2006-06-16 20:12:50.000000000 +0200
374 @@ -152,6 +156,11 @@ 374 @@ -152,6 +156,11 @@
375 375
376 /* XXX: stuff due to xine shit */ 376 /* XXX: stuff due to xine shit */
377 int8_t q_scale_type; 377 int8_t q_scale_type;
378 + 378 +
379 + int quantizer_scales[32]; 379 + int quantizer_scales[32];
380 + int quantizer_scale; 380 + int quantizer_scale;
381 + char* quant_store; 381 + char* quant_store;
382 + int quant_stride; 382 + int quant_stride;
383 }; 383 };
384 384
385 typedef struct { 385 typedef struct {
386 @@ -223,6 +232,9 @@ 386 @@ -223,6 +232,9 @@
387 //int8_t q_scale_type, scaled[4]; 387 //int8_t q_scale_type, scaled[4];
388 uint8_t quantizer_matrix[4][64]; 388 uint8_t quantizer_matrix[4][64];
389 uint8_t new_quantizer_matrix[4][64]; 389 uint8_t new_quantizer_matrix[4][64];
390 + 390 +
391 + unsigned char *pending_buffer; 391 + unsigned char *pending_buffer;
392 + int pending_length; 392 + int pending_length;
393 }; 393 };
394 394
395 typedef struct { 395 typedef struct {
396 @@ -226,7 +238,7 @@ 396 @@ -226,7 +238,7 @@
397 }; 397 };
398 398
399 typedef struct { 399 typedef struct {
400 -#ifdef ARCH_PPC 400 -#ifdef ARCH_PPC
401 +#if ARCH_PPC 401 +#if ARCH_PPC
402 uint8_t regv[12*16]; 402 uint8_t regv[12*16];
403 #endif 403 #endif
404 int dummy; 404 int dummy;
405 --- libmpeg2/slice.c 2006-06-16 20:12:26.000000000 +0200 405 --- libmpeg2/slice.c 2006-06-16 20:12:26.000000000 +0200
406 +++ libmpeg2/slice.c 2006-06-16 20:12:50.000000000 +0200 406 +++ libmpeg2/slice.c 2006-06-16 20:12:50.000000000 +0200
407 @@ -142,6 +146,7 @@ 407 @@ -142,6 +146,7 @@
408 408
409 quantizer_scale_code = UBITS (bit_buf, 5); 409 quantizer_scale_code = UBITS (bit_buf, 5);
410 DUMPBITS (bit_buf, bits, 5); 410 DUMPBITS (bit_buf, bits, 5);
411 + decoder->quantizer_scale = decoder->quantizer_scales[quantizer_scale_code]; 411 + decoder->quantizer_scale = decoder->quantizer_scales[quantizer_scale_code];
412 412
413 decoder->quantizer_matrix[0] = 413 decoder->quantizer_matrix[0] =
414 decoder->quantizer_prescale[0][quantizer_scale_code]; 414 decoder->quantizer_prescale[0][quantizer_scale_code];
415 @@ -1564,6 +1569,24 @@ 415 @@ -1564,6 +1569,24 @@
416 416
417 #define NEXT_MACROBLOCK \ 417 #define NEXT_MACROBLOCK \
418 do { \ 418 do { \
419 + if(decoder->quant_store) { \ 419 + if(decoder->quant_store) { \
420 + if (decoder->picture_structure == TOP_FIELD) \ 420 + if (decoder->picture_structure == TOP_FIELD) \
421 + decoder->quant_store[2 * decoder->quant_stride \ 421 + decoder->quant_store[2 * decoder->quant_stride \