--- portab.h 2002/04/07 11:57:47 1.14 +++ portab.h 2002/04/25 06:55:00 1.16 @@ -4,6 +4,21 @@ #if defined(WIN32) #include +#include + + +#define DPRINTF_BUF_SZ 1024 +static void dprintf(char *fmt, ...) +{ + va_list args; + char buf[DPRINTF_BUF_SZ]; + + va_start(args, fmt); + vsprintf(buf, fmt, args); + OutputDebugString(buf); + fprintf(stdout, "%s\n", buf); +} + #define DEBUGCBR(A,B,C) { char tmp[100]; wsprintf(tmp, "CBR: frame: %i, quant: %i, deviation: %i\n", (A), (B), (C)); OutputDebugString(tmp); } @@ -63,7 +78,7 @@ return ts; } -#elif defined(LINUX) || defined(DJGPP) +#elif defined(LINUX) || defined(DJGPP) || defined(FREEBSD) #ifdef _DEBUG @@ -96,7 +111,7 @@ #else -#define #define #define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ +#define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ __attribute__ ((__aligned__(CACHE_LINE))) type name[(sizex)*(sizey)] #define int8_t char