Versions in this module Expand all Collapse all v0 v0.7.3 Nov 5, 2026 v0.7.2 Nov 5, 2026 Changes in this version + const BandCostIsSIMD + const CBTot + const CBTotAll + const EightShortSequence + const EscBT + const FirstPairBT + const IntensityBT + const IntensityBT2 + const LongStartSequence + const LongStopSequence + const NMRNCand + const NMRTrellisIsSIMD + const NoiseBT + const NoiseOffset + const NoisePre + const NoisePreBits + const OnlyLongSequence + const ReservedBT + const RoundStandard + const RoundToZero + const ScaleDiffZero + const ScaleDiv512 + const ScaleMaxDiff + const ScaleMaxPos + const ScaleOnePos + const TNSMaxOrder + const TypeCCE + const TypeCPE + const TypeDSE + const TypeEND + const TypeFIL + const TypeLFE + const TypePCE + const TypeSCE + const ZeroBT + func ApplyTNS(sce *SingleChannelElement) + func Coef2MinSF(coef float32) uint8 + func EncodeTNSInfo(pb *bits.Writer, sce *SingleChannelElement) + func FindFormFactor(groupLen, swbSize int, thresh float32, scaled []float32, nzslope float32) float32 + func FindMaxVal(groupLen, swbSize int, scaled []float32) float32 + func FindMinBook(maxval float32, sf int) int + func InitNextbandMap(sce *SingleChannelElement, nextband *[128]uint8) + func SetSpecialBandScalefactors(sce *SingleChannelElement) + func SfdeltaCanRemoveBand(sce *SingleChannelElement, nextband *[128]uint8, prevSF, band int) bool + func SfdeltaCanReplace(sce *SingleChannelElement, nextband *[128]uint8, prevSF, newSF, band int) bool + type ChannelElement struct + Ch [2]SingleChannelElement + CommonWindow int + IsMask [128]bool + IsMode bool + MsMask [128]bool + MsMode int + type Coder struct + RandomState int32 + func (c *Coder) CacheInit() + func (c *Coder) CodebookTrellisRate(pb *bits.Writer, sce *SingleChannelElement, win, groupLen int, _ float32) + func (c *Coder) MarkPNS(sampleRate, bandwidth int, sce *SingleChannelElement, psy *[128]PsyBand, ...) + func (c *Coder) QuantizeAndEncodeBand(pb *bits.Writer, in []float32, scaleIdx, cb int, lambda float32, rtz bool) + func (c *Coder) SearchForIS(sampleRate int, cpe *ChannelElement, psy0, psy1 *[128]PsyBand, lambda float32) + func (c *Coder) SearchForMS(cpe *ChannelElement, psy0, psy1 *[128]PsyBand, lambda float32) + func (c *Coder) SearchForPNS(sampleRate, bandwidth int, sce *SingleChannelElement, psy *[128]PsyBand, ...) + func (c *Coder) SearchForQuantizersFast(bitRate, sampleRate, channels int, sce *SingleChannelElement, ...) + func (c *Coder) SearchForQuantizersNMR(in *NMRInput, st *NMRState, sce *SingleChannelElement, psy *[128]PsyBand, ...) + func (c *Coder) SearchForQuantizersTwoLoop(bitRate, sampleRate, channels, bitresAlloc, bandwidth int, pns bool, ...) + func (c *Coder) SearchForTNS(samplerateIndex int, sce *SingleChannelElement, psy *[128]PsyBand) + type IndividualChannelStream struct + ClipAvoidanceFactor float32 + GroupLen [8]int + MaxSfb int + NumSwb int + NumWindows int + SwbOffset []uint16 + SwbSizes []uint8 + TnsMaxBands int + UseKBWindow [2]int + WindowClipping [8]bool + WindowSequence [2]int + func (ics *IndividualChannelStream) EachBand(nBands int, fn func(w, g, idx int)) + type NMRInput struct + Bandwidth int + BitRate int + BitresAlloc int + Channels int + CurChannel int + FrameNum int64 + LastFramePBCount int + QScaleChannels int + RateControlOK bool + SampleRate int + Speed int + type NMRState struct + Counted [16]int + FramesSinceShort int + Lam [16]float32 + LamRC float32 + Nb [128][NMRNCand]int32 + Nd [128][NMRNCand]float32 + PrevWasShort bool + RCFill int + RCFrameNum int64 + RunBurst float32 + SideEMA float32 + SideInited bool + type PsyBand struct + Bits int32 + Energy float32 + Spread float32 + Threshold float32 + type SingleChannelElement struct + BandAlt [128]int + BandType [128]int + CanPNS [128]bool + Coeffs [1024]float32 + ICS IndividualChannelStream + IsEner [128]float32 + PCoeffs [1024]float32 + PnsEner [128]float32 + RetBuf [2048]float32 + SfIdx [128]int + TNS TemporalNoiseShaping + Zeroes [128]bool + type TemporalNoiseShaping struct + Coef [8][4][TNSMaxOrder]float32 + CoefIdx [8][4][TNSMaxOrder]int + Direction [8][4]int + Length [8][4]int + NFilt [8]int + Order [8][4]int + Present bool