search for: best_index

Displaying 1 result from an estimated 1 matches for "best_index".

Did you mean: test_index
2009 Jan 14
0
[PATCH] Pitch now quantised at the band level, got rid of all the VQ code.
...5ONE MULT16_16(Q15ONE,Q15ONE) - -/** Taken from Speex.Finds the index of the entry in a codebook that best matches the input*/ -int vq_index(const celt_pgain_t *in, const celt_uint16_t *codebook, int len, int entries) -{ - int i,j; - int ind = 0; - celt_word32_t min_dist=VERY_LARGE32; - int best_index=0; - for (i=0;i<entries;i++) - { - celt_word32_t dist=0; - const celt_pgain_t *inp = in; - j=0; do { - celt_pgain_t tmp1 = SUB16(*inp++,PGAIN_EVEN14(codebook, ind)); - celt_pgain_t tmp2 = SUB16(*inp++,PGAIN_ODD14(codebook, ind)); - ind++; - dist...