@@ -16,16 +16,16 @@ export class SPSParser {
16
16
parse ( ) {
17
17
// nalhdr
18
18
this . reader . readNext ( )
19
- let profile = this . reader . readNext ( )
19
+ const profile = this . reader . readNext ( )
20
20
// constraints
21
21
this . reader . readNext ( )
22
- let level = this . reader . readNext ( )
22
+ const level = this . reader . readNext ( )
23
23
24
24
// seqParameterSetId
25
25
this . reader . readUnsignedExpGolomb ( )
26
26
27
27
if ( [ 100 , 110 , 122 , 244 , 44 , 83 , 86 , 118 ] . indexOf ( profile ) >= 0 ) {
28
- let chromaFormat = this . reader . readUnsignedExpGolomb ( )
28
+ const chromaFormat = this . reader . readUnsignedExpGolomb ( )
29
29
if ( chromaFormat === 3 ) {
30
30
// Separate color plane flag
31
31
this . reader . readBits ( 1 )
@@ -39,7 +39,7 @@ export class SPSParser {
39
39
40
40
// qpPrimeYZeroTransformBypassFlag
41
41
this . reader . readBits ( 1 )
42
- let seqScalingMatrix = this . reader . readBits ( 1 )
42
+ const seqScalingMatrix = this . reader . readBits ( 1 )
43
43
if ( seqScalingMatrix ) {
44
44
for ( let k = 0 ; k < ( chromaFormat !== 3 ? 8 : 12 ) ; k ++ ) {
45
45
// seqScalingListPresentFlag
@@ -51,7 +51,7 @@ export class SPSParser {
51
51
52
52
// log2MaxFrameNumMinus4
53
53
this . reader . readUnsignedExpGolomb ( )
54
- let picOrderCntType = this . reader . readUnsignedExpGolomb ( )
54
+ const picOrderCntType = this . reader . readUnsignedExpGolomb ( )
55
55
if ( picOrderCntType === 0 ) {
56
56
// log2MaxPicOrderCntLsbMinus4
57
57
this . reader . readUnsignedExpGolomb ( )
@@ -70,31 +70,31 @@ export class SPSParser {
70
70
this . reader . readUnsignedExpGolomb ( )
71
71
// gapsInFrameNumValueAllowedFlag
72
72
this . reader . readBits ( 1 )
73
- let picWidthInMbsMinus1 = this . reader . readUnsignedExpGolomb ( )
74
- let picHeightInMapUnitsMinus1 = this . reader . readUnsignedExpGolomb ( )
75
- let picFrameMbsOnlyFlag = this . reader . readBits ( 1 )
73
+ const picWidthInMbsMinus1 = this . reader . readUnsignedExpGolomb ( )
74
+ const picHeightInMapUnitsMinus1 = this . reader . readUnsignedExpGolomb ( )
75
+ const picFrameMbsOnlyFlag = this . reader . readBits ( 1 )
76
76
// direct8x8InferenceFlag
77
77
this . reader . readBits ( 1 )
78
- let frameCroppingFlag = this . reader . readBits ( 1 )
78
+ const frameCroppingFlag = this . reader . readBits ( 1 )
79
79
80
- let frameCropLeftOffset = frameCroppingFlag
80
+ const frameCropLeftOffset = frameCroppingFlag
81
81
? this . reader . readUnsignedExpGolomb ( )
82
82
: 0
83
- let frameCropRightOffset = frameCroppingFlag
83
+ const frameCropRightOffset = frameCroppingFlag
84
84
? this . reader . readUnsignedExpGolomb ( )
85
85
: 0
86
- let frameCropTopOffset = frameCroppingFlag
86
+ const frameCropTopOffset = frameCroppingFlag
87
87
? this . reader . readUnsignedExpGolomb ( )
88
88
: 0
89
- let frameCropBottomOffset = frameCroppingFlag
89
+ const frameCropBottomOffset = frameCroppingFlag
90
90
? this . reader . readUnsignedExpGolomb ( )
91
91
: 0
92
92
93
- let w =
93
+ const w =
94
94
( picWidthInMbsMinus1 + 1 ) * 16 -
95
95
frameCropLeftOffset * 2 -
96
96
frameCropRightOffset * 2
97
- let h =
97
+ const h =
98
98
( 2 - picFrameMbsOnlyFlag ) * ( picHeightInMapUnitsMinus1 + 1 ) * 16 -
99
99
frameCropTopOffset * 2 -
100
100
frameCropBottomOffset * 2
0 commit comments