Documentation ¶
Index ¶
Constants ¶
View Source
const (
ExtendedSAR = 255
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BitStream ¶
type BitStream struct {
// contains filtered or unexported fields
}
BitStream H264 bit stream, contains nalu
func NewBitStream ¶
NewBitStream return a new BitStream read from src
type H264Decoder ¶
type H264Decoder struct {
// contains filtered or unexported fields
}
H264Decoder decoder of h264 codec
func NewH264DecoderWithFile ¶
func NewH264DecoderWithFile(filePath string) (*H264Decoder, error)
func (*H264Decoder) InitWithFile ¶
func (hd *H264Decoder) InitWithFile(filePath string) error
type HrdParameters ¶
type Nalu ¶
type Nalu struct {
// contains filtered or unexported fields
}
Nalu of h264 codec
type NaluType ¶
type NaluType uint8
NaluType of h264 codec
const ( NaluUnspecified NaluType = 0 // Coded slice of a non-IDR picture NaluSlice NaluType = 1 // Coded slice data partition A NaluSliceDpa NaluType = 2 // Coded slice data partition B NaluSliceDpb NaluType = 3 // Coded slice data partition C NaluSliceDpc NaluType = 4 // Coded slice of an IDR picture NaluSliceIdr NaluType = 5 // Supplemental enhancement information (SEI) NaluSei NaluType = 6 // Sequence parameter set NaluSps NaluType = 7 // Picture parameter set NaluPps NaluType = 8 // Access unit delimiter NaluAud NaluType = 9 // End of sequence NaluEoseq NaluType = 10 // End of stream NaluEostream NaluType = 11 // Filler data NaluFiller NaluType = 12 )
ITU-T Rec. H.264 (05/2003) page 48 Table 7-1 – NAL unit type codes
type PPS ¶
type PPS struct { Id uint `json:"id"` SeqParameterSetId uint `json:"seq_parameter_set_id"` EntropyCodingModeFlag bool `json:"entropy_coding_mode_flag"` BottomFieldPicOrderInFramePresentFlag bool `json:"bottom_field_pic_order_in_frame_present_flag"` NumSliceGroupsMinus1 uint `json:"num_slice_groups_minus_1"` SliceGroupMapType uint `json:"slice_group_map_type"` RunLengthMinus1 []uint `json:"run_length_minus_1"` TopLeft []uint `json:"top_left"` BottomRight []uint `json:"bottom_right"` SliceGroupChangeDirectionFlag bool `json:"slice_group_change_direction_flag"` SliceGroupChangeRateMinus1 uint `json:"slice_group_change_rate_minus_1"` PicSizeInMapUnitsMinus1 uint `json:"pic_size_in_map_units_minus_1"` SliceGroupId []uint `json:"slice_group_id"` NumRefIdxL0DefaultActiveMinus1 uint `json:"num_ref_idx_l_0_default_active_minus_1"` NumRefIdxL1DefaultActiveMinus1 uint `json:"num_ref_idx_l_1_default_active_minus_1"` WeightedPredFlag bool `json:"weighted_pred_flag"` WeightedBipredIdc uint8 `json:"weighted_bipred_idc"` PicInitQpMinus26 int `json:"pic_init_qp_minus_26"` PicInitQsMinus26 int `json:"pic_init_qs_minus_26"` ChromaQpIndexOffset int `json:"chroma_qp_index_offset"` DeblockingFilterControlPresentFlag bool `json:"deblocking_filter_control_present_flag"` ConstrainedIntraPredFlag bool `json:"constrained_intra_pred_flag"` RedundantPicCntPresentFlag bool `json:"redundant_pic_cnt_present_flag"` Transform8X8ModeFlag bool `json:"transform_8_x_8_mode_flag"` PicScalingMatrixPresentFlag bool `json:"pic_scaling_matrix_present_flag"` PicScalingListPresentFlag []bool `json:"pic_scaling_list_present_flag"` SecondChromaQpIndexOffset int `json:"second_chroma_qp_index_offset"` // contains filtered or unexported fields }
h264 picture parameters set T-REC-H.264-201402-S!!PDF-E.pdf 7.3.2.2 Picture parameter set RBSP syntax
func ParsePpsFromRBSP ¶
type SPS ¶
type SPS struct { ProfileIdc uint8 ConstraintSet0Flag bool ConstraintSet1Flag bool ConstraintSet2Flag bool ConstraintSet3Flag bool ConstraintSet4Flag bool ConstraintSet5Flag bool LevelIdc uint8 Id uint ChromaFormatIdc uint SeparateColourPlaneFlag bool BitDepthLumaMinus8 uint BitDepthChromaMinus8 uint QpprimeYZeroTransformBypassFlag bool SeqScalingMatrixPresentFlag bool SeqScalingListPresentFlag []bool Log2MaxFrameNumMinus4 uint PicOrderCntType uint Log2MaxPicOrderCntLsbMinus4L uint DeltaPicOrderAlwaysZeroFlag bool OffsetForNonRefPic int OffsetForTopToBottomField int NumRefFramesInPicOrderCntCycle uint OffsetForRefFrame []int NumRefFrames uint GapsInFrameNumValueAllowedFlag bool PicWidthInMbsMinus1 uint PicHeightInMapUnitsMinus1 uint FrameMbsOnlyFlag bool MbAdaptiveFrameFieldFlag bool Direct8X8InferenceFlag bool FrameCroppingFlag bool FrameCrop FrameCrop VuiParametersPresentFlag bool VuiParams VuiParameters // contains filtered or unexported fields }
h264 sequence parameters set T-REC-H.264-201402-S!!PDF-E.pdf 7.3.2.1.1 Sequence parameter set data syntax
func ParseSpsFromRBSP ¶
type VuiParameters ¶
type VuiParameters struct { AspectRatioInfoPresentFlag bool AspectRatioIdc uint8 SarWidth uint16 SarHeight uint16 OverscanInfoPresentFlag bool OverscanAppropriateFlag bool VideoSignalTypePresentFlag bool VideoFormat uint8 VideoFullRangeFlag bool ColourDescriptionPresentFlag bool ColourPrimaries uint8 TransferCharacteristics uint8 MatrixCoefficients uint8 ChromaLocInfoPresentFlag bool ChromaSampleLocTypeTopField uint ChromaSampleLocTypeBottomField uint TimingInfoPresentFlag bool NumUnitsInTick uint32 TimeScale uint32 FixedFrameRateFlag bool NalHrdParametersPresentFlag bool VclHrdParametersPresentFlag bool HrdParameters HrdParameters LowDelayHrdFlag bool PicStructPresentFlag bool BitstreamRestrictionFlag bool MotionVectorsOverPicBoundariesFlag bool MaxBytesPerPicDenom uint MaxBitsPerMbDenom uint Log2MaxMvLengthHorizontal uint Log2MaxMvLengthVertical uint MaxNumReorderFrames uint MaxDecFrameBuffering uint }
T-REC-H.264-201402-S!!PDF-E.pdf Annex E.1.1 VUI parameters syntax
Source Files ¶
Click to show internal directories.
Click to hide internal directories.