NDEBUG has also the interesting side effect to disable the code that's in the assert() macros.
[uqbar@Feynman ~/Files/000_Software/pngquant-2.1.0/lib] grep assert *.[hc] blur.c: assert(size > 0); libimagequant.c: assert(0 == (((uintptr_t)ptr) & 15)); libimagequant.c: assert(offset > 0 && offset <= 16); libimagequant.c: assert(callback); libimagequant.c: assert(temp_row); libimagequant.c: assert(img->temp_row); libimagequant.c: assert(row_f_pixels); libimagequant.c: assert(!USE_SSE || 0 == ((uintptr_t)row_f_pixels & 15)); libimagequant.c: assert(omp_get_thread_num() == 0); mediancut.c: assert(!isnan(r) && !isnan(g) && !isnan(b) && !isnan(a)); mempool.c:#include <assert.h> mempool.c: assert(!(((uintptr_t)(*mptr) + (*mptr)->used) & ALIGN_MASK)); nearest.c: assert(colorsused < 2 || colors[0].radius <= colors[1].radius); // closest first nearest.c: assert(map->colors > 0); nearest.c: assert(likely_colormap_index < centroids->map->colors); nearest.c: assert(heads[i].num_candidates); pam.h:#include <assert.h> pam.h: assert(fabs(res - colordifference_stdc(px,py)) < 0.001);
All that code get disabled by defining NDEBUG. I suspect the impact can be relevant, especially from mr. Kornel Lesiński feedbacks...
NDEBUG has also the interesting side effect to disable the code that's in the assert() macros.
[uqbar@Feynman ~/Files/ 000_Software/ pngquant- 2.1.0/lib] grep assert *.[hc] img->temp_ row); row_f_pixels) ; t)row_f_ pixels & 15)); omp_get_ thread_ num() == 0); !(((uintptr_ t)(*mptr) + (*mptr)->used) & ALIGN_MASK)); likely_ colormap_ index < centroids- >map->colors) ; heads[i] .num_candidates ); _stdc(px, py)) < 0.001);
blur.c: assert(size > 0);
libimagequant.c: assert(0 == (((uintptr_t)ptr) & 15));
libimagequant.c: assert(offset > 0 && offset <= 16);
libimagequant.c: assert(callback);
libimagequant.c: assert(temp_row);
libimagequant.c: assert(
libimagequant.c: assert(
libimagequant.c: assert(!USE_SSE || 0 == ((uintptr_
libimagequant.c: assert(
mediancut.c: assert(!isnan(r) && !isnan(g) && !isnan(b) && !isnan(a));
mempool.c:#include <assert.h>
mempool.c: assert(
nearest.c: assert(colorsused < 2 || colors[0].radius <= colors[1].radius); // closest first
nearest.c: assert(map->colors > 0);
nearest.c: assert(
nearest.c: assert(
pam.h:#include <assert.h>
pam.h: assert(fabs(res - colordifference
All that code get disabled by defining NDEBUG.
I suspect the impact can be relevant, especially from mr. Kornel Lesiński feedbacks...