• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching defs:band

100  * information for single band used by 3GPP TS26.403-inspired psychoacoustic model
103 float energy; ///< band energy
118 AacPsyBand band[128]; ///< bands information
136 float barks; ///< Bark value for each spectral band in long frame
500 static float calc_pe_3gpp(AacPsyBand *band)
504 band->pe = 0.0f;
505 band->pe_const = 0.0f;
506 band->active_lines = 0.0f;
507 if (band->energy > band->thr) {
508 a = log2f(band->energy);
509 pe = a - log2f(band->thr);
510 band->active_lines = band->nz_lines;
514 band->active_lines *= PSY_3GPP_C3;
516 band->pe = pe * band->nz_lines;
517 band->pe_const = a * band->nz_lines;
520 return band->pe;
534 static float calc_reduced_thr_3gpp(AacPsyBand *band, float min_snr,
537 float thr = band->thr;
539 if (band->energy > thr) {
548 if (thr > band->energy * min_snr && band->avoid_holes != PSY_3GPP_AH_NONE) {
549 thr = FFMAX(band->thr, band->energy * min_snr);
550 band->avoid_holes = PSY_3GPP_AH_ACTIVE;
558 * Calculate band thresholds as suggested in 3GPP TS26.403
578 AacPsyBand *band = &pch->band[w+g];
581 band->energy = 0.0f;
583 band->energy += coefs[start+i] * coefs[start+i];
586 band->thr = band->energy * 0.001258925f;
587 band->nz_lines = form_factor / powf(band->energy / band_sizes[g], 0.25f);
594 AacPsyBand *bands = &pch->band[w];
608 AacPsyBand *band = &bands[g];
610 band->thr_quiet = band->thr = FFMAX(band->thr, coeffs[g].ath);
613 band->thr = FFMAX(PSY_3GPP_RPEMIN*band->thr, FFMIN(band->thr,
617 pe += calc_pe_3gpp(band);
618 a += band->pe_const;
619 active_lines += band->active_lines;
622 if (spread_en[w+g] * avoid_hole_thr > band->energy || coeffs[g].min_snr > 1.0f)
623 band->avoid_holes = PSY_3GPP_AH_NONE;
625 band->avoid_holes = PSY_3GPP_AH_INACTIVE;
650 AacPsyBand *band = &pch->band[w+g];
652 band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);
654 pe += calc_pe_3gpp(band);
655 a += band->pe_const;
656 active_lines += band->active_lines;
666 AacPsyBand *band = &pch->band[w+g];
668 if (band->avoid_holes != PSY_3GPP_AH_ACTIVE) {
669 pe_no_ah += band->pe;
670 a += band->pe_const;
671 active_lines += band->active_lines;
682 AacPsyBand *band = &pch->band[w+g];
685 band->thr = calc_reduced_thr_3gpp(band, coeffs[g].min_snr, reduction);
686 pe += calc_pe_3gpp(band);
687 band->norm_fac = band->active_lines / band->thr;
688 norm_fac += band->norm_fac;
701 AacPsyBand *band = &pch->band[w+g];
703 if (band->active_lines > 0.5f) {
704 float delta_sfb_pe = band->norm_fac * norm_fac * delta_pe;
705 float thr = band->thr;
707 thr *= powf(2.0f, delta_sfb_pe / band->active_lines);
708 if (thr > coeffs[g].min_snr * band->energy && band->avoid_holes == PSY_3GPP_AH_INACTIVE)
709 thr = FFMAX(band->thr, coeffs[g].min_snr * band->energy);
710 band->thr = thr;
719 AacPsyBand *band = &pch->band[w+g];
720 if (band->avoid_holes != PSY_3GPP_AH_NONE && coeffs[g].min_snr < PSY_SNR_1DB) {
722 band->thr = band->energy * PSY_SNR_1DB;
723 pe += band->active_lines * 1.5f - band->pe;
733 AacPsyBand *band = &pch->band[w+g];
736 psy_band->threshold = band->thr;
737 psy_band->energy = band->energy;
741 memcpy(pch->prev_band, pch->band, sizeof(pch->band));