#include <Eina.h>
#include "rg_etc1.h"
-// FIXME: Remove DEBUG
-#define DEBUG
+// Enable this flag when working on (quality) optimizations
+//#define DEBUG
// Weights for the distance (perceptual mode) - sum is ~1024
static const int R_WEIGHT = 299 * 1024 / 1000;
#endif
#ifndef DBG
-# define DBG(fmt, ...) fprintf(stderr, "%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## __VA_ARGS__)
+# ifdef DEBUG
+# define DBG(fmt, ...) fprintf(stderr, "%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## __VA_ARGS__)
+# else
+# define DBG(...)
+# endif
#endif
/** Pack alpha block given a modifier table and a multiplier
return err;
}
+#ifdef DEBUG
static unsigned int
_block_error_calc(const uint32_t *enc, const uint32_t *orig, Eina_Bool perceptual)
{
return errAcc;
}
+#endif
unsigned int
etc2_rgba8_block_pack(unsigned char *etc2, const unsigned int *bgra,
#ifdef DEBUG
cnt[bestSolution]++;
- DBG("Block count by mode: ETC1: %d T/H: %d Planar: %d. Err %d", cnt[0], cnt[1], cnt[2], minErr);
+ DBG("Block count by mode: ETC1: %d T/H: %d Planar: %d. Err %d",
+ cnt[0], cnt[1], cnt[2], minErr);
#endif
return minErr;