Expand description
Port of libopus 1.3.1 src/analysis.c + src/mlp.c (float build): the
tonality/music/bandwidth analysis that drives mode selection, bandwidth
detection, VBR boosts and prefilter damping in the reference encoder.
Faithful line-for-line port. The MLP (dense 25→32, GRU →24, dense →2) uses
the shipped int8 weight tables in crate::analysis_data. The FFT is the
CELT mode’s N=480 kiss-FFT (same twiddles/bitrev as the reference; the
forward scale 1/N is applied in the input copy, as C’s opus_fft does).
Structs§
- Analysis
Info - celt.h
AnalysisInfo(float build). - Tonality
Analysis State
Constants§
Functions§
- run_
analysis - run_analysis: feed the frame through 20 ms analysis steps, then read the interpolated info for this frame.
- tonality_
get_ info - tonality_get_info: interpolate the ring of per-20ms analyses into one
AnalysisInfo for a frame of
lensamples (encoder rate), applying the music/speech hysteresis thresholds (music_prob_min/max).