49 sizeof(*s->windowed_samples), alloc_fail);
50 FF_ALLOC_OR_GOTO(s->avctx, s->planar_samples, s->channels *
sizeof(*s->planar_samples),
52 for (ch = 0; ch < s->channels; ch++) {
73 for (ch = 0; ch < s->
channels; ch++) {
95 for (ch = 0; ch < s->
channels; ch++) {
100 #if CONFIG_AC3ENC_FLOAT
124 #if CONFIG_AC3ENC_FLOAT
129 int blk, ch, bnd, i, j;
131 int cpl_start, num_cpl_coefs;
134 #if CONFIG_AC3ENC_FLOAT
135 memset(fixed_cpl_coords, 0,
AC3_MAX_BLOCKS *
sizeof(*cpl_coords));
142 cpl_start =
FFMIN(256, cpl_start + num_cpl_coefs) - num_cpl_coefs;
150 memset(cpl_coef, 0, num_cpl_coefs *
sizeof(*cpl_coef));
155 for (i = 0; i < num_cpl_coefs; i++)
156 cpl_coef[i] += ch_coef[i];
174 for (j = 0; j < band_size; j++) {
176 MAC_COEF(energy[blk][ch][bnd], v, v);
194 energy[blk][
CPL_CH][bnd]);
224 coord_diff +=
FFABS(cpl_coords[blk-1][ch][bnd] -
225 cpl_coords[blk ][ch][bnd]);
254 energy_ch = energy[
blk][ch][bnd];
258 energy_cpl += energy[blk1][
CPL_CH][bnd];
259 energy_ch += energy[blk1][ch][bnd];
275 #if CONFIG_AC3ENC_FLOAT
281 fixed_cpl_coords[blk][1],
285 int bnd, min_exp, max_exp, master_exp;
294 min_exp =
FFMIN(exp, min_exp);
295 max_exp =
FFMAX(exp, max_exp);
297 master_exp = ((max_exp - 15) + 2) / 3;
298 master_exp =
FFMAX(master_exp, 0);
299 while (min_exp < master_exp * 3)
303 master_exp * 3, 0, 15);
310 int cpl_mant = (fixed_cpl_coords[
blk][ch][bnd] << (5 + cpl_exp + master_exp * 3)) >> 24;
361 for (i = start; i < end; i++) {
373 if (
FFMIN(sum[2], sum[3]) <
FFMIN(sum[0], sum[1]))
390 const AVFrame *frame,
int *got_packet_ptr)