diff --git a/libcelt/bands.c b/libcelt/bands.c index 9c7142dd..0f6bcaee 100644 --- a/libcelt/bands.c +++ b/libcelt/bands.c @@ -248,14 +248,7 @@ int compute_pitch_gain(const CELTMode *m, const celt_norm_t *X, const celt_norm_ gains[i] = EXTRACT16(celt_div(Sxy,ADD32(SHR32(Sxx, PGAIN_SHIFT),EPSILON))); if (gains[i]>QCONST16(.5,15)) gain_sum++; - /*printf ("%f ", 1-sqrt(1-gain*gain));*/ } - /*if(rand()%10==0) - { - for (i=0;inbPBands;i++) - printf ("%f ", 1-sqrt(1-gains[i]*gains[i])); - printf ("\n"); - }*/ return gain_sum > 5; } @@ -411,11 +404,6 @@ void quant_bands(const CELTMode *m, celt_norm_t * restrict X, celt_norm_t *P, ce norm = _norm; balance = 0; - /*printf("bits left: %d\n", bits); - for (i=0;inbEBands;i++) - printf ("(%d %d) ", pulses[i], ebits[i]); - printf ("\n");*/ - /*printf ("%d %d\n", ec_enc_tell(enc, 0), compute_allocation(m, m->nbPulses));*/ for (i=0;inbEBands;i++) { int tell; @@ -512,11 +500,6 @@ void quant_bands_stereo(const CELTMode *m, celt_norm_t * restrict X, celt_norm_t norm = _norm; balance = 0; - /*printf("bits left: %d\n", bits); - for (i=0;inbEBands;i++) - printf ("(%d %d) ", pulses[i], ebits[i]); - printf ("\n");*/ - /*printf ("%d %d\n", ec_enc_tell(enc, 0), compute_allocation(m, m->nbPulses));*/ for (i=0;inbEBands;i++) { int tell; @@ -863,11 +846,6 @@ void unquant_bands_stereo(const CELTMode *m, celt_norm_t * restrict X, celt_norm norm = _norm; balance = 0; - /*printf("bits left: %d\n", bits); - for (i=0;inbEBands;i++) - printf ("(%d %d) ", pulses[i], ebits[i]); - printf ("\n");*/ - /*printf ("%d %d\n", ec_enc_tell(enc, 0), compute_allocation(m, m->nbPulses));*/ for (i=0;inbEBands;i++) { int tell; diff --git a/libcelt/celt.c b/libcelt/celt.c index 0d07c6a0..fdad55a2 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -240,7 +240,6 @@ static int transient_analysis(celt_word32_t *in, int len, int C, int *transient_ { int c, i, n; celt_word32_t ratio; - /* FIXME: Remove the floats here */ VARDECL(celt_word32_t, begin); SAVE_STACK; ALLOC(begin, len, celt_word32_t); @@ -266,7 +265,6 @@ static int transient_analysis(celt_word32_t *in, int len, int C, int *transient_ } else { ratio = DIV32(begin[len-1],1+begin[n-16]); } - /*printf ("%d %f\n", n, ratio*ratio);*/ if (ratio < 0) ratio = 0; if (ratio > 1000) @@ -1424,7 +1422,6 @@ int celt_decode_float(CELTDecoder * restrict st, const unsigned char *data, int RESTORE_STACK; return 0; - /*printf ("\n");*/ } #ifdef FIXED_POINT diff --git a/libcelt/laplace.c b/libcelt/laplace.c index 52fb7024..5a09fece 100644 --- a/libcelt/laplace.c +++ b/libcelt/laplace.c @@ -84,8 +84,6 @@ void ec_laplace_encode_start(ec_enc *enc, int *value, int decay, int fs) fl = 0; if (s) fl += fs; - /*DEBUG*/ - /*printf ("enc: %d %d %d\n", fl, fs, ft);*/ ec_encode(enc, fl, fl+fs, ft); } @@ -105,8 +103,6 @@ int ec_laplace_decode_start(ec_dec *dec, int decay, int fs) ft = 32768; fh = fs; fm = ec_decode(dec, ft); - /*DEBUG*/ - /*printf ("fm: %d/%d\n", fm, ft);*/ while (fm >= fh && fs != 0) { fl = fh; @@ -131,8 +127,6 @@ int ec_laplace_decode_start(ec_dec *dec, int decay, int fs) /* Preventing an infinite loop in case something screws up in the decoding */ if (fl==fh) fl--; - /*DEBUG*/ - /*printf ("update: %d %d %d\n", fl, fh, ft);*/ ec_dec_update(dec, fl, fh, ft); return val; } diff --git a/libcelt/mathops.h b/libcelt/mathops.h index 72a4fbf4..8096b42d 100644 --- a/libcelt/mathops.h +++ b/libcelt/mathops.h @@ -130,7 +130,6 @@ static inline float celt_log2(float x) frac = in.f - 1.5; /* -0.41446 0.96093 -0.33981 0.15600 */ frac = -0.41446 + frac*(0.96093 + frac*(-0.33981 + frac*0.15600)); - /*printf ("%f %d %f %f %f %f\n", x, integer, in.f, frac, log2(x), 1+integer+frac);*/ return 1+integer+frac; } @@ -150,7 +149,6 @@ static inline float celt_exp2(float x) /* K0 = 1, K1 = log(2), K2 = 3-4*log(2), K3 = 3*log(2) - 2 */ res.f = 1.f + frac * (0.696147f + frac * (0.224411f + 0.079442f*frac)); res.i = (res.i + (integer<<23)) & 0x7fffffff; - /*printf ("%f %f %f %f\n", x, frac, exp2(x), res.f);*/ return res.f; } @@ -289,7 +287,6 @@ static inline celt_word16_t celt_log2(celt_word32_t x) i = celt_ilog2(x); n = VSHR32(x,i-15)-32768-16384; frac = ADD16(C[0], MULT16_16_Q14(n, ADD16(C[1], MULT16_16_Q14(n, ADD16(C[2], MULT16_16_Q14(n, (C[3]))))))); - /*printf ("%d %d %d %d\n", x, n, ret, SHL16(i-13,8)+SHR16(ret,14-8));*/ return SHL16(i-13,8)+SHR16(frac,14-8); } diff --git a/libcelt/modes.c b/libcelt/modes.c index 299ee18b..5da5faff 100644 --- a/libcelt/modes.c +++ b/libcelt/modes.c @@ -134,7 +134,6 @@ static celt_int16_t *compute_ebands(celt_int32_t Fs, int frame_size, int *nbEBan int i, res, min_width, lin, low, high, nBark; res = (Fs+frame_size)/(2*frame_size); min_width = MIN_BINS*res; - /*printf ("min_width = %d\n", min_width);*/ /* Find the number of critical bands supported by our sampling rate */ for (nBark=1;nBark= min_width) break; - /*printf ("lin = %d (%d Hz)\n", lin, bark_freq[lin]);*/ low = ((bark_freq[lin]/res)+(MIN_BINS-1))/MIN_BINS; high = nBark-lin; *nbEBands = low+high; @@ -171,10 +169,6 @@ static celt_int16_t *compute_ebands(celt_int32_t Fs, int frame_size, int *nbEBan eBands[*nbEBands] = eBands[*nbEBands+1]; /* FIXME: Remove last band if too small */ - /*for (i=0;i<*nbEBands+2;i++) - printf("%d ", eBands[i]); - printf ("\n"); - exit(1);*/ return eBands; } @@ -200,7 +194,6 @@ static void compute_pbands(CELTMode *mode, int res) for (j=0;jnbEBands;j++) if (mode->eBands[j] <= pBands[i] && mode->eBands[j+1] > pBands[i]) break; - /*printf ("%d %d\n", i, j);*/ if (mode->eBands[j] != pBands[i]) { if (pBands[i]-mode->eBands[j] < mode->eBands[j+1]-pBands[i] && @@ -210,9 +203,6 @@ static void compute_pbands(CELTMode *mode, int res) pBands[i] = mode->eBands[j+1]; } } - /*for (i=0;inbPBands+2;i++) - printf("%d ", pBands[i]); - printf ("\n");*/ mode->pitchEnd = pBands[PBANDS]; } @@ -394,7 +384,6 @@ CELTMode *celt_mode_create(celt_int32_t Fs, int channels, int frame_size, int *e compute_allocation_table(mode, res); if (mode->allocVectors==NULL) goto failure; - /*printf ("%d bands\n", mode->nbEBands);*/ window = (celt_word16_t*)celt_alloc(mode->overlap*sizeof(celt_word16_t)); if (window==NULL) diff --git a/libcelt/psy.c b/libcelt/psy.c index 7661e0e8..65e4a2c4 100644 --- a/libcelt/psy.c +++ b/libcelt/psy.c @@ -85,7 +85,6 @@ static void spreading_func(const struct PsyDecay *d, celt_word32_t * restrict ps { int i; celt_word32_t mem; - /*for (i=0;i N+2) - printf ("%d / %d (%d)\n", pulsesLeft, K, N);*/ celt_assert2(pulsesLeft>=1, "Allocated too many pulses in the quick pass"); while (pulsesLeft > 1) @@ -335,8 +329,6 @@ celt_word16_t renormalise_vector(celt_norm_t *X, celt_word16_t value, int N, int } rE = celt_sqrt(E); - /*if (celt_rcp(SHL32(rE,9))>32767) - fprintf (stderr, "celt_rcp: %d %d\n",rE, E); */ #ifdef FIXED_POINT if (rE <= 128) g = Q15ONE;