codec

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION_RESERVED = 0
	VERSION_MPEG_1   = 1
	VERSION_MPEG_2   = 2
	VERSION_MPEG_2_5 = 3
)
View Source
const (
	LAYER_RESERVED = 0
	LAYER_1        = 1
	LAYER_2        = 2
	LAYER_3        = 3
)
View Source
const (
	LEFT_CHANNEL  = 0
	RIGHT_CHANNEL = 1
)

Variables

View Source
var (
	/// 10ms,20ms,40ms,60ms, samplerate 48000
	//  sample num per millisecond
	//  48000 / 1000ms * 10 = 480 ...
	SLKOpusSampleSize    [4]int = [4]int{480, 960, 1920, 2880}
	HybridOpusSampleSize [4]int = [4]int{480, 960}
	CELTOpusSampleSize   [4]int = [4]int{120, 210, 480, 960}
)
View Source
var AAC_Sampling_Idx [13]int = [13]int{96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350}
View Source
var BitMask [8]byte = [8]byte{0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF}
View Source
var BitRateTable [2][3][16]int = [2][3][16]int{
	{
		{0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1},
		{0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 380, -1},
		{0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1},
	},
	{
		{0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1},
		{0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1},
		{0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1},
	},
}

ffmpeg mpegaudiotabs.h ff_mpa_bitrate_tab

View Source
var SampleRateTable [3][4]int = [3][4]int{
	{44100, 48000, 32000, 0},
	{22050, 24000, 16000, 0},
	{11025, 12000, 8000, 0},
}

Functions

func AACSampleIdxToSample

func AACSampleIdxToSample(idx int) int

func CalcCrc32