static void decode_vectors(COOKContext* q, int* category, float* quant_value_table, float* mlt_buffer){ /* A zero in this table means that the subband coefficient is random noise coded. */ int subband_coef_noise[SUBBAND_SIZE]; /* A zero in this table means that the subband coefficient is a positive multiplicator. */ int subband_coef_index[SUBBAND_SIZE]; int band, j; int index=0; for(band=0 ; band<q->total_subbands ; band++){ index = category[band]; if(category[band] < 7){ if(unpack_SQVH(q, category[band], subband_coef_index, subband_coef_noise)){ index=7; for(j=0 ; j<q->total_subbands ; j++) category[band+j]=7; } } if(index==7) { memset(subband_coef_index, 0, sizeof(subband_coef_index)); memset(subband_coef_noise, 0, sizeof(subband_coef_noise)); } scalar_dequant(q, index, band, quant_value_table, subband_coef_index, subband_coef_noise, mlt_buffer); } if(q->total_subbands*SUBBAND_SIZE >= q->samples_per_channel){ return; } }
static void decode_vectors(COOKContext* q, int* category, int *quant_index_table, float* mlt_buffer){ /* A zero in this table means that the subband coefficient is random noise coded. */ int subband_coef_index[SUBBAND_SIZE]; /* A zero in this table means that the subband coefficient is a positive multiplicator. */ int subband_coef_sign[SUBBAND_SIZE]; int band, j; int index=0; for(band=0 ; band<q->total_subbands ; band++){ index = category[band]; if(category[band] < 7){ if(unpack_SQVH(q, category[band], subband_coef_index, subband_coef_sign)){ index=7; for(j=0 ; j<q->total_subbands ; j++) category[band+j]=7; } } if(index==7) { memset(subband_coef_index, 0, sizeof(subband_coef_index)); memset(subband_coef_sign, 0, sizeof(subband_coef_sign)); } scalar_dequant(q, index, quant_index_table[band], subband_coef_index, subband_coef_sign, &mlt_buffer[band * 20]); } if(q->total_subbands*SUBBAND_SIZE >= q->samples_per_channel){ return; } /* FIXME: should this be removed, or moved into loop above? */ }