55 sizeof(*s->windowed_samples), alloc_fail);
56 FF_ALLOC_OR_GOTO(s->avctx, s->planar_samples, s->channels *
sizeof(*s->planar_samples),
58 for (ch = 0; ch < s->channels; ch++) {
79 for (ch = 0; ch < s->
channels; ch++) {
101 for (ch = 0; ch < s->
channels; ch++) {
106 #if CONFIG_AC3ENC_FLOAT
130 #if CONFIG_AC3ENC_FLOAT
135 int blk, ch, bnd, i, j;
137 int cpl_start, num_cpl_coefs;
140 #if CONFIG_AC3ENC_FLOAT
141 memset(fixed_cpl_coords, 0,
AC3_MAX_BLOCKS *
sizeof(*cpl_coords));
148 cpl_start =
FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs;
156 memset(cpl_coef, 0, num_cpl_coefs *
sizeof(*cpl_coef));
161 for (i = 0; i < num_cpl_coefs; i++)
162 cpl_coef[i] += ch_coef[i];
180 for (j = 0; j < band_size; j++) {
182 MAC_COEF(energy[blk][ch][bnd], v, v);
200 energy[blk][
CPL_CH][bnd]);
230 coord_diff +=
FFABS(cpl_coords[blk-1][ch][bnd] -
231 cpl_coords[blk ][ch][bnd]);
260 energy_ch = energy[
blk][ch][bnd];
264 energy_cpl += energy[blk1][
CPL_CH][bnd];
265 energy_ch += energy[blk1][ch][bnd];
281 #if CONFIG_AC3ENC_FLOAT
287 fixed_cpl_coords[blk][1],
291 int bnd, min_exp, max_exp, master_exp;
300 min_exp =
FFMIN(exp, min_exp);
301 max_exp =
FFMAX(exp, max_exp);
303 master_exp = ((max_exp - 15) + 2) / 3;
304 master_exp =
FFMAX(master_exp, 0);
305 while (min_exp < master_exp * 3)
309 master_exp * 3, 0, 15);
316 int cpl_mant = (fixed_cpl_coords[
blk][ch][bnd] << (5 + cpl_exp + master_exp * 3)) >> 24;
327 if (CONFIG_EAC3_ENCODER && s->
eac3)
368 block->
mdct_coef[2] + start, end - start);
371 if (
FFMIN(sum[2], sum[3]) <
FFMIN(sum[0], sum[1]))