Lines Matching refs:scf
155 const float *eb, bool att, float *scf) in compute_scale_factors() argument
295 scf[0] = (e[0] + e[4]) * 1.f/12 + in compute_scale_factors()
298 scf_sum = scf[0]; in compute_scale_factors()
301 scf[i] = (e[4*i-1] + e[4*i+4]) * 1.f/12 + in compute_scale_factors()
304 scf_sum += scf[i]; in compute_scale_factors()
307 scf[15] = (e[59] + e[63]) * 1.f/12 + in compute_scale_factors()
310 scf_sum += scf[15]; in compute_scale_factors()
313 scf[i] = 0.85f * (scf[i] - scf_sum * 1.f/16); in compute_scale_factors()
320 float s0, s1 = scf[0], s2 = scf[1], s3 = scf[2], s4 = scf[3]; in compute_scale_factors()
323 scf[0] = (sn += s3) * 1.f/3; in compute_scale_factors()
324 scf[1] = (sn += s4) * 1.f/4; in compute_scale_factors()
325 scf_sum = scf[0] + scf[1]; in compute_scale_factors()
328 s0 = s1, s1 = s2, s2 = s3, s3 = s4, s4 = scf[i+2]; in compute_scale_factors()
329 scf[i] = (sn += s4) * 1.f/5; in compute_scale_factors()
330 scf_sum += scf[i]; in compute_scale_factors()
333 scf[14] = (sn ) * 1.f/4; in compute_scale_factors()
334 scf[15] = (sn -= s1) * 1.f/3; in compute_scale_factors()
335 scf_sum += scf[14] + scf[15]; in compute_scale_factors()
338 scf[i] = (dt == LC3_DT_7M5 ? 0.3f : 0.5f) * in compute_scale_factors()
339 (scf[i] - scf_sum * 1.f/16); in compute_scale_factors()
348 const float *scf, int *lfcb_idx, int *hfcb_idx) in resolve_codebooks() argument
359 dlfcb += (scf[ i] - lfcb[i]) * (scf[ i] - lfcb[i]); in resolve_codebooks()
360 dhfcb += (scf[8+i] - hfcb[i]) * (scf[8+i] - hfcb[i]); in resolve_codebooks()
423 LC3_HOT static void quantize(const float *scf, int lfcb_idx, int hfcb_idx, in quantize() argument
433 r[ i] = scf[ i] - lfcb[i]; in quantize()
434 r[8+i] = scf[8+i] - hfcb[i]; in quantize()
545 const float *c, int shape, int gain, float *scf) in unquantize() argument
551 dct16_inverse(c, scf); in unquantize()
554 scf[i] = lfcb[i] + g * scf[i]; in unquantize()
557 scf[i] = hfcb[i-8] + g * scf[i]; in unquantize()
683 float scf[LC3_NUM_BANDS]; in spectral_shaping() local
686 scf[0] = scf[1] = s1; in spectral_shaping()
689 scf[4*i+2] = s0 + 0.125f * (s1 - s0); in spectral_shaping()
690 scf[4*i+3] = s0 + 0.375f * (s1 - s0); in spectral_shaping()
691 scf[4*i+4] = s0 + 0.625f * (s1 - s0); in spectral_shaping()
692 scf[4*i+5] = s0 + 0.875f * (s1 - s0); in spectral_shaping()
694 scf[62] = s1 + 0.125f * (s1 - s0); in spectral_shaping()
695 scf[63] = s1 + 0.375f * (s1 - s0); in spectral_shaping()
701 scf[i2] = 0.5f * (scf[2*i2] + scf[2*i2+1]); in spectral_shaping()
704 memmove(scf + n2, scf + 2*n2, (nb - n2) * sizeof(float)); in spectral_shaping()
711 float g_sns = fast_exp2f(-scf[ib]); in spectral_shaping()
737 float scf[16], cn[4][16]; in lc3_sns_analyze() local
740 compute_scale_factors(dt, sr, eb, att, scf); in lc3_sns_analyze()
742 resolve_codebooks(scf, &data->lfcb, &data->hfcb); in lc3_sns_analyze()
744 quantize(scf, data->lfcb, data->hfcb, in lc3_sns_analyze()
748 cn[data->shape], data->shape, data->gain, scf); in lc3_sns_analyze()
753 spectral_shaping(dt, sr, scf, false, x, y); in lc3_sns_analyze()
762 float scf[16], cn[16]; in lc3_sns_synthesize() local
770 unquantize(data->lfcb, data->hfcb, cn, data->shape, data->gain, scf); in lc3_sns_synthesize()
772 spectral_shaping(dt, sr, scf, true, x, y); in lc3_sns_synthesize()