h264: move SPS bitstream restriction into dedicated struct

This commit is contained in:
aler9
2022-06-22 13:58:49 +02:00
parent e220d8b482
commit 09865015c9
3 changed files with 86 additions and 65 deletions

View File

@@ -74,12 +74,13 @@ func TestSPSUnmarshal(t *testing.T) {
NumUnitsInTick: 1,
TimeScale: 60,
},
BitstreamRestrictionFlag: true,
MotionVectorsOverPicBoundariesFlag: true,
Log2MaxMvLengthHorizontal: 11,
Log2MaxMvLengthVertical: 11,
MaxNumReorderFrames: 2,
MaxDecFrameBuffering: 4,
BitstreamRestriction: &SPS_BitstreamRestriction{
MotionVectorsOverPicBoundariesFlag: true,
Log2MaxMvLengthHorizontal: 11,
Log2MaxMvLengthVertical: 11,
MaxNumReorderFrames: 2,
MaxDecFrameBuffering: 4,
},
},
},
1280,
@@ -112,11 +113,12 @@ func TestSPSUnmarshal(t *testing.T) {
NumUnitsInTick: 1,
TimeScale: 60,
},
BitstreamRestrictionFlag: true,
MotionVectorsOverPicBoundariesFlag: true,
Log2MaxMvLengthHorizontal: 11,
Log2MaxMvLengthVertical: 11,
MaxDecFrameBuffering: 3,
BitstreamRestriction: &SPS_BitstreamRestriction{
MotionVectorsOverPicBoundariesFlag: true,
Log2MaxMvLengthHorizontal: 11,
Log2MaxMvLengthVertical: 11,
MaxDecFrameBuffering: 3,
},
},
},
1920,
@@ -149,12 +151,13 @@ func TestSPSUnmarshal(t *testing.T) {
NumUnitsInTick: 1,
TimeScale: 60,
},
BitstreamRestrictionFlag: true,
MotionVectorsOverPicBoundariesFlag: true,
Log2MaxMvLengthHorizontal: 11,
Log2MaxMvLengthVertical: 11,
MaxNumReorderFrames: 2,
MaxDecFrameBuffering: 4,
BitstreamRestriction: &SPS_BitstreamRestriction{
MotionVectorsOverPicBoundariesFlag: true,
Log2MaxMvLengthHorizontal: 11,
Log2MaxMvLengthVertical: 11,
MaxNumReorderFrames: 2,
MaxDecFrameBuffering: 4,
},
},
},
1920,