Documentation
¶
Index ¶
Constants ¶
const (
SamplesPerFrame = 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASC ¶
type ASC struct {
ObjectType int // the core's audio object type (2 for AAC-LC)
SamplingFrequencyIndex int
SamplingFrequency int
ChannelConfiguration int
// SBR is 1 when signalled present, 0 when signalled absent, and -1
// when the AudioSpecificConfig does not signal it.
SBR int
// PS likewise.
PS int
// ExtensionSamplingFrequency is the SBR rate when SBR is signalled.
ExtensionSamplingFrequency int
FrameLengthFlag bool
// contains filtered or unexported fields
}
ASC is the part of an MPEG-4 AudioSpecificConfig (ISO/IEC 14496-3 §1.6.2.1) the decoder uses.
func (*ASC) AllowsImplicitPS ¶
AllowsImplicitPS reports whether an in-band PS extension can widen the core.
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder holds AAC-LC, SBR and parametric stereo state for one raw access-unit stream.
func NewDecoder ¶
NewDecoder configures raw access-unit decoding for AAC-LC and any explicitly signalled SBR and PS extension.
func (*Decoder) ChannelNames ¶
ChannelNames are the decoded channels' speakers in output order, as ffmpeg names them, for channel configuration 0 (a program_config_element) and 3 to 6 (ISO/IEC 14496-3 Table 1.19), and nil for mono and stereo output. A program of one SCE with parametric stereo is stereo output (#1754: ISO's PS conformance streams signal their mono core with a program_config_element), so nil, not the SCE's one name.
func (*Decoder) DecodeAU ¶
DecodeAU decodes one raw access unit to interleaved samples, a full-scale 16-bit sample being 1.0.
func (*Decoder) DecodeLCAU ¶
DecodeLCAU decodes one AAC-LC access unit to interleaved signed 16-bit PCM. It rejects in-band SBR and quantizes directly from the core filterbank's float64 samples, in signed-16 sample units.
func (*Decoder) OutputChannels ¶
OutputChannels is the number of decoded channels, including the second channel produced by parametric stereo when signalled.
func (*Decoder) OutputSampleRate ¶
OutputSampleRate is the rate of the decoded samples: the SBR rate when SBR is decoded.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package adts builds and parses Audio Data Transport Stream headers.
|
Package adts builds and parses Audio Data Transport Stream headers. |
|
internal
|
|
|
bits
Package bits implements the MSB-first bit I/O used by AAC syntax elements.
|
Package bits implements the MSB-first bit I/O used by AAC syntax elements. |
|
coder
Package coder implements the quantization and entropy-coding layer shared by the AAC encoder and decoder: scalefactor and spectral Huffman codes (ISO/IEC 14496-3 §4.6.3) and the inverse quantizer (§4.6.2).
|
Package coder implements the quantization and entropy-coding layer shared by the AAC encoder and decoder: scalefactor and spectral Huffman codes (ISO/IEC 14496-3 §4.6.3) and the inverse quantizer (§4.6.2). |
|
tables
Package tables contains data tables shared by the AAC codec stages.
|
Package tables contains data tables shared by the AAC codec stages. |
|
transform
Package transform implements the inverse modified discrete cosine transform and synthesis windows used by AAC (ISO/IEC 14496-3 §4.6.11).
|
Package transform implements the inverse modified discrete cosine transform and synthesis windows used by AAC (ISO/IEC 14496-3 §4.6.11). |