}
} else if (cbt_m1 == NOISE_BT - 1) {
for (group = 0; group < (AAC_SIGNE)g_len; group++, cfo+=128) {
-#if !USE_FIXED
- float scale;
-#endif /* !USE_FIXED */
INTFLOAT band_energy;
-
+#if USE_FIXED
for (k = 0; k < off_len; k++) {
ac->random_state = lcg_random(ac->random_state);
-#if USE_FIXED
cfo[k] = ac->random_state >> 3;
-#else
- cfo[k] = ac->random_state;
-#endif /* USE_FIXED */
}
-#if USE_FIXED
band_energy = ac->fdsp->scalarproduct_fixed(cfo, cfo, off_len);
band_energy = fixed_sqrt(band_energy, 31);
noise_scale(cfo, sf[idx], band_energy, off_len);
#else
+ float scale;
+
+ for (k = 0; k < off_len; k++) {
+ ac->random_state = lcg_random(ac->random_state);
+ cfo[k] = ac->random_state;
+ }
+
band_energy = ac->fdsp->scalarproduct_float(cfo, cfo, off_len);
scale = sf[idx] / sqrtf(band_energy);
ac->fdsp->vector_fmul_scalar(cfo, cfo, scale, off_len);
if (cbt_m1 < NOISE_BT - 1) {
for (group = 0; group < (int)g_len; group++, cfo+=128) {
ac->vector_pow43(cfo, off_len);
- ac->subband_scale(cfo, cfo, sf[idx], 34, off_len);
+ ac->subband_scale(cfo, cfo, sf[idx], 34, off_len, ac->avctx);
}
}
}
coef0 + group * 128 + offsets[i],
scale,
23,
- offsets[i + 1] - offsets[i]);
+ offsets[i + 1] - offsets[i] ,ac->avctx);
#else
ac->fdsp->vector_fmul_scalar(coef1 + group * 128 + offsets[i],
coef0 + group * 128 + offsets[i],
INTFLOAT tmp[TNS_MAX_ORDER+1];
UINTFLOAT *coef = coef_param;
+ if(!mmm)
+ return;
+
for (w = 0; w < ics->num_windows; w++) {
bottom = ics->num_swb;
for (filt = 0; filt < tns->n_filt[w]; filt++) {
ac->mdct.imdct_half(&ac->mdct, buf, in);
#if USE_FIXED
for (i=0; i<1024; i++)
- buf[i] = (buf[i] + 4) >> 3;
+ buf[i] = (buf[i] + 4LL) >> 3;
#endif /* USE_FIXED */
}
if (elem_type < TYPE_DSE) {
if (che_presence[elem_type][elem_id]) {
- av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d duplicate\n",
+ int error = che_presence[elem_type][elem_id] > 1;
+ av_log(ac->avctx, error ? AV_LOG_ERROR : AV_LOG_DEBUG, "channel element %d.%d duplicate\n",
elem_type, elem_id);
- err = AVERROR_INVALIDDATA;
- goto fail;
+ if (error) {
+ err = AVERROR_INVALIDDATA;
+ goto fail;
+ }
}
- che_presence[elem_type][elem_id] = 1;
+ che_presence[elem_type][elem_id]++;
if (!(che=get_che(ac, elem_type, elem_id))) {
av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",