Lines Matching refs:sce
70 void ff_aac_encode_tns_info(AACEncContext *s, SingleChannelElement *sce) in ff_aac_encode_tns_info() argument
72 TemporalNoiseShaping *tns = &sce->tns; in ff_aac_encode_tns_info()
74 const int is8 = sce->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE; in ff_aac_encode_tns_info()
77 if (!sce->tns.present) in ff_aac_encode_tns_info()
80 for (i = 0; i < sce->ics.num_windows; i++) { in ff_aac_encode_tns_info()
81 put_bits(&s->pb, 2 - is8, sce->tns.n_filt[i]); in ff_aac_encode_tns_info()
102 void ff_aac_apply_tns(AACEncContext *s, SingleChannelElement *sce) in ff_aac_apply_tns() argument
104 TemporalNoiseShaping *tns = &sce->tns; in ff_aac_apply_tns()
105 IndividualChannelStream *ics = &sce->ics; in ff_aac_apply_tns()
137 sce->coeffs[start] += lpc[i-1]*sce->pcoeffs[start - i*inc]; in ff_aac_apply_tns()
161 void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce) in ff_aac_search_for_tns() argument
163 TemporalNoiseShaping *tns = &sce->tns; in ff_aac_search_for_tns()
166 const int mmm = FFMIN(sce->ics.tns_max_bands, sce->ics.max_sfb); in ff_aac_search_for_tns()
167 const int is8 = sce->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE; in ff_aac_search_for_tns()
170 const int sfb_end = av_clip(sce->ics.num_swb, 0, mmm); in ff_aac_search_for_tns()
172 const int slant = sce->ics.window_sequence[0] == LONG_STOP_SEQUENCE ? 1 : in ff_aac_search_for_tns()
173 sce->ics.window_sequence[0] == LONG_START_SEQUENCE ? 0 : 2; in ff_aac_search_for_tns()
175 const int coef_len = sce->ics.swb_offset[sfb_end] - sce->ics.swb_offset[sfb_start]; in ff_aac_search_for_tns()
178 sce->tns.present = 0; in ff_aac_search_for_tns()
182 for (w = 0; w < sce->ics.num_windows; w++) { in ff_aac_search_for_tns()
185 int coef_start = sce->ics.swb_offset[sfb_start]; in ff_aac_search_for_tns()
187 for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) { in ff_aac_search_for_tns()
196 gain = ff_lpc_calc_ref_coefs_f(&s->lpc, &sce->coeffs[w*128 + coef_start], in ff_aac_search_for_tns()
214 sce->tns.present = !!count; in ff_aac_search_for_tns()