52 sizeof(*
s->windowed_samples), alloc_fail);
55 for (ch = 0; ch <
s->channels; ch++) {
76 for (ch = 0; ch < s->
channels; ch++) {
98 for (ch = 0; ch < s->
channels; ch++) {
103 #if CONFIG_AC3ENC_FLOAT
127 #if CONFIG_AC3ENC_FLOAT
134 int cpl_start, num_cpl_coefs;
137 #if CONFIG_AC3ENC_FLOAT
138 memset(fixed_cpl_coords, 0,
AC3_MAX_BLOCKS *
sizeof(*cpl_coords));
145 cpl_start =
FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs;
153 memset(cpl_coef, 0, num_cpl_coefs *
sizeof(*cpl_coef));
158 for (i = 0; i < num_cpl_coefs; i++)
159 cpl_coef[i] += ch_coef[i];
177 for (j = 0; j < band_size; j++) {
227 coord_diff +=
FFABS(cpl_coords[
blk-1][ch][bnd] -
228 cpl_coords[
blk ][ch][bnd]);
257 energy_ch = energy[
blk][ch][bnd];
261 energy_cpl += energy[blk1][
CPL_CH][bnd];
262 energy_ch += energy[blk1][ch][bnd];
278 #if CONFIG_AC3ENC_FLOAT
284 fixed_cpl_coords[blk][1],
288 int bnd, min_exp, max_exp, master_exp;
297 min_exp =
FFMIN(exp, min_exp);
298 max_exp =
FFMAX(exp, max_exp);
300 master_exp = ((max_exp - 15) + 2) / 3;
301 master_exp =
FFMAX(master_exp, 0);
302 while (min_exp < master_exp * 3)
306 master_exp * 3, 0, 15);
313 int cpl_mant = (fixed_cpl_coords[
blk][ch][bnd] << (5 + cpl_exp + master_exp * 3)) >> 24;
324 if (CONFIG_EAC3_ENCODER && s->
eac3)
365 block->
mdct_coef[2] + start, end - start);
368 if (
FFMIN(sum[2], sum[3]) <
FFMIN(sum[0], sum[1]))