52 sizeof(*s->windowed_samples), alloc_fail);
53 FF_ALLOC_OR_GOTO(s->avctx, s->planar_samples, s->channels *
sizeof(*s->planar_samples),
55 for (ch = 0; ch < s->channels; ch++) {
77 for (ch = 0; ch < s->
channels; ch++) {
88 for (i = AC3_BLOCK_SIZE; i < AC3_BLOCK_SIZE * (s->
num_blocks + 1); i++) {
105 for (ch = 0; ch < s->
channels; ch++) {
129 #if CONFIG_AC3ENC_FLOAT
134 int blk, ch, bnd, i, j;
136 int cpl_start, num_cpl_coefs;
139 #if CONFIG_AC3ENC_FLOAT
140 memset(fixed_cpl_coords, 0,
AC3_MAX_BLOCKS *
sizeof(*cpl_coords));
147 cpl_start =
FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs;
155 memset(cpl_coef, 0, num_cpl_coefs *
sizeof(*cpl_coef));
160 for (i = 0; i < num_cpl_coefs; i++)
161 cpl_coef[i] += ch_coef[i];
179 for (j = 0; j < band_size; j++) {
181 MAC_COEF(energy[blk][ch][bnd], v, v);
199 energy[blk][
CPL_CH][bnd]);
229 coord_diff +=
FFABS(cpl_coords[blk-1][ch][bnd] -
230 cpl_coords[blk ][ch][bnd]);
259 energy_ch = energy[
blk][ch][bnd];
263 energy_cpl += energy[blk1][
CPL_CH][bnd];
264 energy_ch += energy[blk1][ch][bnd];
280 #if CONFIG_AC3ENC_FLOAT
286 fixed_cpl_coords[blk][1],
290 int bnd, min_exp, max_exp, master_exp;
299 min_exp =
FFMIN(exp, min_exp);
300 max_exp =
FFMAX(exp, max_exp);
302 master_exp = ((max_exp - 15) + 2) / 3;
303 master_exp =
FFMAX(master_exp, 0);
304 while (min_exp < master_exp * 3)
308 master_exp * 3, 0, 15);
315 int cpl_mant = (fixed_cpl_coords[
blk][ch][bnd] << (5 + cpl_exp + master_exp * 3)) >> 24;
366 for (i = start; i < end; i++) {
378 if (
FFMIN(sum[2], sum[3]) <
FFMIN(sum[0], sum[1]))
395 int buf_size,
void *
data)