# HG changeset patch # User Andrew O. Shadoura # Date 1218101654 -10800 # Node ID 8de129d0823898ed1adb69e1c226278c087a1798 # Parent bb0638143fc8a9eae0a61f54f14fdaa4b955db90# Parent f084f639e9626de9579999714c2b301372d8d9a7 merge diff -r f084f639e962 -r 8de129d08238 src/libSAD/Makefile --- a/src/libSAD/Makefile Thu Aug 07 12:17:14 2008 +0300 +++ b/src/libSAD/Makefile Thu Aug 07 12:34:14 2008 +0300 @@ -8,7 +8,8 @@ INCLUDES = libSAD.h \ common.h \ - dither.h + dither.h \ + debug.h include ../../buildsys.mk include ../../extra.mk diff -r f084f639e962 -r 8de129d08238 src/libSAD/common.h --- a/src/libSAD/common.h Thu Aug 07 12:17:14 2008 +0300 +++ b/src/libSAD/common.h Thu Aug 07 12:34:14 2008 +0300 @@ -130,12 +130,6 @@ #define SAD_ERROR_OK 0 #define SAD_ERROR_FAIL -1 -#ifdef DEBUG -#define DEBUG_MSG(f,x) {printf("debug: "f, x);} -#else -#define DEBUG_MSG(f,x) {} -#endif - typedef struct { int present; float track_gain; /* in dB !!! */ diff -r f084f639e962 -r 8de129d08238 src/libSAD/dither.c --- a/src/libSAD/dither.c Thu Aug 07 12:17:14 2008 +0300 +++ b/src/libSAD/dither.c Thu Aug 07 12:34:14 2008 +0300 @@ -25,6 +25,8 @@ #include "dither_ops.h" #include "noicegen.h" +#include "debug.h" + #include #include diff -r f084f639e962 -r 8de129d08238 src/libSAD/dither_ops.c --- a/src/libSAD/dither_ops.c Thu Aug 07 12:17:14 2008 +0300 +++ b/src/libSAD/dither_ops.c Thu Aug 07 12:34:14 2008 +0300 @@ -23,6 +23,8 @@ #include "dither_ops.h" #include "dither.h" +#include "debug.h" + #define SAD_GET_LE16(a) ( (uint16_t)(((uint8_t*)(a))[0]) | (uint16_t)(((uint8_t*)(a))[1]) << 8 ) #define SAD_GET_BE16(a) ( (uint16_t)(((uint8_t*)(a))[0]) << 8 | (uint16_t)(((uint8_t*)(a))[1]) ) diff -r f084f639e962 -r 8de129d08238 src/libSAD/noicegen.c --- a/src/libSAD/noicegen.c Thu Aug 07 12:17:14 2008 +0300 +++ b/src/libSAD/noicegen.c Thu Aug 07 12:34:14 2008 +0300 @@ -17,6 +17,8 @@ #include "noicegen.h" +#include "debug.h" + int triangular_dither_noise(int nbits) { // parameter nbits : the peak-to-peak amplitude desired (in bits)