Lines Matching defs:block

92             AC3Block *block = &s->blocks[blk];
101 s->mdct.mdct_calc(&s->mdct, block->mdct_coef[ch+1],
136 AC3Block *block = &s->blocks[blk];
137 CoefType *cpl_coef = &block->mdct_coef[CPL_CH][cpl_start];
138 if (!block->cpl_in_use)
142 CoefType *ch_coef = &block->mdct_coef[ch][cpl_start];
143 if (!block->channel_in_cpl[ch])
161 AC3Block *block = &s->blocks[blk];
162 if (!block->cpl_in_use || (ch > CPL_CH && !block->channel_in_cpl[ch]))
165 CoefType v = block->mdct_coef[ch][i+j];
176 AC3Block *block = &s->blocks[blk];
177 if (!block->cpl_in_use)
180 if (!block->channel_in_cpl[ch])
191 AC3Block *block = &s->blocks[blk];
194 memset(block->new_cpl_coords, 0, sizeof(block->new_cpl_coords));
196 if (block->cpl_in_use) {
197 /* send new coordinates if this is the first block, if previous
198 * block did not use coupling but this block does, the channels
199 * using coupling has changed from the previous block, or the
200 * coordinate difference from the last block for any channel is
204 block->new_cpl_coords[ch] = 1;
207 if (!block->channel_in_cpl[ch])
210 block->new_cpl_coords[ch] = 1;
219 block->new_cpl_coords[ch] = 1;
232 AC3Block *block = &s->blocks[blk];
234 if (!block->cpl_in_use) {
241 if (!block->channel_in_cpl[ch])
261 AC3Block *block = &s->blocks[blk];
262 if (!block->cpl_in_use)
270 s->ac3dsp.extract_exponents(block->cpl_coord_exp[1],
277 if (!block->new_cpl_coords[ch])
281 min_exp = max_exp = block->cpl_coord_exp[ch][0];
283 int exp = block->cpl_coord_exp[ch][bnd];
292 block->cpl_coord_exp[ch][bnd] = av_clip(block->cpl_coord_exp[ch][bnd] -
295 block->cpl_master_exp[ch] = master_exp;
299 int cpl_exp = block->cpl_coord_exp[ch][bnd];
306 block->cpl_coord_mant[ch][bnd] = cpl_mant;
317 * Determine rematrixing flags for each block and band.
323 AC3Block *block, *block0 = NULL;
329 block = &s->blocks[blk];
330 block->new_rematrixing_strategy = !blk;
332 block->num_rematrixing_bands = 4;
333 if (block->cpl_in_use) {
334 block->num_rematrixing_bands -= (s->start_freq[CPL_CH] <= 61);
335 block->num_rematrixing_bands -= (s->start_freq[CPL_CH] == 37);
336 if (blk && block->num_rematrixing_bands != block0->num_rematrixing_bands)
337 block->new_rematrixing_strategy = 1;
339 nb_coefs = FFMIN(block->end_freq[1], block->end_freq[2]);
342 block0 = block;
346 for (bnd = 0; bnd < block->num_rematrixing_bands; bnd++) {
347 /* calculate sum of squared coeffs for one band in one block */
351 sum_square_butterfly(s, sum, block->mdct_coef[1] + start,
352 block->mdct_coef[2] + start, end - start);
356 block->rematrixing_flags[bnd] = 1;
358 block->rematrixing_flags[bnd] = 0;
362 block->rematrixing_flags[bnd] != block0->rematrixing_flags[bnd]) {
363 block->new_rematrixing_strategy = 1;
366 block0 = block;