annotate libfaad2/local_changes.diff @ 23924:18b221617eca

h/w -> hardware
author ben
date Mon, 30 Jul 2007 17:19:16 +0000
parents 0783dd397f74
children bc29871be2fd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
1 --- libfaad2.orig/bits.h 2006-03-16 20:15:04.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
2 +++ libfaad2/bits.h 2006-03-16 20:37:21.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
3 @@ -22,7 +22,10 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
4 ** Commercial non-GPL licensing of this software is possible.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
5 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
6 **
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
7 +** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
8 ** $Id: bits.h,v 1.40 2004/09/04 14:56:27 menno Exp $
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18141
diff changeset
9 +** detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
10 +** local_changes.diff contains the exact changes to this file.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
11 **/
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
12
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
13 #ifndef __BITS_H__
14858
cc0c5443548d cosmetics: Make diff -R apply without offsets.
diego
parents: 14712
diff changeset
14 @@ -58,7 +61,7 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
15
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
16 #if defined (_WIN32) && !defined(_WIN32_WCE) && !defined(__MINGW32__)
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
17 #define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
18 -#elif defined(LINUX) || defined(DJGPP) || defined(__MINGW32__)
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
19 +#elif defined(LINUX) || defined(DJGPP)
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
20 #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
21 #else
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
22 #define BSWAP(a) \
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
23 --- libfaad2.orig/common.h 2006-03-16 20:15:04.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
24 +++ libfaad2/common.h 2006-03-16 20:56:56.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
25 @@ -22,7 +22,10 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
26 ** Commercial non-GPL licensing of this software is possible.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
27 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
28 **
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
29 +** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
30 ** $Id: common.h,v 1.65 2004/09/08 09:43:11 gcp Exp $
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18141
diff changeset
31 +** detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
32 +** local_changes.diff contains the exact changes to this file.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
33 **/
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
34
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
35 #ifndef __COMMON_H__
14858
cc0c5443548d cosmetics: Make diff -R apply without offsets.
diego
parents: 14712
diff changeset
36 @@ -32,10 +35,13 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
37 extern "C" {
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
38 #endif
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
39
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
40 -#ifdef HAVE_CONFIG_H
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
41 -# include "../config.h"
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
42 +/* Allow build on Cygwin*/
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
43 +#if defined(__CYGWIN__)
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
44 +#define __STRICT_ANSI__
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
45 #endif
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
46
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
47 +#include "../config.h"
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
48 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
49 #define INLINE __inline
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
50 #if 0 //defined(_WIN32) && !defined(_WIN32_WCE)
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
51 #define ALIGN __declspec(align(16))
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
52 @@ -61,7 +67,7 @@
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
53 /* Use if target platform has address generators with autoincrement */
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
54 //#define PREFER_POINTERS
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
55
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
56 -#ifdef _WIN32_WCE
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
57 +#if defined(_WIN32_WCE) || defined(__arm__)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
58 #define FIXED_POINT
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
59 #endif
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
60
14858
cc0c5443548d cosmetics: Make diff -R apply without offsets.
diego
parents: 14712
diff changeset
61 @@ -117,6 +123,9 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
62 # ifdef MAIN_DEC
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
63 # undef MAIN_DEC
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
64 # endif
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
65 +# ifdef SBR_DEC
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
66 +# undef SBR_DEC
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
67 +# endif
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
68 #endif // FIXED_POINT
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
69
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
70 #ifdef DRM
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
71 @@ -151,6 +160,7 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
72
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
73 #include <stdlib.h>
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
74
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
75 +#if 0
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
76 typedef unsigned __int64 uint64_t;
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
77 typedef unsigned __int32 uint32_t;
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
78 typedef unsigned __int16 uint16_t;
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
79 @@ -159,11 +169,31 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
80 typedef __int32 int32_t;
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
81 typedef __int16 int16_t;
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
82 typedef __int8 int8_t;
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
83 +#else
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
84 +#include <inttypes.h>
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
85 +#endif
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
86 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
87 typedef float float32_t;
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
88
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
89
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
90 #else
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
91
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
92 +/* #undef HAVE_FLOAT32_T */
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
93 +/* Define if you have the <inttypes.h> header file. */
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
94 +#define HAVE_INTTYPES_H 1
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
95 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
96 +/* Define if you have the `memcpy' function. */
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
97 +#define HAVE_MEMCPY 1
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
98 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
99 +/* Define if you have the <stdint.h> header file. */
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
100 +#define HAVE_STDINT_H 1
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
101 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
102 +/* Define if you have the `strchr' function. */
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
103 +#define HAVE_STRCHR 1
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
104 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
105 +/* Define if you have the ANSI C header files. */
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
106 +#define STDC_HEADERS 1
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
107 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
108 #include <stdio.h>
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
109 #if HAVE_SYS_TYPES_H
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
110 # include <sys/types.h>
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
111 @@ -289,7 +319,7 @@
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
112 }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
113
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
114
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
115 - #if defined(_WIN32) && !defined(__MINGW32__)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
116 + #if defined(_WIN32) && !defined(__MINGW32__) && !defined(HAVE_LRINTF)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
117 #define HAS_LRINTF
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
118 static INLINE int lrintf(float f)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
119 {
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
120 @@ -301,7 +331,7 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
121 }
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
122 return i;
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
123 }
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
124 - #elif (defined(__i386__) && defined(__GNUC__))
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
125 + #elif (defined(__i386__) && defined(__GNUC__)) && !defined(HAVE_LRINTF)
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
126 #define HAS_LRINTF
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
127 // from http://www.stereopsis.com/FPU.html
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
128 static INLINE int lrintf(float f)
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
129 @@ -330,6 +360,8 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
130
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
131 #else
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
132
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
133 +#include <math.h>
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
134 +
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
135 #ifdef HAVE_LRINTF
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
136 # define HAS_LRINTF
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
137 # define _ISOC9X_SOURCE 1
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
138 @@ -338,8 +370,6 @@
14712
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
139 # define __USE_ISOC99 1
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
140 #endif
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
141
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
142 - #include <math.h>
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
143 -
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
144 #ifdef HAVE_SINF
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
145 # define sin sinf
ca694d6b5375 MPlayer-specific changes to libfaad
diego
parents:
diff changeset
146 #error
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
147 --- libfaad2.orig/output.c 2006-03-16 20:15:04.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
148 +++ libfaad2/output.c 2006-04-18 19:50:26.000000000 +0200
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
149 @@ -19,10 +19,9 @@
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
150 ** Any non-GPL usage of this software or parts of this software is strictly
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
151 ** forbidden.
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
152 **
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
153 -** Commercial non-GPL licensing of this software is possible.
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
154 -** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
155 -**
17181
53c3eaaf8b49 Unify paths in patch and fix recent breakage, no -ko keyword expansion
diego
parents: 17137
diff changeset
156 -** $Id: output.c,v 1.42 2004/09/04 14:56:28 menno Exp $
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
157 +** Initially modified for use with MPlayer by Rich Felker on 2005/03/29
17181
53c3eaaf8b49 Unify paths in patch and fix recent breakage, no -ko keyword expansion
diego
parents: 17137
diff changeset
158 +** $Id: output.c,v 1.11 2005/04/05 05:43:41 rfelker Exp $
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18141
diff changeset
159 +** detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
160 **/
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
161
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
162 #include "common.h"
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
163 @@ -463,7 +462,7 @@
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
164 }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
165 }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
166
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
167 -void* output_to_PCM(NeAACDecHandle hDecoder,
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
168 +void* output_to_PCM_sux(NeAACDecHandle hDecoder,
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
169 real_t **input, void *sample_buffer, uint8_t channels,
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
170 uint16_t frame_len, uint8_t format)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
171 {
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
172 @@ -554,4 +553,51 @@
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
173 return sample_buffer;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
174 }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
175
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
176 +void* output_to_PCM(NeAACDecHandle hDecoder,
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
177 + real_t **input, void *sample_buffer, uint8_t channels,
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
178 + uint16_t frame_len, uint8_t format)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
179 +{
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
180 + int ch;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
181 + int i;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
182 + int16_t *short_sample_buffer = (int16_t*)sample_buffer;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
183 + real_t *ch0 = input[hDecoder->internal_channel[0]];
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
184 + real_t *ch1 = input[hDecoder->internal_channel[1]];
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
185 + real_t *ch2 = input[hDecoder->internal_channel[2]];
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
186 + real_t *ch3 = input[hDecoder->internal_channel[3]];
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
187 + real_t *ch4 = input[hDecoder->internal_channel[4]];
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
188 +
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
189 + if (format != FAAD_FMT_16BIT)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
190 + return output_to_PCM_sux(hDecoder, input, sample_buffer, channels, frame_len, format);
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
191 +
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
192 + if (hDecoder->downMatrix) {
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
193 + for(i = 0; i < frame_len; i++)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
194 + {
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
195 + int32_t tmp;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
196 + tmp = (ch1[i] + ((ch0[i]+ch3[i])>>1) + ((ch0[i]+ch3[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1);
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
197 + if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
198 + short_sample_buffer[0] = tmp;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
199 + tmp = (ch2[i] + ((ch0[i]+ch4[i])>>1) + ((ch0[i]+ch4[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1);
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
200 + if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
201 + short_sample_buffer[1] = tmp;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
202 + short_sample_buffer += channels;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
203 + }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
204 + return sample_buffer;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
205 + }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
206 +
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
207 + /* Copy output to a standard PCM buffer */
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
208 + for(i = 0; i < frame_len; i++)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
209 + {
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
210 + for (ch = 0; ch < channels; ch++)
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
211 + {
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
212 + int32_t tmp = input[hDecoder->internal_channel[ch]][i];
16249
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
213 + tmp += (1 << (REAL_BITS-1));
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
214 + tmp >>= REAL_BITS;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
215 + if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
216 + *(short_sample_buffer++) = tmp;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
217 + }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
218 + }
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
219 +
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
220 + return sample_buffer;
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
221 +}
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
222 +
d47cd711f617 Update for latest changes.
diego
parents: 14858
diff changeset
223 #endif
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
224 --- libfaad2.orig/ps_dec.c 2006-03-16 20:15:04.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
225 +++ libfaad2/ps_dec.c 2006-04-18 20:29:38.000000000 +0200
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
226 @@ -22,7 +22,10 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
227 ** Commercial non-GPL licensing of this software is possible.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
228 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
229 **
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
230 +** Initially modified for use with MPlayer on 2005/12/05
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
231 ** $Id: ps_dec.c,v 1.10 2004/09/04 14:56:28 menno Exp $
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18141
diff changeset
232 +** detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
233 +** local_changes.diff contains the exact changes to this file.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
234 **/
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
235
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
236 #include "common.h"
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
237 @@ -159,7 +162,7 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
238
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
239 /* static function declarations */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
240 static void ps_data_decode(ps_info *ps);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
241 -static hyb_info *hybrid_init();
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
242 +static hyb_info *hybrid_init(void);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
243 static void channel_filter2(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
244 qmf_t *buffer, qmf_t **X_hybrid);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
245 static void INLINE DCT3_4_unscaled(real_t *y, real_t *x);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
246 @@ -189,7 +192,7 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
247 /* */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
248
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
249
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
250 -static hyb_info *hybrid_init()
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
251 +static hyb_info *hybrid_init(void)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
252 {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
253 uint8_t i;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
254
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
255 @@ -1935,8 +1938,8 @@
17136
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
256 /* main Parametric Stereo decoding function */
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
257 uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64])
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
258 {
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
259 - qmf_t X_hybrid_left[32][32] = {{0}};
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
260 - qmf_t X_hybrid_right[32][32] = {{0}};
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
261 + qmf_t X_hybrid_left[32][32] = {{{0}}};
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
262 + qmf_t X_hybrid_right[32][32] = {{{0}}};
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
263
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
264 /* delta decoding of the bitstream data */
d89bfef62e03 add my fix to ps_dec.c to our diff
rathann
parents: 16249
diff changeset
265 ps_data_decode(ps);
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
266 --- libfaad2.orig/sbr_dec.c 2006-03-16 20:15:04.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
267 +++ libfaad2/sbr_dec.c 2006-04-18 20:33:57.000000000 +0200
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
268 @@ -22,7 +22,10 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
269 ** Commercial non-GPL licensing of this software is possible.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
270 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
271 **
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
272 +** Initially modified for use with MPlayer on 2005/12/05
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
273 ** $Id: sbr_dec.c,v 1.39 2004/09/04 14:56:28 menno Exp $
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18141
diff changeset
274 +** detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
275 +** local_changes.diff contains the exact changes to this file.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
276 **/
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
277
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
278
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
279 @@ -526,8 +529,8 @@
17137
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
280 uint8_t l, k;
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
281 uint8_t dont_process = 0;
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
282 uint8_t ret = 0;
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
283 - ALIGN qmf_t X_left[38][64] = {{0}};
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
284 - ALIGN qmf_t X_right[38][64] = {{0}}; /* must set this to 0 */
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
285 + ALIGN qmf_t X_left[38][64] = {{{0}}};
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
286 + ALIGN qmf_t X_right[38][64] = {{{0}}}; /* must set this to 0 */
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
287
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
288 if (sbr == NULL)
5234ca38792e add fix for sbr_dec.c to local diff, too
rathann
parents: 17136
diff changeset
289 return 20;
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
290 --- libfaad2.orig/specrec.c 2006-03-16 20:15:04.000000000 +0100
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
291 +++ libfaad2/specrec.c 2006-04-18 20:38:09.000000000 +0200
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
292 @@ -19,10 +19,10 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
293 ** Any non-GPL usage of this software or parts of this software is strictly
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
294 ** forbidden.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
295 **
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
296 -** Commercial non-GPL licensing of this software is possible.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
297 -** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
298 -**
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
299 +** Initially modified for use with MPlayer on 2006/04/18
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
300 ** $Id: specrec.c,v 1.56 2004/09/08 09:43:11 gcp Exp $
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18141
diff changeset
301 +** detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
18141
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
302 +** local_changes.diff contains the exact changes to this file.
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
303 **/
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
304
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
305 /*
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
306 @@ -673,29 +673,19 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
307 /* MAIN object type prediction */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
308 if (hDecoder->object_type == MAIN)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
309 {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
310 - /* allocate the state only when needed */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
311 - if (hDecoder->pred_stat[channel] == NULL)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
312 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
313 - hDecoder->pred_stat[channel] = (pred_state*)faad_malloc(hDecoder->frameLength * sizeof(pred_state));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
314 + hDecoder->pred_stat[channel] = (pred_state*)realloc(hDecoder->pred_stat[channel], hDecoder->frameLength * sizeof(pred_state));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
315 reset_all_predictors(hDecoder->pred_stat[channel], hDecoder->frameLength);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
316 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
317 }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
318 #endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
319
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
320 #ifdef LTP_DEC
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
321 if (is_ltp_ot(hDecoder->object_type))
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
322 {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
323 - /* allocate the state only when needed */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
324 - if (hDecoder->lt_pred_stat[channel] == NULL)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
325 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
326 - hDecoder->lt_pred_stat[channel] = (int16_t*)faad_malloc(hDecoder->frameLength*4 * sizeof(int16_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
327 + hDecoder->lt_pred_stat[channel] = (int16_t*)realloc(hDecoder->lt_pred_stat[channel], hDecoder->frameLength*4 * sizeof(int16_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
328 memset(hDecoder->lt_pred_stat[channel], 0, hDecoder->frameLength*4 * sizeof(int16_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
329 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
330 }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
331 #endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
332
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
333 - if (hDecoder->time_out[channel] == NULL)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
334 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
335 mul = 1;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
336 #ifdef SBR_DEC
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
337 hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 0;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
338 @@ -706,41 +696,28 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
339 hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 1;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
340 }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
341 #endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
342 - hDecoder->time_out[channel] = (real_t*)faad_malloc(mul*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
343 + hDecoder->time_out[channel] = (real_t*)realloc(hDecoder->time_out[channel], mul*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
344 memset(hDecoder->time_out[channel], 0, mul*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
345 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
346 #if (defined(PS_DEC) || defined(DRM_PS))
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
347 if (output_channels == 2)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
348 {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
349 - if (hDecoder->time_out[channel+1] == NULL)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
350 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
351 - hDecoder->time_out[channel+1] = (real_t*)faad_malloc(mul*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
352 + hDecoder->time_out[channel+1] = (real_t*)realloc(hDecoder->time_out[channel+1], mul*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
353 memset(hDecoder->time_out[channel+1], 0, mul*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
354 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
355 }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
356 #endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
357
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
358 - if (hDecoder->fb_intermed[channel] == NULL)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
359 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
360 - hDecoder->fb_intermed[channel] = (real_t*)faad_malloc(hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
361 + hDecoder->fb_intermed[channel] = (real_t*)realloc(hDecoder->fb_intermed[channel], hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
362 memset(hDecoder->fb_intermed[channel], 0, hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
363 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
364
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
365 #ifdef SSR_DEC
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
366 if (hDecoder->object_type == SSR)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
367 {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
368 - if (hDecoder->ssr_overlap[channel] == NULL)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
369 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
370 - hDecoder->ssr_overlap[channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
371 - memset(hDecoder->ssr_overlap[channel], 0, 2*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
372 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
373 - if (hDecoder->prev_fmd[channel] == NULL)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
374 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
375 uint16_t k;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
376 - hDecoder->prev_fmd[channel] = (real_t*)faad_malloc(2*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
377 + hDecoder->ssr_overlap[channel] = (real_t*)realloc(hDecoder->ssr_overlap[channel], 2*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
378 + memset(hDecoder->ssr_overlap[channel], 0, 2*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
379 + hDecoder->prev_fmd[channel] = (real_t*)realloc(hDecoder->prev_fmd[channel], 2*hDecoder->frameLength*sizeof(real_t));
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
380 for (k = 0; k < 2*hDecoder->frameLength; k++)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
381 hDecoder->prev_fmd[channel][k] = REAL_CONST(-1);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
382 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
383 }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
384 #endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
385
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
386 @@ -865,22 +842,13 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
387
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
388 /* always allocate 2 channels, PS can always "suddenly" turn up */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
389 #if (defined(PS_DEC) || defined(DRM_PS))
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
390 - output_channels = 2;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
391 + output_channels = hDecoder->ps_used[hDecoder->fr_ch_ele] ? 2 : 1;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
392 #else
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
393 output_channels = 1;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
394 #endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
395
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
396 - if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 0)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
397 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
398 - /* element_output_channels not set yet */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
399 + if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] < output_channels) {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
400 hDecoder->element_output_channels[hDecoder->fr_ch_ele] = output_channels;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
401 - } else if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] != output_channels) {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
402 - /* element inconsistency */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
403 - return 21;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
404 - }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
405 -
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
406 - if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
407 - {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
408 retval = allocate_single_channel(hDecoder, sce->channel, output_channels);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
409 if (retval > 0)
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
410 return retval;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
411 @@ -1026,11 +994,10 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
412 {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
413 return 23;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
414 }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
415 -#endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
416
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
417 /* copy L to R when no PS is used */
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
418 #if (defined(PS_DEC) || defined(DRM_PS))
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
419 - if ((hDecoder->ps_used[hDecoder->fr_ch_ele] == 0))
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
420 + if ((hDecoder->ps_used[hDecoder->fr_ch_ele] == 0) && (output_channels == 2))
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
421 {
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
422 uint8_t ele = hDecoder->fr_ch_ele;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
423 uint8_t ch = sce->channel;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
424 @@ -1040,6 +1007,7 @@
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
425 memcpy(hDecoder->time_out[ch+1], hDecoder->time_out[ch], frame_size);
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
426 }
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
427 #endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
428 +#endif
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
429
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
430 return 0;
59b6fa5b4201 Update to faad2 cvs 20040915+MPlayer fixes
rtognimp
parents: 17181
diff changeset
431 }