ics->num_windows = wi[ch].num_windows;
ics->swb_sizes = s->psy.bands [ics->num_windows == 8];
ics->num_swb = tag == TYPE_LFE ? ics->num_swb : s->psy.num_bands[ics->num_windows == 8];
+ ics->max_sfb = FFMIN(ics->max_sfb, ics->num_swb);
ics->swb_offset = wi[ch].window_type[0] == EIGHT_SHORT_SEQUENCE ?
ff_swb_offset_128 [s->samplerate_index]:
ff_swb_offset_1024[s->samplerate_index];
s->channels = avctx->channels;
s->chan_map = aac_chan_configs[s->channels-1];
- s->random_state = 0x1f2e3d4c;
s->lambda = avctx->global_quality > 0 ? avctx->global_quality : 120;
avctx->extradata_size = 5;
avctx->frame_size = 1024;
ERROR_IF(s->channels > AAC_MAX_CHANNELS || s->channels == 7,
"Unsupported number of channels: %d\n", s->channels);
WARN_IF(1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * s->channels,
- "Too many bits per frame requested, clamping to max\n");
+ "Too many bits %f > %d per frame requested, clamping to max\n",
+ 1024.0 * avctx->bit_rate / avctx->sample_rate,
+ 6144 * s->channels);
for (i = 0; i < FF_ARRAY_ELEMS(aacenc_profiles); i++)
if (avctx->profile == aacenc_profiles[i])
goto fail;
s->psypp = ff_psy_preprocess_init(avctx);
ff_lpc_init(&s->lpc, 2*avctx->frame_size, TNS_MAX_ORDER, FF_LPC_TYPE_LEVINSON);
+ av_lfg_init(&s->lfg, 0x72adca55);
if (HAVE_MIPSDSP)
ff_aac_coder_init_mips(s);