Documentation
¶
Index ¶
- Constants
- Variables
- func ChromaQP(qpY, offset int) int
- func ParseSliceHeader(r *bits.Reader, unit nal.Header, sets ParameterSets) (*SliceHeader, *SPS, *PPS, error)
- func WritePPS(p *PPS, lookupSPS func(id uint32) *SPS) ([]byte, error)
- func WriteSEI(messages []SEIMessage, activeSPS *SPS, lookupSPS func(id uint32) *SPS) ([]byte, error)
- func WriteSPS(s *SPS) ([]byte, error)
- func WriteSliceHeader(w *bits.Writer, h *SliceHeader, sps *SPS, pps *PPS) error
- type HRD
- type MMCO
- type PPS
- type ParameterSets
- type PredWeightTable
- type RefPicListModification
- type SEIBufferingPeriod
- type SEIClockTimestamp
- type SEIInitialCPBDelay
- type SEIMessage
- type SEIPicTiming
- type SEIRecoveryPoint
- type SEIUserDataUnregistered
- type SPS
- func (s *SPS) ChromaArrayType() uint32
- func (s *SPS) CroppedHeight() int
- func (s *SPS) CroppedWidth() int
- func (s *SPS) FrameHeightInMbs() int
- func (s *SPS) Height() int
- func (s *SPS) MaxDpbFrames() int
- func (s *SPS) MaxFrameNum() uint32
- func (s *SPS) MaxNumReorder() int
- func (s *SPS) MaxPicOrderCntLsb() uint32
- func (s *SPS) PicHeightInMapUnits() int
- func (s *SPS) PicWidthInMbs() int
- func (s *SPS) ResolvedScalingLists() (list4x4 [6][16]uint8, list8x8 [6][64]uint8)
- func (s *SPS) ScalingListsPresent() bool
- func (s *SPS) Width() int
- type SliceHeader
- type SliceType
- type VUI
- type WeightEntry
Constants ¶
View Source
const ( SEIPayloadTypeBufferingPeriod = 0 SEIPayloadTypePicTiming = 1 SEIPayloadTypeUserDataUnregistered = 5 SEIPayloadTypeRecoveryPoint = 6 )
View Source
const ( ProfileBaseline = 66 ProfileMain = 77 ProfileExtended = 88 ProfileHigh = 100 )
View Source
const ( ChromaMonochrome = 0 Chroma420 = 1 Chroma422 = 2 Chroma444 = 3 )
View Source
const ExtendedSAR = 255
Variables ¶
View Source
var ( ErrUnsupported = errors.New("go264/syntax: unsupported bitstream feature") ErrInvalidValue = errors.New("go264/syntax: syntax element out of range") ErrMissingSPS = errors.New("go264/syntax: referenced SPS is absent") ErrMissingPPS = errors.New("go264/syntax: referenced PPS is absent") ErrUnexpectedEnd = errors.New("go264/syntax: bitstream ended inside a syntax structure") )
Functions ¶
func ParseSliceHeader ¶
func ParseSliceHeader(r *bits.Reader, unit nal.Header, sets ParameterSets) (*SliceHeader, *SPS, *PPS, error)
func WriteSliceHeader ¶
Types ¶
type PPS ¶
type PPS struct {
ID uint32
SPSID uint32
CABAC bool
BottomFieldPicOrderInFramePresent bool
NumSliceGroupsMinus1 uint32
NumRefIdxL0DefaultActiveMinus1 uint32
NumRefIdxL1DefaultActiveMinus1 uint32
WeightedPred bool
WeightedBipredIDC uint32
PicInitQPMinus26 int32
PicInitQSMinus26 int32
ChromaQPIndexOffset int32
DeblockingFilterControlPresent bool
ConstrainedIntraPred bool
RedundantPicCntPresent bool
HasExtension bool
Transform8x8Mode bool
PicScalingMatrixPresent bool
ScalingList4x4 [6][16]uint8
ScalingList8x8 [6][64]uint8
ScalingList4x4Present [6]bool
ScalingList8x8Present [6]bool
UseDefaultScaling4x4 [6]bool
UseDefaultScaling8x8 [6]bool
SecondChromaQPIndexOffset int32
}
func (*PPS) ResolvedScalingLists ¶ added in v1.2.0
type PredWeightTable ¶
type PredWeightTable struct {
LumaLog2WeightDenom uint32
ChromaLog2WeightDenom uint32
L0 []WeightEntry
L1 []WeightEntry
}
type RefPicListModification ¶
type SEIBufferingPeriod ¶ added in v1.2.0
type SEIBufferingPeriod struct {
SeqParameterSetID uint32
NalHRD []SEIInitialCPBDelay
VclHRD []SEIInitialCPBDelay
}
type SEIClockTimestamp ¶ added in v1.2.0
type SEIInitialCPBDelay ¶ added in v1.2.0
type SEIMessage ¶ added in v1.2.0
type SEIMessage struct {
PayloadType uint32
Opaque []byte
RecoveryPoint *SEIRecoveryPoint
BufferingPeriod *SEIBufferingPeriod
PicTiming *SEIPicTiming
UserDataUnregistered *SEIUserDataUnregistered
}
type SEIPicTiming ¶ added in v1.2.0
type SEIPicTiming struct {
CPBRemovalDelay uint32
DPBOutputDelay uint32
PicStruct uint8
ClockTimestamps []SEIClockTimestamp
}
type SEIRecoveryPoint ¶ added in v1.2.0
type SEIUserDataUnregistered ¶ added in v1.2.0
type SPS ¶
type SPS struct {
ProfileIDC uint8
ConstraintSet uint8
LevelIDC uint8
ID uint32
ChromaFormatIDC uint32
SeparateColourPlane bool
BitDepthLumaMinus8 uint32
BitDepthChromaMinus8 uint32
QpprimeYZeroTransformBypass bool
SeqScalingMatrixPresent bool
ScalingList4x4 [6][16]uint8
ScalingList8x8 [6][64]uint8
ScalingList4x4Present [6]bool
ScalingList8x8Present [6]bool
UseDefaultScaling4x4 [6]bool
UseDefaultScaling8x8 [6]bool
Log2MaxFrameNumMinus4 uint32
PicOrderCntType uint32
Log2MaxPicOrderCntLsbMinus4 uint32
DeltaPicOrderAlwaysZero bool
OffsetForNonRefPic int32
OffsetForTopToBottomField int32
OffsetForRefFrame []int32
MaxNumRefFrames uint32
GapsInFrameNumValueAllowed bool
PicWidthInMbsMinus1 uint32
PicHeightInMapUnitsMinus1 uint32
FrameMbsOnly bool
MBAdaptiveFrameField bool
Direct8x8Inference bool
FrameCropping bool
FrameCropLeftOffset uint32
FrameCropRightOffset uint32
FrameCropTopOffset uint32
FrameCropBottomOffset uint32
VUIPresent bool
VUI VUI
}
func (*SPS) ChromaArrayType ¶
func (*SPS) CroppedHeight ¶
func (*SPS) CroppedWidth ¶
func (*SPS) FrameHeightInMbs ¶
func (*SPS) MaxDpbFrames ¶ added in v1.1.0
func (*SPS) MaxFrameNum ¶
func (*SPS) MaxNumReorder ¶ added in v1.1.0
func (*SPS) MaxPicOrderCntLsb ¶
func (*SPS) PicHeightInMapUnits ¶
func (*SPS) PicWidthInMbs ¶
func (*SPS) ResolvedScalingLists ¶ added in v1.2.0
func (*SPS) ScalingListsPresent ¶ added in v1.2.0
type SliceHeader ¶
type SliceHeader struct {
FirstMBInSlice uint32
SliceType SliceType
PPSID uint32
ColourPlaneID uint32
FrameNum uint32
FieldPic bool
BottomField bool
IDRPicID uint32
PicOrderCntLsb uint32
DeltaPicOrderCntBottom int32
DeltaPicOrderCnt [2]int32
RedundantPicCnt uint32
DirectSpatialMvPred bool
NumRefIdxActiveOverride bool
NumRefIdxL0ActiveMinus1 uint32
NumRefIdxL1ActiveMinus1 uint32
RefPicListModificationL0 []RefPicListModification
RefPicListModificationL1 []RefPicListModification
ModificationL0Present bool
ModificationL1Present bool
PredWeight PredWeightTable
NoOutputOfPriorPics bool
LongTermReference bool
AdaptiveRefPicMarking bool
MMCOs []MMCO
CABACInitIDC uint32
SliceQPDelta int32
SPForSwitch bool
SliceQSDelta int32
DisableDeblockingFilterIDC uint32
SliceAlphaC0OffsetDiv2 int32
SliceBetaOffsetDiv2 int32
IDR bool
NalRefIDC uint8
}
func (*SliceHeader) MbaffFrame ¶
func (h *SliceHeader) MbaffFrame(s *SPS) bool
func (*SliceHeader) NumRefIdxL0Active ¶
func (h *SliceHeader) NumRefIdxL0Active(p *PPS) int
func (*SliceHeader) NumRefIdxL1Active ¶
func (h *SliceHeader) NumRefIdxL1Active(p *PPS) int
func (*SliceHeader) QPY ¶
func (h *SliceHeader) QPY(p *PPS) int
type VUI ¶
type VUI struct {
AspectRatioInfoPresent bool
AspectRatioIDC uint8
SarWidth uint16
SarHeight uint16
OverscanInfoPresent bool
OverscanAppropriate bool
VideoSignalTypePresent bool
VideoFormat uint8
VideoFullRange bool
ColourDescPresent bool
ColourPrimaries uint8
TransferCharacteristics uint8
MatrixCoefficients uint8
ChromaLocInfoPresent bool
ChromaSampleLocTypeTop uint32
ChromaSampleLocTypeBottom uint32
TimingInfoPresent bool
NumUnitsInTick uint32
TimeScale uint32
FixedFrameRate bool
NalHRDPresent bool
NalHRD HRD
VclHRDPresent bool
VclHRD HRD
LowDelayHRD bool
PicStructPresent bool
BitstreamRestriction bool
MotionVectorsOverPicBoundary bool
MaxBytesPerPicDenom uint32
MaxBitsPerMBDenom uint32
Log2MaxMvLengthHorizontal uint32
Log2MaxMvLengthVertical uint32
MaxNumReorderFrames uint32
MaxDecFrameBuffering uint32
}
Click to show internal directories.
Click to hide internal directories.