annotate libmpeg2/libmpeg-0.4.0.diff @ 13395:07708ec98d87

New MD5 sum video output driver. For every frame, it calculates the MD5 sum and writes a list of those sums to an, optionally specified, output file. It does not rely on external programs to be installed. The MD5 sum code is borrowed from the uCIFS library, written by Christopher R. Hertel in 2004 and released under the LGPL license. Note: This driver is not yet activated and will not be compiled and linked to libvo. A separate patch will take care of that. This is just for adding the files to the repository.
author ivo
date Mon, 20 Sep 2004 01:01:08 +0000
parents 456a348bd973
children 96259a2f2142
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13147
henry
parents: 13020
diff changeset
1 diff -ur libmpeg2/attributes.h libmpeg2/attributes.h
henry
parents: 13020
diff changeset
2 --- libmpeg2/attributes.h 2003-01-09 08:48:40.000000000 +0100
henry
parents: 13020
diff changeset
3 +++ libmpeg2/attributes.h 2004-08-25 20:59:47.000000000 +0200
henry
parents: 13020
diff changeset
4 @@ -25,7 +25,7 @@
henry
parents: 13020
diff changeset
5 #ifdef ATTRIBUTE_ALIGNED_MAX
henry
parents: 13020
diff changeset
6 #define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
henry
parents: 13020
diff changeset
7 #else
henry
parents: 13020
diff changeset
8 -#define ATTR_ALIGN(align)
henry
parents: 13020
diff changeset
9 +#define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((16 < align) ? 16 : align)))
henry
parents: 13020
diff changeset
10 #endif
henry
parents: 13020
diff changeset
11
henry
parents: 13020
diff changeset
12 #ifdef HAVE_BUILTIN_EXPECT
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
13 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
14 --- libmpeg2/cpu_accel.c 2003-10-06 04:31:52.000000000 +0200
13147
henry
parents: 13020
diff changeset
15 +++ libmpeg2/cpu_accel.c 2004-08-15 15:37:41.000000000 +0200
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
16 @@ -108,7 +108,7 @@
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
17 }
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
18 #endif /* ARCH_X86 */
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
19
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
20 -#if defined(ARCH_PPC) || defined(ARCH_SPARC)
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
21 +#if defined(ARCH_PPC) || (defined(ARCH_SPARC) && defined(HAVE_VIS))
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
22 #include <signal.h>
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
23 #include <setjmp.h>
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
24
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
25 @@ -195,6 +195,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
26 #ifdef ARCH_ALPHA
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
27 static inline uint32_t arch_accel (void)
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 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
30 uint64_t no_mvi;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
31
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
32 asm volatile ("amask %1, %0"
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
33 @@ -202,6 +203,9 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
34 : "rI" (256)); /* AMASK_MVI */
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
35 return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA |
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
36 MPEG2_ACCEL_ALPHA_MVI);
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
37 +#else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
38 + return MPEG2_ACCEL_ALPHA;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
39 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
40 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
41 #endif /* ARCH_ALPHA */
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
42 #endif /* ACCEL_DETECT */
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
43 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
44 --- libmpeg2/cpu_state.c 2003-08-21 10:00:49.000000000 +0200
13147
henry
parents: 13020
diff changeset
45 +++ libmpeg2/cpu_state.c 2004-08-02 13:27:37.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
46 @@ -120,7 +120,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
47 mpeg2_cpu_state_restore = state_restore_mmx;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
48 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
49 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
50 -#ifdef ARCH_PPC
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
51 +#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
52 if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
53 mpeg2_cpu_state_save = state_save_altivec;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
54 mpeg2_cpu_state_restore = state_restore_altivec;
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
55 diff -ur libmpeg2/decode.c libmpeg2/decode.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
56 --- libmpeg2/decode.c 2003-12-22 12:59:34.000000000 +0100
13147
henry
parents: 13020
diff changeset
57 +++ libmpeg2/decode.c 2004-08-02 13:27:37.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
58 @@ -351,6 +351,15 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
59 fbuf->buf[1] = buf[1];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
60 fbuf->buf[2] = buf[2];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
61 fbuf->id = id;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
62 + // HACK! FIXME! At first I frame, copy pointers to prediction frame too!
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
63 + if (mpeg2dec->custom_fbuf && !mpeg2dec->fbuf[1]->buf[0]){
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
64 + mpeg2dec->fbuf[1]->buf[0]=buf[0];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
65 + mpeg2dec->fbuf[1]->buf[1]=buf[1];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
66 + mpeg2dec->fbuf[1]->buf[2]=buf[2];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
67 + mpeg2dec->fbuf[1]->id=NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
68 + }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
69 +// printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n",
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
70 +// 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
71 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
72
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
73 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
74 diff -ur libmpeg2/header.c libmpeg2/header.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
75 --- libmpeg2/header.c 2003-12-22 12:24:02.000000000 +0100
13147
henry
parents: 13020
diff changeset
76 +++ libmpeg2/header.c 2004-08-24 22:25:07.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
77 @@ -100,6 +100,9 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
78 mpeg2dec->decoder.convert = NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
79 mpeg2dec->decoder.convert_id = NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
80 mpeg2dec->picture = mpeg2dec->pictures;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
81 + memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
82 + memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
83 + memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
84 mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
85 mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
86 mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
87 @@ -551,6 +554,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
88 if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
89 picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
90 flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
91 + flags |= (buffer[3] & 2) ? PIC_FLAG_REPEAT_FIRST_FIELD : 0;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
92 } else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
93 picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
94 break;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
95 @@ -799,6 +803,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
96 mpeg2dec->scaled[index] = mpeg2dec->q_scale_type;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
97 for (i = 0; i < 32; i++) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
98 k = mpeg2dec->q_scale_type ? non_linear_scale[i] : (i << 1);
13147
henry
parents: 13020
diff changeset
99 + decoder->quantizer_scales[i] = k;
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
100 for (j = 0; j < 64; j++)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
101 decoder->quantizer_prescale[index][i][j] =
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
102 k * mpeg2dec->quantizer_matrix[index][j];
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
103 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
104 --- libmpeg2/idct_alpha.c 2003-09-19 11:26:42.000000000 +0200
13147
henry
parents: 13020
diff changeset
105 +++ libmpeg2/idct_alpha.c 2004-08-02 13:27:37.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
106 @@ -59,7 +59,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
107 } while (0)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
108 #endif
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 -static void inline idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
111 +static inline void idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
112 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
113 uint64_t l, r;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
114 int_fast32_t d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
115 @@ -116,7 +116,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
116 block[7] = (a0 - b0) >> 12;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
117 }
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 -static void inline idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
120 +static inline void idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
121 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
122 int_fast32_t d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
123 int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
124 @@ -157,6 +157,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
125 block[8*7] = (a0 - b0) >> 17;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
126 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
127
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
128 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
129 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
130 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
131 uint64_t clampmask;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
132 @@ -289,6 +290,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
133 stq (p7, dest + 7 * stride);
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 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
136 +#endif
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 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
139 {
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
140 diff -ur libmpeg2/idct.c libmpeg2/idct.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
141 --- libmpeg2/idct.c 2003-09-19 11:26:42.000000000 +0200
13147
henry
parents: 13020
diff changeset
142 +++ libmpeg2/idct.c 2004-08-02 13:27:37.000000000 +0200
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
143 @@ -66,7 +66,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
144 } while (0)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
145 #endif
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 -static void inline idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
148 +static inline void idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
149 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
150 int d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
151 int a0, a1, a2, a3, b0, b1, b2, b3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
152 @@ -119,7 +119,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
153 block[7] = (a0 - b0) >> 12;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
154 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
155
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
156 -static void inline idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
157 +static inline void idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
158 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
159 int d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
160 int a0, a1, a2, a3, b0, b1, b2, b3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
161 @@ -254,11 +254,14 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
162 } else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
163 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
164 #ifdef ARCH_ALPHA
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
165 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
166 if (accel & MPEG2_ACCEL_ALPHA_MVI) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
167 mpeg2_idct_copy = mpeg2_idct_copy_mvi;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
168 mpeg2_idct_add = mpeg2_idct_add_mvi;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
169 mpeg2_idct_alpha_init ();
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
170 - } else if (accel & MPEG2_ACCEL_ALPHA) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
171 + } else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
172 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
173 + if (accel & MPEG2_ACCEL_ALPHA) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
174 int i;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
175
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
176 mpeg2_idct_copy = mpeg2_idct_copy_alpha;
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
177 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
178 --- libmpeg2/motion_comp.c 2003-10-06 04:31:52.000000000 +0200
13147
henry
parents: 13020
diff changeset
179 +++ libmpeg2/motion_comp.c 2004-08-15 15:37:41.000000000 +0200
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
180 @@ -43,20 +43,24 @@
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
181 else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
182 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
183 #ifdef ARCH_PPC
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
184 +#ifdef HAVE_ALTIVEC
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
185 if (accel & MPEG2_ACCEL_PPC_ALTIVEC)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
186 mpeg2_mc = mpeg2_mc_altivec;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
187 else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
188 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
189 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
190 #ifdef ARCH_ALPHA
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
191 if (accel & MPEG2_ACCEL_ALPHA)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
192 mpeg2_mc = mpeg2_mc_alpha;
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
193 else
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
194 #endif
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
195 #ifdef ARCH_SPARC
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
196 +#ifdef HAVE_VIS
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
197 if (accel & MPEG2_ACCEL_SPARC_VIS)
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
198 mpeg2_mc = mpeg2_mc_vis;
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
199 else
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
200 #endif
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
201 +#endif
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
202 mpeg2_mc = mpeg2_mc_c;
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
203 }
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
204
13147
henry
parents: 13020
diff changeset
205 diff -ur libmpeg2/mpeg2.h libmpeg2/mpeg2.h
henry
parents: 13020
diff changeset
206 --- libmpeg2/mpeg2.h 2003-12-22 13:13:35.000000000 +0100
henry
parents: 13020
diff changeset
207 +++ libmpeg2/mpeg2.h 2004-08-02 13:27:37.000000000 +0200
henry
parents: 13020
diff changeset
208 @@ -82,6 +82,7 @@
henry
parents: 13020
diff changeset
209 #define PIC_FLAG_COMPOSITE_DISPLAY 32
henry
parents: 13020
diff changeset
210 #define PIC_FLAG_SKIP 64
henry
parents: 13020
diff changeset
211 #define PIC_FLAG_TAGS 128
henry
parents: 13020
diff changeset
212 +#define PIC_FLAG_REPEAT_FIRST_FIELD 256
henry
parents: 13020
diff changeset
213 #define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000
henry
parents: 13020
diff changeset
214
henry
parents: 13020
diff changeset
215 typedef struct mpeg2_picture_s {
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
216 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
217 --- libmpeg2/mpeg2_internal.h 2003-12-22 12:24:02.000000000 +0100
13147
henry
parents: 13020
diff changeset
218 +++ libmpeg2/mpeg2_internal.h 2004-08-24 22:25:07.000000000 +0200
henry
parents: 13020
diff changeset
219 @@ -144,6 +144,12 @@
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
220 int second_field;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
221
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
222 int mpeg1;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
223 +
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
224 + /* for MPlayer: */
13147
henry
parents: 13020
diff changeset
225 + int quantizer_scales[32];
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
226 + int quantizer_scale;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
227 + char* quant_store;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
228 + int quant_stride;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
229 };
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
230
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
231 typedef struct {
13147
henry
parents: 13020
diff changeset
232 @@ -214,6 +220,10 @@
henry
parents: 13020
diff changeset
233 int8_t q_scale_type, scaled[4];
henry
parents: 13020
diff changeset
234 uint8_t quantizer_matrix[4][64];
henry
parents: 13020
diff changeset
235 uint8_t new_quantizer_matrix[4][64];
henry
parents: 13020
diff changeset
236 +
henry
parents: 13020
diff changeset
237 + /* for MPlayer: */
henry
parents: 13020
diff changeset
238 + unsigned char *pending_buffer;
henry
parents: 13020
diff changeset
239 + int pending_length;
henry
parents: 13020
diff changeset
240 };
henry
parents: 13020
diff changeset
241
henry
parents: 13020
diff changeset
242 typedef struct {
13019
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
243 diff -ur libmpeg2/slice.c libmpeg2/slice.c
69a86525f49e Change patch structure so it applies cleanly to libmpeg2 sources.
diego
parents: 12937
diff changeset
244 --- libmpeg2/slice.c 2003-12-22 12:24:02.000000000 +0100
13147
henry
parents: 13020
diff changeset
245 +++ libmpeg2/slice.c 2004-08-24 22:25:07.000000000 +0200
henry
parents: 13020
diff changeset
246 @@ -142,6 +142,7 @@
henry
parents: 13020
diff changeset
247
henry
parents: 13020
diff changeset
248 quantizer_scale_code = UBITS (bit_buf, 5);
henry
parents: 13020
diff changeset
249 DUMPBITS (bit_buf, bits, 5);
henry
parents: 13020
diff changeset
250 + decoder->quantizer_scale = decoder->quantizer_scales[quantizer_scale_code];
henry
parents: 13020
diff changeset
251
henry
parents: 13020
diff changeset
252 decoder->quantizer_matrix[0] =
henry
parents: 13020
diff changeset
253 decoder->quantizer_prescale[0][quantizer_scale_code];
henry
parents: 13020
diff changeset
254 @@ -1564,6 +1565,9 @@
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
255
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
256 #define NEXT_MACROBLOCK \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
257 do { \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
258 + if(decoder->quant_store) \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
259 + decoder->quant_store[decoder->quant_stride*(decoder->v_offset>>4) \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
260 + +(decoder->offset>>4)] = decoder->quantizer_scale; \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
261 decoder->offset += 16; \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
262 if (decoder->offset == decoder->width) { \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
263 do { /* just so we can use the break statement */ \