Index: /libmpc/branches/r2d/include/common/datatypes.h
===================================================================
--- /libmpc/branches/r2d/include/common/datatypes.h	(revision 134)
+++ /libmpc/branches/r2d/include/common/datatypes.h	(revision 134)
@@ -0,0 +1,38 @@
+/*
+ * Musepack audio compression
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#pragma once
+
+// mppenc.h
+#define CENTER            448                   // offset for centering current data in Main-array
+#define BLOCK            1152                   // blocksize
+#define ANABUFFER    (BLOCK + CENTER)           // size of PCM-data array for analysis
+
+
+typedef struct {
+	float  L [36];
+	float  R [36];
+} SubbandFloatTyp;
+
+typedef struct {
+	float  L [ANABUFFER];
+	float  R [ANABUFFER];
+	float  M [ANABUFFER];
+	float  S [ANABUFFER];
+} PCMDataTyp;
+
Index: /libmpc/branches/r2d/include/common/minimax.h
===================================================================
--- /libmpc/branches/r2d/include/common/minimax.h	(revision 134)
+++ /libmpc/branches/r2d/include/common/minimax.h	(revision 134)
@@ -0,0 +1,57 @@
+/*
+ * Musepack audio compression
+ * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#pragma once
+
+# define clip(x,min,max) ( (x) < (min) ? (min) : (x) > (max) ? (max) : (x) )
+
+#ifdef __cplusplus
+
+# define maxi(A,B)  ( (A) >? (B) )
+# define mini(A,B)  ( (A) <? (B) )
+# define maxd(A,B)  ( (A) >? (B) )
+# define mind(A,B)  ( (A) <? (B) )
+# define maxf(A,B)  ( (A) >? (B) )
+# define minf(A,B)  ( (A) <? (B) )
+
+#else
+
+# define maxi(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
+# define mini(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
+# define maxd(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
+# define mind(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
+# define maxf(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
+# define minf(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
+
+#endif
+
+#ifdef __GNUC__
+
+# define absi(A)    abs   (A)
+# define absf(A)    fabsf (A)
+# define absd(A)    fabs  (A)
+
+#else
+
+# define absi(A)    ( (A) >= 0    ?  (A)  : -(A) )
+# define absf(A)    ( (A) >= 0.f  ?  (A)  : -(A) )
+# define absd(A)    ( (A) >= 0.   ?  (A)  : -(A) )
+
+#endif
+
Index: /libmpc/branches/r2d/include/common/mpc_types.h
===================================================================
--- /libmpc/branches/r2d/include/common/mpc_types.h	(revision 134)
+++ /libmpc/branches/r2d/include/common/mpc_types.h	(revision 134)
@@ -0,0 +1,98 @@
+/*
+  Copyright (c) 2005, The Musepack Development Team
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the following
+  disclaimer in the documentation and/or other materials provided
+  with the distribution.
+
+  * Neither the name of the The Musepack Development Team nor the
+  names of its contributors may be used to endorse or promote
+  products derived from this software without specific prior
+  written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+#ifndef _MPC_TYPES_H_
+#define _MPC_TYPES_H_
+#ifdef WIN32
+#pragma once
+#endif
+
+#include <stdlib.h>
+#include <memory.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+typedef __int8           mpc_int8_t;
+typedef unsigned __int8  mpc_uint8_t;
+typedef __int16          mpc_int16_t;
+typedef unsigned __int16 mpc_uint16_t;
+typedef __int32          mpc_int32_t;
+typedef unsigned __int32 mpc_uint32_t;
+typedef __int64          mpc_int64_t;
+typedef unsigned __int64 mpc_uint64_t;
+#define mpc_inline __inline
+#define MPC_LITTLE_ENDIAN
+#else
+#include <stdint.h>
+typedef int8_t   mpc_int8_t;
+typedef uint8_t  mpc_uint8_t;
+typedef int16_t  mpc_int16_t;
+typedef uint16_t mpc_uint16_t;
+typedef int32_t  mpc_int32_t;
+typedef uint32_t mpc_uint32_t;
+typedef int64_t  mpc_int64_t;
+typedef uint64_t  mpc_uint64_t;
+#define mpc_inline inline
+#endif
+
+/// Libmpcdec error codes
+typedef enum mpc_status {
+    MPC_STATUS_OK        =  0,
+    MPC_STATUS_FILE      = -1,
+    MPC_STATUS_SV7BETA   = -2,
+    MPC_STATUS_CBR       = -3,
+    MPC_STATUS_IS        = -4,
+    MPC_STATUS_BLOCKSIZE = -5,
+    MPC_STATUS_INVALIDSV = -6
+} mpc_status;
+
+#ifdef MPC_FIXED_POINT
+typedef mpc_int32_t MPC_SAMPLE_FORMAT;
+#else
+typedef float       MPC_SAMPLE_FORMAT;
+#endif
+
+typedef mpc_uint8_t mpc_bool_t;
+
+enum {
+    MPC_FALSE = 0,
+    MPC_TRUE  = !MPC_FALSE
+};
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: /libmpc/branches/r2d/include/common/mpcmath.h
===================================================================
--- /libmpc/branches/r2d/include/common/mpcmath.h	(revision 134)
+++ /libmpc/branches/r2d/include/common/mpcmath.h	(revision 134)
@@ -0,0 +1,59 @@
+/*
+ * Musepack audio compression
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+#ifndef M_PI
+# define M_PI            3.1415926535897932384626433832795029     // 4*atan(1)
+# define M_PIl           3.1415926535897932384626433832795029L
+# define M_LN2           0.6931471805599453094172321214581766     // ln(2)
+# define M_LN2l          0.6931471805599453094172321214581766L
+# define M_LN10          2.3025850929940456840179914546843642     // ln 10 */
+# define M_LN10l         2.3025850929940456840179914546843642L
+#endif
+
+// fast but maybe more inaccurate, use if you need speed
+#if defined(__GNUC__) && !defined(__APPLE__)
+#  define SIN(x)      sinf ((float)(x))
+#  define COS(x)      cosf ((float)(x))
+#  define ATAN2(x,y)  atan2f ((float)(x), (float)(y))
+#  define SQRT(x)     sqrtf ((float)(x))
+#  define LOG(x)      logf ((float)(x))
+#  define LOG10(x)    log10f ((float)(x))
+#  define POW(x,y)    expf (logf(x) * (y))
+#  define POW10(x)    expf (M_LN10 * (x))
+#  define FLOOR(x)    floorf ((float)(x))
+#  define IFLOOR(x)   (int) floorf ((float)(x))
+#  define FABS(x)     fabsf ((float)(x))
+#else
+# define SIN(x)      (float) sin (x)
+# define COS(x)      (float) cos (x)
+# define ATAN2(x,y)  (float) atan2 (x, y)
+# define SQRT(x)     (float) sqrt (x)
+# define LOG(x)      (float) log (x)
+# define LOG10(x)    (float) log10 (x)
+# define POW(x,y)    (float) pow (x,y)
+# define POW10(x)    (float) pow (10., (x))
+# define FLOOR(x)    (float) floor (x)
+# define IFLOOR(x)   (int)   floor (x)
+# define FABS(x)     (float) fabs (x)
+#endif
+
+#define SQRTF(x)     SQRT (x)
+#define COSF(x)      COS (x)
+#define ATAN2F(x,y)  ATAN2 (x,y)
+#define IFLOORF(x)   IFLOOR (x)
Index: bmpc/branches/r2d/include/mpcdec/mpc_types.h
===================================================================
--- /libmpc/branches/r2d/include/mpcdec/mpc_types.h	(revision 133)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
-  Copyright (c) 2005, The Musepack Development Team
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above
-  copyright notice, this list of conditions and the following
-  disclaimer in the documentation and/or other materials provided
-  with the distribution.
-
-  * Neither the name of the The Musepack Development Team nor the
-  names of its contributors may be used to endorse or promote
-  products derived from this software without specific prior
-  written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-#ifndef _MPC_TYPES_H_
-#define _MPC_TYPES_H_
-#ifdef WIN32
-#pragma once
-#endif
-
-#include <stdlib.h>
-#include <memory.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef WIN32
-typedef __int8           mpc_int8_t;
-typedef unsigned __int8  mpc_uint8_t;
-typedef __int16          mpc_int16_t;
-typedef unsigned __int16 mpc_uint16_t;
-typedef __int32          mpc_int32_t;
-typedef unsigned __int32 mpc_uint32_t;
-typedef __int64          mpc_int64_t;
-typedef unsigned __int64 mpc_uint64_t;
-#define mpc_inline __inline
-#define MPC_LITTLE_ENDIAN
-#else
-#include <stdint.h>
-typedef int8_t   mpc_int8_t;
-typedef uint8_t  mpc_uint8_t;
-typedef int16_t  mpc_int16_t;
-typedef uint16_t mpc_uint16_t;
-typedef int32_t  mpc_int32_t;
-typedef uint32_t mpc_uint32_t;
-typedef int64_t  mpc_int64_t;
-typedef uint64_t  mpc_uint64_t;
-#define mpc_inline inline
-#endif
-
-/// Libmpcdec error codes
-typedef enum mpc_status {
-    MPC_STATUS_OK        =  0,
-    MPC_STATUS_FILE      = -1,
-    MPC_STATUS_SV7BETA   = -2,
-    MPC_STATUS_CBR       = -3,
-    MPC_STATUS_IS        = -4,
-    MPC_STATUS_BLOCKSIZE = -5,
-    MPC_STATUS_INVALIDSV = -6
-} mpc_status;
-
-#ifdef MPC_FIXED_POINT
-typedef mpc_int32_t MPC_SAMPLE_FORMAT;
-#else
-typedef float       MPC_SAMPLE_FORMAT;
-#endif
-
-typedef mpc_uint8_t mpc_bool_t;
-
-enum {
-    MPC_FALSE = 0,
-    MPC_TRUE  = !MPC_FALSE
-};
-
-#ifdef __cplusplus
-}
-#endif
-#endif
