add more efficient bit reader / writer

This commit is contained in:
aler9
2022-06-24 16:41:01 +02:00
parent 949e27c428
commit d11fe222c3
14 changed files with 394 additions and 285 deletions

View File

@@ -435,3 +435,18 @@ func TestSPSUnmarshal(t *testing.T) {
})
}
}
func BenchmarkSPSUnmarshal(b *testing.B) {
for i := 0; i < b.N; i++ {
var sps SPS
sps.Unmarshal([]byte{
103, 77, 0, 41, 154, 100, 3, 192,
17, 63, 46, 2, 220, 4, 4, 5,
0, 0, 3, 3, 232, 0, 0, 195,
80, 232, 96, 0, 186, 180, 0, 2,
234, 196, 187, 203, 141, 12, 0, 23,
86, 128, 0, 93, 88, 151, 121, 112,
160,
})
}
}