Closed ziminghua closed 11 months ago
Great change @ziminghua!
It is possible to support both start codes? https://learn.microsoft.com/en-us/windows/win32/directshow/h-264-video-types#h264-bitstream-with-start-codes
Sorry, I didn't consider annex B originally, so I optimized the original performance. If I want to support both start codes, I think this is possible.
@Sean-Der Hello, what do you think of the current update.
@ziminghua great work! Lets merge it. I am out of time, I will merge first thing tomorrow
Code is much easier to read also :)
Patch coverage is 100.00%
of modified lines.
Files Changed | Coverage |
---|---|
codecs/h264_packet.go | 100.00% |
:loudspeaker: Thoughts on this report? Let us know!.
@ziminghua I tagged v1.8.2
so you can use this now! Thank you so much for the contribution :)
Optimize the performance of H264 packaging
Description
Sending package H264 in my program is quite performance intensive. Then through ppfrof, it was found that the range of nalu is relatively slow, and it will create slices multiple times. Use bytes.Index lookup index can significantly improve performance
Before:
After: