/external/libopus/celt/ |
D | modes.c | 90 static opus_int16 *compute_ebands(opus_int32 Fs, int frame_size, int res, int *nbEBands) in compute_ebands() argument 98 *nbEBands = sizeof(eband5ms)/sizeof(eband5ms[0])-1; in compute_ebands() 99 eBands = opus_alloc(sizeof(opus_int16)*(*nbEBands+1)); in compute_ebands() 100 for (i=0;i<*nbEBands+1;i++) in compute_ebands() 116 *nbEBands = low+high; in compute_ebands() 117 eBands = opus_alloc(sizeof(opus_int16)*(*nbEBands+2)); in compute_ebands() 136 for (i=0;i<*nbEBands;i++) in compute_ebands() 140 eBands[*nbEBands] = (bark_freq[nBark]+res)/(2*res)*2; in compute_ebands() 141 if (eBands[*nbEBands] > frame_size) in compute_ebands() 142 eBands[*nbEBands] = frame_size; in compute_ebands() [all …]
|
D | quant_bands.c | 191 x = eBands[i+c*m->nbEBands]; in quant_coarse_energy_impl() 192 oldE = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); in quant_coarse_energy_impl() 198 SUB32((opus_val32)oldEBands[i+c*m->nbEBands],max_decay))); in quant_coarse_energy_impl() 203 decay_bound = MAX16(-QCONST16(28.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]) - max_decay; in quant_coarse_energy_impl() 246 error[i+c*m->nbEBands] = PSHR32(f,7) - SHL16(qi,DB_SHIFT); in quant_coarse_energy_impl() 254 oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); in quant_coarse_energy_impl() 279 new_distortion = loss_distortion(eBands, oldEBands, start, effEnd, m->nbEBands, C); in quant_coarse_energy() 298 ALLOC(oldEBands_intra, C*m->nbEBands, opus_val16); in quant_coarse_energy() 299 ALLOC(error_intra, C*m->nbEBands, opus_val16); in quant_coarse_energy() 300 OPUS_COPY(oldEBands_intra, oldEBands, C*m->nbEBands); in quant_coarse_energy() [all …]
|
D | celt_decoder.c | 114 + 4*2*mode->nbEBands*sizeof(opus_val16); in opus_custom_decoder_get_size() 290 int nbEBands; in celt_synthesis() local 296 nbEBands = mode->nbEBands; in celt_synthesis() 333 denormalise_bands(mode, X+N, freq2, oldBandE+nbEBands, start, effEnd, M, in celt_synthesis() 342 denormalise_bands(mode, X+c*N, freq, oldBandE+c*nbEBands, start, effEnd, M, in celt_synthesis() 424 int nbEBands; in celt_decode_lost() local 433 nbEBands = mode->nbEBands; in celt_decode_lost() 443 oldLogE = oldBandE + 2*nbEBands; in celt_decode_lost() 444 oldLogE2 = oldLogE + 2*nbEBands; in celt_decode_lost() 445 backgroundLogE = oldLogE2 + 2*nbEBands; in celt_decode_lost() [all …]
|
D | celt_encoder.c | 139 …+ 3*channels*mode->nbEBands*sizeof(opus_val16); /* opus_val16 oldBandE[channels*mode->nbEBands]; … in opus_custom_encoder_get_size() 378 static int patch_transient_decision(opus_val16 *newE, opus_val16 *oldE, int nbEBands, in patch_transient_decision() argument 392 spread_old[start] = MAX16(oldE[start],oldE[start+nbEBands]); in patch_transient_decision() 395 MAX16(oldE[i],oldE[i+nbEBands])); in patch_transient_decision() 404 x1 = MAX16(0, newE[i + c*nbEBands]); in patch_transient_decision() 807 diff += bandLogE[i+c*m->nbEBands]*(opus_int32)(2+2*i-end); in alloc_trim_analysis() 931 int nbEBands, int start, int end, int C, int *offsets, int lsb_depth, const opus_int16 *logN, in dynalloc_analysis() argument 941 ALLOC(follower, C*nbEBands, opus_val16); in dynalloc_analysis() 942 ALLOC(noise_floor, C*nbEBands, opus_val16); in dynalloc_analysis() 943 OPUS_CLEAR(offsets, nbEBands); in dynalloc_analysis() [all …]
|
D | rate.c | 87 cindex = (opus_int16 *)opus_alloc(sizeof(cache->index[0])*m->nbEBands*(LM+2)); in compute_pulse_cache() 93 for (j=0;j<m->nbEBands;j++) in compute_pulse_cache() 97 cindex[i*m->nbEBands+j] = -1; in compute_pulse_cache() 102 for (n=0;n<m->nbEBands && (k!=i || n<j);n++) in compute_pulse_cache() 106 cindex[i*m->nbEBands+j] = cindex[k*m->nbEBands+n]; in compute_pulse_cache() 111 if (cache->index[i*m->nbEBands+j] == -1 && N!=0) in compute_pulse_cache() 119 cindex[i*m->nbEBands+j] = curr; in compute_pulse_cache() 143 cache->caps = cap = (unsigned char *)opus_alloc(sizeof(cache->caps[0])*(LM+1)*2*m->nbEBands); in compute_pulse_cache() 148 for (j=0;j<m->nbEBands;j++) in compute_pulse_cache() 183 pcache = bits + cindex[(LM0+1)*m->nbEBands+j]; in compute_pulse_cache() [all …]
|
D | bands.c | 125 bandE[i+c*m->nbEBands] = EPSILON+VSHR32(EXTEND32(celt_sqrt(sum)),-shift); in compute_band_energies() 127 bandE[i+c*m->nbEBands] = EPSILON; in compute_band_energies() 146 shift = celt_zlog2(bandE[i+c*m->nbEBands])-13; in normalise_bands() 147 E = VSHR32(bandE[i+c*m->nbEBands], shift); in normalise_bands() 168 bandE[i+c*m->nbEBands] = celt_sqrt(sum); in compute_band_energies() 185 opus_val16 g = 1.f/(1e-27f+bandE[i+c*m->nbEBands]); in normalise_bands() 310 prev1 = prev1logE[c*m->nbEBands+i]; in anti_collapse() 311 prev2 = prev2logE[c*m->nbEBands+i]; in anti_collapse() 314 prev1 = MAX16(prev1,prev1logE[m->nbEBands+i]); in anti_collapse() 315 prev2 = MAX16(prev2,prev2logE[m->nbEBands+i]); in anti_collapse() [all …]
|
D | rate.h | 60 cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band]; in bits2pulses() 85 cache = m->cache.bits + m->cache.index[LM*m->nbEBands+band]; in pulses2bits()
|
D | modes.h | 56 int nbEBands; member
|
D | celt.c | 258 for (i=0;i<m->nbEBands;i++) in init_caps() 262 cap[i] = (m->cache.caps[m->nbEBands*(2*LM+C-1)+i]+64)*C*N>>2; in init_caps()
|
/external/libopus/celt/dump_modes/ |
D | dump_modes.c | 87 …intf (file, "static const opus_int16 eBands%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->nbEBands+2); in dump_modes() 88 for (j=0;j<mode->nbEBands+2;j++) in dump_modes() 108 …t unsigned char allocVectors%d_%d[%d] = {\n", mode->Fs, mdctSize, mode->nbEBands*mode->nbAllocVect… in dump_modes() 111 for (k=0;k<mode->nbEBands;k++) in dump_modes() 112 fprintf (file, "%2d, ", mode->allocVectors[j*mode->nbEBands+k]); in dump_modes() 122 fprintf (file, "static const opus_int16 logN%d[%d] = {\n", framerate, mode->nbEBands); in dump_modes() 123 for (j=0;j<mode->nbEBands;j++) in dump_modes() 132 …atic const opus_int16 cache_index%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxLM+2)*mode->nbEBands); in dump_modes() 133 for (j=0;j<mode->nbEBands*(mode->maxLM+2);j++) in dump_modes() 140 … const unsigned char cache_caps%d[%d] = {\n", mode->Fs/mdctSize, (mode->maxLM+1)*2*mode->nbEBands); in dump_modes() [all …]
|