mirror of
https://github.com/aler9/gortsplib
synced 2025-10-07 08:01:14 +08:00
h264: improve tests
This commit is contained in:
@@ -299,6 +299,59 @@ func TestSPSUnmarshal(t *testing.T) {
|
|||||||
1440,
|
1440,
|
||||||
20,
|
20,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"1920x1080 nvenc hrd",
|
||||||
|
[]byte{
|
||||||
|
103, 100, 0, 42, 172, 44, 172, 7,
|
||||||
|
128, 34, 126, 92, 5, 168, 8, 8,
|
||||||
|
10, 0, 0, 7, 208, 0, 3, 169,
|
||||||
|
129, 192, 0, 0, 76, 75, 0, 0,
|
||||||
|
38, 37, 173, 222, 92, 20,
|
||||||
|
},
|
||||||
|
SPS{
|
||||||
|
ProfileIdc: 100,
|
||||||
|
LevelIdc: 42,
|
||||||
|
ChromeFormatIdc: 1,
|
||||||
|
Log2MaxFrameNumMinus4: 4,
|
||||||
|
Log2MaxPicOrderCntLsbMinus4: 4,
|
||||||
|
MaxNumRefFrames: 2,
|
||||||
|
PicWidthInMbsMinus1: 119,
|
||||||
|
PicHeightInMbsMinus1: 67,
|
||||||
|
FrameMbsOnlyFlag: true,
|
||||||
|
Direct8x8InferenceFlag: true,
|
||||||
|
FrameCropping: &SPS_FrameCropping{
|
||||||
|
BottomOffset: 4,
|
||||||
|
},
|
||||||
|
VUI: &SPS_VUI{
|
||||||
|
AspectRatioInfoPresentFlag: true,
|
||||||
|
AspectRatioIdc: 1,
|
||||||
|
VideoSignalTypePresentFlag: true,
|
||||||
|
VideoFormat: 5,
|
||||||
|
ColourDescriptionPresentFlag: true,
|
||||||
|
ColourPrimaries: 1,
|
||||||
|
TransferCharacteristics: 1,
|
||||||
|
MatrixCoefficients: 1,
|
||||||
|
TimingInfo: &SPS_TimingInfo{
|
||||||
|
NumUnitsInTick: 1000,
|
||||||
|
TimeScale: 120000,
|
||||||
|
FixedFrameRateFlag: true,
|
||||||
|
},
|
||||||
|
NalHRD: &SPS_HRD{
|
||||||
|
BitRateValueMinus1: []uint32{39061},
|
||||||
|
CpbSizeValueMinus1: []uint32{156249},
|
||||||
|
CbrFlag: []bool{true},
|
||||||
|
InitialCpbRemovalDelayLengthMinus1: 23,
|
||||||
|
CpbRemovalDelayLengthMinus1: 15,
|
||||||
|
DpbOutputDelayLengthMinus1: 5,
|
||||||
|
TimeOffsetLength: 24,
|
||||||
|
},
|
||||||
|
PicStructPresentFlag: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
1920,
|
||||||
|
1080,
|
||||||
|
60,
|
||||||
|
},
|
||||||
} {
|
} {
|
||||||
t.Run(ca.name, func(t *testing.T) {
|
t.Run(ca.name, func(t *testing.T) {
|
||||||
var sps SPS
|
var sps SPS
|
||||||
|
Reference in New Issue
Block a user