annotate libmpeg2/libmpeg-0.4.0.diff @ 16965:d8755974657a

attempt to fix missing and/or broken boundary checks
author reimar
date Thu, 10 Nov 2005 20:41:11 +0000
parents 4d64117768b1
children 93241711b635
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
1 diff -Naur libmpeg2.orig/attributes.h libmpeg2/attributes.h
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
2 --- libmpeg2.orig/attributes.h 2004-11-03 17:24:16.587788552 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
3 +++ libmpeg2/attributes.h 2004-11-03 17:24:03.014851952 +0100
13147
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
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
13 diff -Naur libmpeg2.orig/cpu_accel.c libmpeg2/cpu_accel.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
14 --- libmpeg2.orig/cpu_accel.c 2004-11-03 17:24:16.587788552 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
15 +++ libmpeg2/cpu_accel.c 2004-11-03 17:28:33.052799944 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
16 @@ -30,7 +30,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
17 #include "mpeg2_internal.h"
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
18
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
19 #ifdef ACCEL_DETECT
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
20 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
21 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
22 static inline uint32_t arch_accel (void)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
23 {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
24 uint32_t eax, ebx, ecx, edx;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
25 @@ -106,9 +106,9 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
26
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
27 return caps;
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
28 }
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
29 -#endif /* ARCH_X86 */
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
30 +#endif /* ARCH_X86 || ARCH_X86_64 */
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
31
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
32 -#if defined(ARCH_PPC) || defined(ARCH_SPARC)
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
33 +#if defined(ARCH_PPC) || (defined(ARCH_SPARC) && defined(HAVE_VIS))
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
34 #include <signal.h>
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
35 #include <setjmp.h>
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
36
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
37 @@ -195,6 +195,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
38 #ifdef ARCH_ALPHA
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
39 static inline uint32_t arch_accel (void)
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 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
42 uint64_t no_mvi;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
43
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
44 asm volatile ("amask %1, %0"
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
45 @@ -202,6 +203,9 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
46 : "rI" (256)); /* AMASK_MVI */
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
47 return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA |
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
48 MPEG2_ACCEL_ALPHA_MVI);
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
49 +#else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
50 + return MPEG2_ACCEL_ALPHA;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
51 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
52 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
53 #endif /* ARCH_ALPHA */
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
54 #endif /* ACCEL_DETECT */
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
55 @@ -212,7 +216,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
56
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
57 accel = 0;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
58 #ifdef ACCEL_DETECT
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
59 -#if defined (ARCH_X86) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
60 +#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
61 accel = arch_accel ();
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
62 #endif
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
63 #endif
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
64 diff -Naur libmpeg2.orig/cpu_state.c libmpeg2/cpu_state.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
65 --- libmpeg2.orig/cpu_state.c 2004-11-03 17:24:16.587788552 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
66 +++ libmpeg2/cpu_state.c 2004-11-03 17:28:33.052799944 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
67 @@ -29,14 +29,14 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
68 #include "mpeg2.h"
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
69 #include "attributes.h"
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
70 #include "mpeg2_internal.h"
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
71 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
72 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
73 #include "mmx.h"
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
74 #endif
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
75
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
76 void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
77 void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
78
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
79 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
80 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
81 static void state_restore_mmx (cpu_state_t * state)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
82 {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
83 emms ();
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
84 @@ -115,12 +115,12 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
85
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
86 void mpeg2_cpu_state_init (uint32_t accel)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
87 {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
88 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
89 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
90 if (accel & MPEG2_ACCEL_X86_MMX) {
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
91 mpeg2_cpu_state_restore = state_restore_mmx;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
92 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
93 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
94 -#ifdef ARCH_PPC
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
95 +#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
96 if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
97 mpeg2_cpu_state_save = state_save_altivec;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
98 mpeg2_cpu_state_restore = state_restore_altivec;
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
99 diff -Naur libmpeg2.orig/decode.c libmpeg2/decode.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
100 --- libmpeg2.orig/decode.c 2004-11-03 17:24:16.588788400 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
101 +++ libmpeg2/decode.c 2004-11-03 17:24:03.015851800 +0100
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
102 @@ -351,6 +351,15 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
103 fbuf->buf[1] = buf[1];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
104 fbuf->buf[2] = buf[2];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
105 fbuf->id = id;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
106 + // HACK! FIXME! At first I frame, copy pointers to prediction frame too!
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
107 + if (mpeg2dec->custom_fbuf && !mpeg2dec->fbuf[1]->buf[0]){
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
108 + mpeg2dec->fbuf[1]->buf[0]=buf[0];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
109 + mpeg2dec->fbuf[1]->buf[1]=buf[1];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
110 + mpeg2dec->fbuf[1]->buf[2]=buf[2];
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
111 + mpeg2dec->fbuf[1]->id=NULL;
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 +// printf("libmpeg2: FBUF 0:%p 1:%p 2:%p\n",
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
114 +// 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
115 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
116
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
117 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf)
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
118 diff -Naur libmpeg2.orig/header.c libmpeg2/header.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
119 --- libmpeg2.orig/header.c 2004-11-03 17:24:16.588788400 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
120 +++ libmpeg2/header.c 2004-11-03 17:24:03.015851800 +0100
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
121 @@ -100,6 +100,9 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
122 mpeg2dec->decoder.convert = NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
123 mpeg2dec->decoder.convert_id = NULL;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
124 mpeg2dec->picture = mpeg2dec->pictures;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
125 + memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
126 + memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
127 + memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t));
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
128 mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
129 mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
130 mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
131 @@ -551,6 +554,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
132 if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
133 picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
134 flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
135 + flags |= (buffer[3] & 2) ? PIC_FLAG_REPEAT_FIRST_FIELD : 0;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
136 } else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
137 picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
138 break;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
139 @@ -799,6 +803,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
140 mpeg2dec->scaled[index] = mpeg2dec->q_scale_type;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
141 for (i = 0; i < 32; i++) {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
142 k = mpeg2dec->q_scale_type ? non_linear_scale[i] : (i << 1);
13147
henry
parents: 13020
diff changeset
143 + decoder->quantizer_scales[i] = k;
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
144 for (j = 0; j < 64; j++)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
145 decoder->quantizer_prescale[index][i][j] =
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
146 k * mpeg2dec->quantizer_matrix[index][j];
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
147 diff -Naur libmpeg2.orig/idct.c libmpeg2/idct.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
148 --- libmpeg2.orig/idct.c 2004-11-03 17:24:16.588788400 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
149 +++ libmpeg2/idct.c 2004-11-03 17:28:33.052799944 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
150 @@ -66,7 +66,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
151 } while (0)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
152 #endif
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
153
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
154 -static void inline idct_row (int16_t * const block)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
155 +static inline void idct_row (int16_t * const block)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
156 {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
157 int d0, d1, d2, d3;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
158 int a0, a1, a2, a3, b0, b1, b2, b3;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
159 @@ -119,7 +119,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
160 block[7] = (a0 - b0) >> 12;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
161 }
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
162
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
163 -static void inline idct_col (int16_t * const block)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
164 +static inline void idct_col (int16_t * const block)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
165 {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
166 int d0, d1, d2, d3;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
167 int a0, a1, a2, a3, b0, b1, b2, b3;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
168 @@ -235,7 +235,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
169
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
170 void mpeg2_idct_init (uint32_t accel)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
171 {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
172 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
173 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
174 if (accel & MPEG2_ACCEL_X86_MMXEXT) {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
175 mpeg2_idct_copy = mpeg2_idct_copy_mmxext;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
176 mpeg2_idct_add = mpeg2_idct_add_mmxext;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
177 @@ -254,11 +254,14 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
178 } else
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
179 #endif
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
180 #ifdef ARCH_ALPHA
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
181 +#ifdef CAN_COMPILE_ALPHA_MVI
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
182 if (accel & MPEG2_ACCEL_ALPHA_MVI) {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
183 mpeg2_idct_copy = mpeg2_idct_copy_mvi;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
184 mpeg2_idct_add = mpeg2_idct_add_mvi;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
185 mpeg2_idct_alpha_init ();
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
186 - } else if (accel & MPEG2_ACCEL_ALPHA) {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
187 + } else
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
188 +#endif
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
189 + if (accel & MPEG2_ACCEL_ALPHA) {
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
190 int i;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
191
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
192 mpeg2_idct_copy = mpeg2_idct_copy_alpha;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
193 diff -Naur libmpeg2.orig/idct_alpha.c libmpeg2/idct_alpha.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
194 --- libmpeg2.orig/idct_alpha.c 2004-11-03 17:24:16.588788400 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
195 +++ libmpeg2/idct_alpha.c 2004-11-03 17:24:03.015851800 +0100
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
196 @@ -59,7 +59,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
197 } while (0)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
198 #endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
199
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
200 -static void inline idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
201 +static inline void idct_row (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
202 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
203 uint64_t l, r;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
204 int_fast32_t d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
205 @@ -116,7 +116,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
206 block[7] = (a0 - b0) >> 12;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
207 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
208
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
209 -static void inline idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
210 +static inline void idct_col (int16_t * const block)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
211 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
212 int_fast32_t d0, d1, d2, d3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
213 int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
214 @@ -157,6 +157,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
215 block[8*7] = (a0 - b0) >> 17;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
216 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
217
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
218 +#ifdef CAN_COMPILE_ALPHA_MVI
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
219 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
220 {
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
221 uint64_t clampmask;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
222 @@ -289,6 +290,7 @@
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
223 stq (p7, dest + 7 * stride);
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
224 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
225 }
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
226 +#endif
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
227
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
228 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
229 {
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
230 diff -Naur libmpeg2.orig/idct_mmx.c libmpeg2/idct_mmx.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
231 --- libmpeg2.orig/idct_mmx.c 2004-11-03 17:23:30.029866432 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
232 +++ libmpeg2/idct_mmx.c 2004-11-03 17:28:33.052799944 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
233 @@ -23,7 +23,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
234
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
235 #include "config.h"
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
236
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
237 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
238 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
239
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
240 #include <inttypes.h>
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
241
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
242 diff -Naur libmpeg2.orig/motion_comp.c libmpeg2/motion_comp.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
243 --- libmpeg2.orig/motion_comp.c 2004-11-03 17:26:19.828053184 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
244 +++ libmpeg2/motion_comp.c 2004-11-03 17:28:33.053799792 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
245 @@ -33,7 +33,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
246
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
247 void mpeg2_mc_init (uint32_t accel)
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
248 {
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
249 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
250 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
251 if (accel & MPEG2_ACCEL_X86_MMXEXT)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
252 mpeg2_mc = mpeg2_mc_mmxext;
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
253 else if (accel & MPEG2_ACCEL_X86_3DNOW)
14730
4d64117768b1 Update patch with missing changes.
diego
parents: 13864
diff changeset
254 @@ -42,7 +42,7 @@
4d64117768b1 Update patch with missing changes.
diego
parents: 13864
diff changeset
255 mpeg2_mc = mpeg2_mc_mmx;
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
256 else
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
257 #endif
14730
4d64117768b1 Update patch with missing changes.
diego
parents: 13864
diff changeset
258 -#ifdef ARCH_PPC
4d64117768b1 Update patch with missing changes.
diego
parents: 13864
diff changeset
259 +#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
260 if (accel & MPEG2_ACCEL_PPC_ALTIVEC)
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
261 mpeg2_mc = mpeg2_mc_altivec;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
262 else
14730
4d64117768b1 Update patch with missing changes.
diego
parents: 13864
diff changeset
263 @@ -52,7 +52,7 @@
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
264 mpeg2_mc = mpeg2_mc_alpha;
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
265 else
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
266 #endif
14730
4d64117768b1 Update patch with missing changes.
diego
parents: 13864
diff changeset
267 -#ifdef ARCH_SPARC
4d64117768b1 Update patch with missing changes.
diego
parents: 13864
diff changeset
268 +#if defined(ARCH_SPARC) && defined(HAVE_VIS)
13020
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
269 if (accel & MPEG2_ACCEL_SPARC_VIS)
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
270 mpeg2_mc = mpeg2_mc_vis;
3380d4a65b15 Patch updated for latest changes to libmpeg2.
diego
parents: 13019
diff changeset
271 else
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
272 diff -Naur libmpeg2.orig/motion_comp_mmx.c libmpeg2/motion_comp_mmx.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
273 --- libmpeg2.orig/motion_comp_mmx.c 2004-11-03 17:23:30.032865976 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
274 +++ libmpeg2/motion_comp_mmx.c 2004-11-03 17:28:33.053799792 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
275 @@ -23,7 +23,7 @@
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
276
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
277 #include "config.h"
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
278
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
279 -#ifdef ARCH_X86
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
280 +#if defined(ARCH_X86) || defined(ARCH_X86_64)
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
281
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
282 #include <inttypes.h>
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
283
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
284 diff -Naur libmpeg2.orig/mpeg2.h libmpeg2/mpeg2.h
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
285 --- libmpeg2.orig/mpeg2.h 2004-11-03 17:24:16.589788248 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
286 +++ libmpeg2/mpeg2.h 2004-11-03 17:24:03.016851648 +0100
13147
henry
parents: 13020
diff changeset
287 @@ -82,6 +82,7 @@
henry
parents: 13020
diff changeset
288 #define PIC_FLAG_COMPOSITE_DISPLAY 32
henry
parents: 13020
diff changeset
289 #define PIC_FLAG_SKIP 64
henry
parents: 13020
diff changeset
290 #define PIC_FLAG_TAGS 128
henry
parents: 13020
diff changeset
291 +#define PIC_FLAG_REPEAT_FIRST_FIELD 256
henry
parents: 13020
diff changeset
292 #define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000
henry
parents: 13020
diff changeset
293
henry
parents: 13020
diff changeset
294 typedef struct mpeg2_picture_s {
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
295 diff -Naur libmpeg2.orig/mpeg2_internal.h libmpeg2/mpeg2_internal.h
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
296 --- libmpeg2.orig/mpeg2_internal.h 2004-11-03 17:24:16.590788096 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
297 +++ libmpeg2/mpeg2_internal.h 2004-11-03 17:24:03.016851648 +0100
13147
henry
parents: 13020
diff changeset
298 @@ -144,6 +144,12 @@
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
299 int second_field;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
300
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
301 int mpeg1;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
302 +
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
303 + /* for MPlayer: */
13147
henry
parents: 13020
diff changeset
304 + int quantizer_scales[32];
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
305 + int quantizer_scale;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
306 + char* quant_store;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
307 + int quant_stride;
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
308 };
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
309
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
310 typedef struct {
13147
henry
parents: 13020
diff changeset
311 @@ -214,6 +220,10 @@
henry
parents: 13020
diff changeset
312 int8_t q_scale_type, scaled[4];
henry
parents: 13020
diff changeset
313 uint8_t quantizer_matrix[4][64];
henry
parents: 13020
diff changeset
314 uint8_t new_quantizer_matrix[4][64];
henry
parents: 13020
diff changeset
315 +
henry
parents: 13020
diff changeset
316 + /* for MPlayer: */
henry
parents: 13020
diff changeset
317 + unsigned char *pending_buffer;
henry
parents: 13020
diff changeset
318 + int pending_length;
henry
parents: 13020
diff changeset
319 };
henry
parents: 13020
diff changeset
320
henry
parents: 13020
diff changeset
321 typedef struct {
13864
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
322 diff -Naur libmpeg2.orig/slice.c libmpeg2/slice.c
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
323 --- libmpeg2.orig/slice.c 2004-11-03 17:24:16.591787944 +0100
96259a2f2142 enable mmx support on x86_64 in libmpeg2
aurel
parents: 13147
diff changeset
324 +++ libmpeg2/slice.c 2004-11-03 17:24:03.016851648 +0100
13147
henry
parents: 13020
diff changeset
325 @@ -142,6 +142,7 @@
henry
parents: 13020
diff changeset
326
henry
parents: 13020
diff changeset
327 quantizer_scale_code = UBITS (bit_buf, 5);
henry
parents: 13020
diff changeset
328 DUMPBITS (bit_buf, bits, 5);
henry
parents: 13020
diff changeset
329 + decoder->quantizer_scale = decoder->quantizer_scales[quantizer_scale_code];
henry
parents: 13020
diff changeset
330
henry
parents: 13020
diff changeset
331 decoder->quantizer_matrix[0] =
henry
parents: 13020
diff changeset
332 decoder->quantizer_prescale[0][quantizer_scale_code];
henry
parents: 13020
diff changeset
333 @@ -1564,6 +1565,9 @@
12937
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
334
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
335 #define NEXT_MACROBLOCK \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
336 do { \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
337 + if(decoder->quant_store) \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
338 + decoder->quant_store[decoder->quant_stride*(decoder->v_offset>>4) \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
339 + +(decoder->offset>>4)] = decoder->quantizer_scale; \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
340 decoder->offset += 16; \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
341 if (decoder->offset == decoder->width) { \
b61f21a54546 summary of the MPlayer specific libmpeg2 changes
henry
parents:
diff changeset
342 do { /* just so we can use the break statement */ \