search for: celt_pgain_t

Displaying 2 results from an estimated 2 matches for "celt_pgain_t".

2009 Jan 14
0
[PATCH] Pitch now quantised at the band level, got rid of all the VQ code.
...--- a/libcelt/bands.c +++ b/libcelt/bands.c @@ -210,9 +210,10 @@ void denormalise_bands(const CELTMode *m, const celt_norm_t * restrict X, celt_s /* Compute the best gain for each "pitch band" */ -void compute_pitch_gain(const CELTMode *m, const celt_norm_t *X, const celt_norm_t *P, celt_pgain_t *gains) +int compute_pitch_gain(const CELTMode *m, const celt_norm_t *X, const celt_norm_t *P, celt_pgain_t *gains) { int i; + int gain_sum = 0; const celt_int16_t *pBands = m->pBands; const int C = CHANNELS(m); @@ -234,9 +235,11 @@ void compute_pitch_gain(const CELTMode *m, con...
2009 Jan 14
0
[PATCH] Moved the application of the pitch gain to (un)quant_bands(). This doesn't change anything to the codec, but will make the next changes easier.
...--- a/libcelt/bands.c +++ b/libcelt/bands.c @@ -247,23 +247,6 @@ void compute_pitch_gain(const CELTMode *m, const celt_norm_t *X, const celt_norm }*/ } -/* Apply the (quantised) gain to each "pitch band" */ -void pitch_quant_bands(const CELTMode *m, celt_norm_t * restrict P, const celt_pgain_t * restrict gains) -{ - int i; - const celt_int16_t *pBands = m->pBands; - const int C = CHANNELS(m); - for (i=0;i<m->nbPBands;i++) - { - int j; - for (j=C*pBands[i];j<C*pBands[i+1];j++) - P[j] = MULT16_16_Q15(gains[i], P[j]); - /*printf ("%f ",...