Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Issue 2728093002: Optimize ParseRbsp method in H264 bitstream parser. (Closed)

Created:
3 years, 9 months ago by kthelgason
Modified:
3 years, 9 months ago
Reviewers:
magjed_webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, sakal
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Optimize ParseRbsp method in H264 bitstream parser. After profiling, sakal@ found that this method was taking very long, and causing the bitstream parsing to take up to 1ms per frame. The culprit proved to be rtc::Buffer::AppendData, which was called for every byte and subsequently calls memcpy. BUG=webrtc:7293 Review-Url: https://codereview.webrtc.org/2728093002 Cr-Commit-Position: refs/heads/master@{#17051} Committed: https://chromium.googlesource.com/external/webrtc/+/156e3afa7f945069b206c3e252ea3609869bfad5

Patch Set 1 #

Patch Set 2 : Fix memory leak #

Total comments: 1

Patch Set 3 : return vector to avoid copy #

Total comments: 3

Patch Set 4 : Remove unused includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -31 lines) Patch
M webrtc/common_video/h264/h264_bitstream_parser.cc View 1 2 3 2 chunks +5 lines, -6 lines 0 comments Download
M webrtc/common_video/h264/h264_common.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M webrtc/common_video/h264/h264_common.cc View 1 2 1 chunk +12 lines, -11 lines 0 comments Download
M webrtc/common_video/h264/pps_parser.cc View 1 2 3 3 chunks +7 lines, -7 lines 0 comments Download
M webrtc/common_video/h264/sps_parser.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/common_video/h264/sps_vui_rewriter.cc View 1 2 3 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (18 generated)
kthelgason
Magnus, please take a look when you can. The perf improvement here is quite significant. ...
3 years, 9 months ago (2017-03-03 10:18:47 UTC) #4
magjed_webrtc
Awesome! Maybe we should file a bug just for tracking purposes so we don't forget ...
3 years, 9 months ago (2017-03-03 13:14:14 UTC) #11
kthelgason
On 2017/03/03 13:14:14, magjed_webrtc wrote: > Awesome! Maybe we should file a bug just for ...
3 years, 9 months ago (2017-03-03 14:50:54 UTC) #13
magjed_webrtc
lgtm https://codereview.webrtc.org/2728093002/diff/40001/webrtc/common_video/h264/h264_bitstream_parser.cc File webrtc/common_video/h264/h264_bitstream_parser.cc (right): https://codereview.webrtc.org/2728093002/diff/40001/webrtc/common_video/h264/h264_bitstream_parser.cc#newcode16 webrtc/common_video/h264/h264_bitstream_parser.cc:16: #include "webrtc/base/bytebuffer.h" Can you remove this include? https://codereview.webrtc.org/2728093002/diff/40001/webrtc/common_video/h264/pps_parser.cc ...
3 years, 9 months ago (2017-03-03 15:10:32 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2728093002/60001
3 years, 9 months ago (2017-03-06 07:43:00 UTC) #21
commit-bot: I haz the power
3 years, 9 months ago (2017-03-06 08:04:37 UTC) #24
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/external/webrtc/+/156e3afa7f945069b206c3e25...

Powered by Google App Engine
This is Rietveld 408576698