DescriptionPerformance fix for H264 RBSP parsing.
An rtc::Buffer is used to write output of RBSP parsing, usually one byte
at a time. It turns out that container will then expand its capacity one
byte at a time, for each byte reallocating the whole buffer and copying
the contents over, turning this into an O(n^2) operation.
Fix is for now only to preallocate the container storage. Longer term, I
think we should mull over if we really need custom containers...
R=pbos@webrtc.org
TBR=mflodman@webrtc.org
BUG=
Committed: https://crrev.com/1642620a7d9fef7c1dca3bb0d7b172debe3b3d4c
Cr-Commit-Position: refs/heads/master@{#13167}
Patch Set 1 #Patch Set 2 : Missing include in base/buffer.h #
Messages
Total messages: 16 (7 generated)
|