Displaying 2 results from an estimated 2 matches for "compute_pitch_gain".
2009 Jan 14
0
[PATCH] Pitch now quantised at the band level, got rid of all the VQ code.
...elt.c
diff --git a/libcelt/bands.c b/libcelt/bands.c
index 315cce8..49eaeda 100644
--- 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 = CHANNE...
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.
...++++++++++++++++++-------------------
 libcelt/bands.h |    6 ++----
 libcelt/celt.c  |    6 ++----
 3 files changed, 28 insertions(+), 27 deletions(-)
diff --git a/libcelt/bands.c b/libcelt/bands.c
index d0c3498..315cce8 100644
--- 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->pBand...