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++) {
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
132 int blk, ch, bnd, i, j;
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++) {
179 MAC_COEF(energy[blk][ch][bnd], v, v);
197 energy[blk][
CPL_CH][bnd]);
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;
364 for (i = start; i < end; i++) {
376 if (
FFMIN(sum[2], sum[3]) <
FFMIN(sum[0], sum[1]))
393 const AVFrame *frame,
int *got_packet_ptr)