59 sizeof(*
s->windowed_samples), alloc_fail);
62 for (ch = 0; ch <
s->channels; ch++) {
83 for (ch = 0; ch < s->
channels; ch++) {
105 for (ch = 0; ch < s->
channels; ch++) {
110 #if CONFIG_AC3ENC_FLOAT
134 #if CONFIG_AC3ENC_FLOAT
141 int cpl_start, num_cpl_coefs;
144 #if CONFIG_AC3ENC_FLOAT
145 memset(fixed_cpl_coords, 0,
AC3_MAX_BLOCKS *
sizeof(*cpl_coords));
152 cpl_start =
FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs;
160 memset(cpl_coef, 0, num_cpl_coefs *
sizeof(*cpl_coef));
165 for (i = 0; i < num_cpl_coefs; i++)
166 cpl_coef[i] += ch_coef[i];
184 for (j = 0; j < band_size; j++) {
234 coord_diff +=
FFABS(cpl_coords[
blk-1][ch][bnd] -
235 cpl_coords[
blk ][ch][bnd]);
264 energy_ch = energy[
blk][ch][bnd];
268 energy_cpl += energy[blk1][
CPL_CH][bnd];
269 energy_ch += energy[blk1][ch][bnd];
285 #if CONFIG_AC3ENC_FLOAT
291 fixed_cpl_coords[blk][1],
295 int bnd, min_exp, max_exp, master_exp;
304 min_exp =
FFMIN(exp, min_exp);
305 max_exp =
FFMAX(exp, max_exp);
307 master_exp = ((max_exp - 15) + 2) / 3;
308 master_exp =
FFMAX(master_exp, 0);
309 while (min_exp < master_exp * 3)
313 master_exp * 3, 0, 15);
320 int cpl_mant = (fixed_cpl_coords[
blk][ch][bnd] << (5 + cpl_exp + master_exp * 3)) >> 24;
331 if (CONFIG_EAC3_ENCODER && s->
eac3)
372 block->
mdct_coef[2] + start, end - start);
375 if (
FFMIN(sum[2], sum[3]) <
FFMIN(sum[0], sum[1]))