diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-09-24 17:31:36 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-09-24 17:31:36 +0000 |
commit | e1ece5e2eb68c81b1645c9ff989c833c4d67dfd8 (patch) | |
tree | 8553b3a4ef8164d14ff1b4a3f67e57cfa1d8908a /libfaad2/common.h | |
parent | 2887bacbdb6bd320e4840fd230e92a59cc74b9ae (diff) | |
download | mpv-e1ece5e2eb68c81b1645c9ff989c833c4d67dfd8.tar.bz2 mpv-e1ece5e2eb68c81b1645c9ff989c833c4d67dfd8.tar.xz |
Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12.
patch by adland <adland123 at yahoo dot com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13454 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libfaad2/common.h')
-rw-r--r-- | libfaad2/common.h | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/libfaad2/common.h b/libfaad2/common.h index 0d56a411b0..dd515bf2c8 100644 --- a/libfaad2/common.h +++ b/libfaad2/common.h @@ -39,8 +39,12 @@ extern "C" { #define __STRICT_ANSI__ #endif +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + #define INLINE __inline -#if defined(_WIN32) && !defined(_WIN32_WCE) +#if 0 //defined(_WIN32) && !defined(_WIN32_WCE) #define ALIGN __declspec(align(16)) #else #define ALIGN @@ -59,6 +63,10 @@ extern "C" { /* #define USE_DOUBLE_PRECISION */ /* use fixed point reals */ //#define FIXED_POINT +//#define BIG_IQ_TABLE + +/* Use if target platform has address generators with autoincrement */ +//#define PREFER_POINTERS #ifdef _WIN32_WCE #define FIXED_POINT @@ -95,9 +103,10 @@ extern "C" { #define ALLOW_SMALL_FRAMELENGTH -// Define LC_ONLY_DECODER if you want a pure AAC LC decoder (independant of SBR_DEC) +// Define LC_ONLY_DECODER if you want a pure AAC LC decoder (independant of SBR_DEC and PS_DEC) //#define LC_ONLY_DECODER #ifdef LC_ONLY_DECODER + #undef LD_DEC #undef LTP_DEC #undef MAIN_DEC #undef SSR_DEC @@ -108,19 +117,13 @@ extern "C" { #define SBR_DEC //#define SBR_LOW_POWER -//#define PS_DEC +#define PS_DEC -/* FIXED POINT: No MAIN decoding, no SBR decoding */ +/* FIXED POINT: No MAIN decoding */ #ifdef FIXED_POINT # ifdef MAIN_DEC # undef MAIN_DEC # endif -//# ifndef SBR_LOW_POWER -//# define SBR_LOW_POWER -//# endif -# ifdef SBR_DEC -# undef SBR_DEC -# endif #endif // FIXED_POINT #ifdef DRM @@ -137,9 +140,11 @@ extern "C" { #endif #ifdef FIXED_POINT -#define SBR_DIV(A, B) (((int64_t)A << REAL_BITS)/B) +#define DIV_R(A, B) (((int64_t)A << REAL_BITS)/B) +#define DIV_C(A, B) (((int64_t)A << COEF_BITS)/B) #else -#define SBR_DIV(A, B) ((A)/(B)) +#define DIV_R(A, B) ((A)/(B)) +#define DIV_C(A, B) ((A)/(B)) #endif #ifndef SBR_LOW_POWER @@ -155,7 +160,9 @@ extern "C" { /* END COMPILE TIME DEFINITIONS */ -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__MINGW32__) + +#include <stdlib.h> #if 0 typedef unsigned __int64 uint64_t; @@ -169,11 +176,11 @@ typedef __int8 int8_t; #else #include <inttypes.h> #endif + typedef float float32_t; #else -/* Define if needed */ /* #undef HAVE_FLOAT32_T */ /* Define if you have the <inttypes.h> header file. */ @@ -295,6 +302,7 @@ char *strchr(), *strrchr(); #define REAL_CONST(A) ((real_t)(A)) #define COEF_CONST(A) ((real_t)(A)) + #define Q2_CONST(A) ((real_t)(A)) #define FRAC_CONST(A) ((real_t)(A)) /* pure fractional part */ #else /* Normal floating point operation */ @@ -311,6 +319,7 @@ char *strchr(), *strrchr(); #define REAL_CONST(A) ((real_t)(A)) #define COEF_CONST(A) ((real_t)(A)) + #define Q2_CONST(A) ((real_t)(A)) #define FRAC_CONST(A) ((real_t)(A)) /* pure fractional part */ /* Complex multiplication */ @@ -413,6 +422,15 @@ typedef real_t complex_t[2]; /* common functions */ uint8_t cpu_has_sse(void); uint32_t random_int(void); +uint32_t ones32(uint32_t x); +uint32_t floor_log2(uint32_t x); +uint32_t wl_min_lzc(uint32_t x); +#ifdef FIXED_POINT +#define LOG2_MIN_INF REAL_CONST(-10000) +int32_t log2_int(uint32_t val); +int32_t pow2_int(real_t val); +real_t pow2_fix(real_t val); +#endif uint8_t get_sr_index(const uint32_t samplerate); uint8_t max_pred_sfb(const uint8_t sr_index); uint8_t max_tns_sfb(const uint8_t sr_index, const uint8_t object_type, @@ -420,7 +438,7 @@ uint8_t max_tns_sfb(const uint8_t sr_index, const uint8_t object_type, uint32_t get_sample_rate(const uint8_t sr_index); int8_t can_decode_ot(const uint8_t object_type); -void *faad_malloc(int32_t size); +void *faad_malloc(size_t size); void faad_free(void *b); //#define PROFILE |