Logo Search packages:      
Sourcecode: blender version File versions

static void interpolate ( COOKContext *  q,
float *  buffer,
int  gain_index,
int  gain_index_next 
) [static]

the actual requantization of the timedomain samples

Parameters:
q pointer to the COOKContext
buffer pointer to the timedomain buffer
gain_index index for the block multiplier
gain_index_next index for the next block multiplier

Definition at line 767 of file cook.c.

Referenced by gain_window().

                                                            {
    int i;
    float fc1, fc2;
    fc1 = q->pow2tab[gain_index+63];

    if(gain_index == gain_index_next){              //static gain
        for(i=0 ; i<q->gain_size_factor ; i++){
            buffer[i]*=fc1;
        }
        return;
    } else {                                        //smooth gain
        fc2 = q->gain_table[11 + (gain_index_next-gain_index)];
        for(i=0 ; i<q->gain_size_factor ; i++){
            buffer[i]*=fc1;
            fc1*=fc2;
        }
        return;
    }
}


Generated by  Doxygen 1.6.0   Back to index