[Speex-dev] Exc CB Search very little Question

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Mon Sep 18 07:40:21 PDT 2006


Well, you could change the order in the encoder as long as you reverse
it in the decoder as well.

	Jean-Marc

Björn Thalheim a écrit :
> Hi,
> 
> Jean-Marc Valin wrote:
>> Not sure I understand your question. Change the order of what within what?
> 
> In cb_search, we iterate nb_subvect times over a codebook, finding
> nb_subvect codebook entries to quantize the excitation signal. After
> finding these nb_subvect codebook entries, they're written into the stream:
> 
>    /*save indices*/
>    for (i=0;i<nb_subvect;i++)
>    {
>       ind[i]=nind[0][i];
>       speex_bits_pack(bits,ind[i],params->shape_bits+have_sign);
>    }
> 
> I want to know if I'm correct in that I can just do sth like this
> without any effect on the encoded signal:
> 
>    /*put optimal values into array*/
>    for (i=0;i<nb_subvect;i++)
>    {
>       ind[i]=nind[0][i];
>    }
>    /*Change the order of the values in the array*/
>    // this is what I mean by "changing the order"
>    int tmp=ind[0]; ind[0]=ind[nb_subvect]; ind[nb_subvect]=tmp;
>    /*save indices*/
>    for (i=0;i<nb_subvect;i++)
>    {
>       speex_bits_pack(bits,ind[i],params->shape_bits+have_sign);
>    }
> 
> Regards,
> 
> Björn
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev


More information about the Speex-dev mailing list