annotate libmpeg2/libmpeg-0.4.0.diff @ 13040:3cc852100a37

another wrong style Warning
author wight
date Wed, 18 Aug 2004 08:31:38 +0000
parents 3380d4a65b15
children 456a348bd973
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
1 diff -ur libmpeg2/cpu_accel.c libmpeg2/cpu_accel.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
2 --- libmpeg2/cpu_accel.c 2003-10-06 04:31:52.000000000 +0200
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
3 +++ libmpeg2/cpu_accel.c 2004-02-18 13:48:26.000000000 +0100
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
4 @@ -108,7 +108,7 @@
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
5 }
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
6 #endif /* ARCH_X86 */
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
7
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
8 -#if defined(ARCH_PPC) || defined(ARCH_SPARC)
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
9 +#if defined(ARCH_PPC) || (defined(ARCH_SPARC) && defined(HAVE_VIS))
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
10 #include <signal.h>
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
11 #include <setjmp.h>
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
12
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
13 @@ -195,6 +195,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
14 #ifdef ARCH_ALPHA
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
15 static inline uint32_t arch_accel (void)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
16 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
17 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
18 uint64_t no_mvi;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
19
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
20 asm volatile ("amask %1, %0"
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
21 @@ -202,6 +203,9 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
22 : "rI" (256)); /* AMASK_MVI */
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
23 return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA |
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
24 MPEG2_ACCEL_ALPHA_MVI);
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
25 +#else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
26 + return MPEG2_ACCEL_ALPHA;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
27 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
28 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
29 #endif /* ARCH_ALPHA */
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
30 #endif /* ACCEL_DETECT */
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
31 diff -ur libmpeg2/cpu_state.c libmpeg2/cpu_state.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
32 --- libmpeg2/cpu_state.c 2003-08-21 10:00:49.000000000 +0200
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
33 +++ libmpeg2/cpu_state.c 2004-02-18 13:48:29.000000000 +0100
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
34 @@ -120,7 +120,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
35 mpeg2_cpu_state_restore = state_restore_mmx;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
36 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
37 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
38 -#ifdef ARCH_PPC
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
39 +#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
40 if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
41 mpeg2_cpu_state_save = state_save_altivec;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
42 mpeg2_cpu_state_restore = state_restore_altivec;
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
43 diff -ur libmpeg2/decode.c libmpeg2/decode.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
44 --- libmpeg2/decode.c 2003-12-22 12:59:34.000000000 +0100
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
45 +++ libmpeg2/decode.c 2004-02-18 14:19:01.000000000 +0100
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
46 @@ -351,6 +351,15 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
47 fbuf->buf[1] = buf[1];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
48 fbuf->buf[2] = buf[2];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
49 fbuf->id = id;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
50 + // HACK! FIXME! At first I frame, copy pointers to prediction frame too!
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
51 + if (mpeg2dec->custom_fbuf && !mpeg2dec->fbuf[1]->buf[0]){
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
52 + mpeg2dec->fbuf[1]->buf[0]=buf[0];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
53 + mpeg2dec->fbuf[1]->buf[1]=buf[1];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
54 + mpeg2dec->fbuf[1]->buf[2]=buf[2];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
55 + mpeg2dec->fbuf[1]->id=NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
56 + }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
57 +// printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n",
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
58 +// mpeg2dec->fbuf[0]->buf[0],mpeg2dec->fbuf[1]->buf[0],mpeg2dec->fbuf[2]->buf[0]);
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
59 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
60
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
61 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf)
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
62 diff -ur libmpeg2/header.c libmpeg2/header.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
63 --- libmpeg2/header.c 2003-12-22 12:24:02.000000000 +0100
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
64 +++ libmpeg2/header.c 2004-08-02 18:07:50.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
65 @@ -100,6 +100,9 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
66 mpeg2dec->decoder.convert = NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
67 mpeg2dec->decoder.convert_id = NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
68 mpeg2dec->picture = mpeg2dec->pictures;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
69 + memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
70 + memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
71 + memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
72 mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
73 mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
74 mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
75 @@ -551,6 +554,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
76 if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
77 picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
78 flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
79 + flags |= (buffer[3] & 2) ? PIC_FLAG_REPEAT_FIRST_FIELD : 0;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
80 } else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
81 picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
82 break;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
83 @@ -799,6 +803,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
84 mpeg2dec->scaled[index] = mpeg2dec->q_scale_type;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
85 for (i = 0; i < 32; i++) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
86 k = mpeg2dec->q_scale_type ? non_linear_scale[i] : (i << 1);
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
87 + decoder->quantizer_scale = k;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
88 for (j = 0; j < 64; j++)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
89 decoder->quantizer_prescale[index][i][j] =
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
90 k * mpeg2dec->quantizer_matrix[index][j];
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
91 diff -ur libmpeg2/idct_alpha.c libmpeg2/idct_alpha.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
92 --- libmpeg2/idct_alpha.c 2003-09-19 11:26:42.000000000 +0200
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
93 +++ libmpeg2/idct_alpha.c 2004-02-18 13:48:29.000000000 +0100
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
94 @@ -59,7 +59,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
95 } while (0)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
96 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
97
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
98 -static void inline idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
99 +static inline void idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
100 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
101 uint64_t l, r;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
102 int_fast32_t d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
103 @@ -116,7 +116,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
104 block[7] = (a0 - b0) >> 12;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
105 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
106
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
107 -static void inline idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
108 +static inline void idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
109 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
110 int_fast32_t d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
111 int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
112 @@ -157,6 +157,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
113 block[8*7] = (a0 - b0) >> 17;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
114 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
115
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
116 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
117 void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
118 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
119 uint64_t clampmask;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
120 @@ -289,6 +290,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
121 stq (p7, dest + 7 * stride);
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
122 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
123 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
124 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
125
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
126 void mpeg2_idct_copy_alpha (int16_t * block, uint8_t * dest, const int stride)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
127 {
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
128 diff -ur libmpeg2/idct.c libmpeg2/idct.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
129 --- libmpeg2/idct.c 2003-09-19 11:26:42.000000000 +0200
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
130 +++ libmpeg2/idct.c 2004-02-18 14:30:15.000000000 +0100
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
131 @@ -66,7 +66,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
132 } while (0)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
133 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
134
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
135 -static void inline idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
136 +static inline void idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
137 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
138 int d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
139 int a0, a1, a2, a3, b0, b1, b2, b3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
140 @@ -119,7 +119,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
141 block[7] = (a0 - b0) >> 12;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
142 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
143
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
144 -static void inline idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
145 +static inline void idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
146 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
147 int d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
148 int a0, a1, a2, a3, b0, b1, b2, b3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
149 @@ -254,11 +254,14 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
150 } else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
151 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
152 #ifdef ARCH_ALPHA
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
153 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
154 if (accel & MPEG2_ACCEL_ALPHA_MVI) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
155 mpeg2_idct_copy = mpeg2_idct_copy_mvi;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
156 mpeg2_idct_add = mpeg2_idct_add_mvi;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
157 mpeg2_idct_alpha_init ();
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
158 - } else if (accel & MPEG2_ACCEL_ALPHA) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
159 + } else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
160 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
161 + if (accel & MPEG2_ACCEL_ALPHA) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
162 int i;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
163
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
164 mpeg2_idct_copy = mpeg2_idct_copy_alpha;
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
165 diff -ur libmpeg2/motion_comp.c libmpeg2/motion_comp.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
166 --- libmpeg2/motion_comp.c 2003-10-06 04:31:52.000000000 +0200
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
167 +++ libmpeg2/motion_comp.c 2004-02-18 13:48:37.000000000 +0100
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
168 @@ -43,20 +43,24 @@
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
169 else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
170 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
171 #ifdef ARCH_PPC
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
172 +#ifdef HAVE_ALTIVEC
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
173 if (accel & MPEG2_ACCEL_PPC_ALTIVEC)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
174 mpeg2_mc = mpeg2_mc_altivec;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
175 else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
176 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
177 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
178 #ifdef ARCH_ALPHA
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
179 if (accel & MPEG2_ACCEL_ALPHA)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
180 mpeg2_mc = mpeg2_mc_alpha;
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
181 else
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
182 #endif
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
183 #ifdef ARCH_SPARC
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
184 +#ifdef HAVE_VIS
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
185 if (accel & MPEG2_ACCEL_SPARC_VIS)
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
186 mpeg2_mc = mpeg2_mc_vis;
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
187 else
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
188 #endif
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
189 +#endif
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
190 mpeg2_mc = mpeg2_mc_c;
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
191 }
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
192
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
193 diff -ur libmpeg2/mpeg2_internal.h libmpeg2/mpeg2_internal.h
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
194 --- libmpeg2/mpeg2_internal.h 2003-12-22 12:24:02.000000000 +0100
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
195 +++ libmpeg2/mpeg2_internal.h 2004-08-02 18:09:17.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
196 @@ -144,6 +144,11 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
197 int second_field;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
198
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
199 int mpeg1;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
200 +
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
201 + /* for MPlayer: */
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
202 + int quantizer_scale;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
203 + char* quant_store;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
204 + int quant_stride;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
205 };
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
206
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
207 typedef struct {
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
208 diff -ur libmpeg2/slice.c libmpeg2/slice.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
209 --- libmpeg2/slice.c 2003-12-22 12:24:02.000000000 +0100
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
210 +++ libmpeg2/slice.c 2004-08-02 18:07:50.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
211 @@ -1564,6 +1564,9 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
212
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
213 #define NEXT_MACROBLOCK \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
214 do { \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
215 + if(decoder->quant_store) \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
216 + decoder->quant_store[decoder->quant_stride*(decoder->v_offset>>4) \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
217 + +(decoder->offset>>4)] = decoder->quantizer_scale; \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
218 decoder->offset += 16; \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
219 if (decoder->offset == decoder->width) { \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
220 do { /* just so we can use the break statement */ \
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
221 diff -ur include/mpeg2.h include/mpeg2.h
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
222 --- include/mpeg2.h 2003-12-22 13:13:35.000000000 +0100
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
223 +++ include/mpeg2.h 2004-02-18 13:50:13.000000000 +0100
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
224 @@ -82,6 +82,7 @@
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
225 #define PIC_FLAG_COMPOSITE_DISPLAY 32
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
226 #define PIC_FLAG_SKIP 64
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
227 #define PIC_FLAG_TAGS 128
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
228 +#define PIC_FLAG_REPEAT_FIRST_FIELD 256
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
229 #define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
230
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
231 typedef struct mpeg2_picture_s {