Logo Search packages:      
Sourcecode: blender version File versions

static void decode_envelope ( COOKContext *  q,
int *  quant_index_table 
) [static]

Create the quant index table needed for the envelope.

Parameters:
q pointer to the COOKContext
quant_index_table pointer to the array

Definition at line 375 of file cook.c.

Referenced by mono_decode().

                                                                    {
    int i,j, vlc_index;
    int bitbias;

    bitbias = get_bits_count(&q->gb);
    quant_index_table[0]= get_bits(&q->gb,6) - 6;       //This is used later in categorize

    for (i=1 ; i < q->total_subbands ; i++){
        vlc_index=i;
        if (i >= q->js_subband_start * 2) {
            vlc_index-=q->js_subband_start;
        } else {
            vlc_index/=2;
            if(vlc_index < 1) vlc_index = 1;
        }
        if (vlc_index>13) vlc_index = 13;           //the VLC tables >13 are identical to No. 13

        j = get_vlc2(&q->gb, q->envelope_quant_index[vlc_index-1].table,
                     q->envelope_quant_index[vlc_index-1].bits,2);
        quant_index_table[i] = quant_index_table[i-1] + j - 12;    //differential encoding
    }
}


Generated by  Doxygen 1.6.0   Back to index