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

Issue 1660963002: Bitrate controller for VideoToolbox encoder. (Closed)

Created:
4 years, 10 months ago by tkchin_webrtc
Modified:
4 years, 10 months ago
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, rwolff_gocast.it, video-team_agora.io, yujie_mao (webrtc), zhengzhonghou_agora.io, tterriberry_mozilla.com, qiang.lu, niklas.enbom, andresp, peah-webrtc, the sun, pbos-webrtc, perkj_webrtc, mflodman, noahric, sprang_webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Bitrate controller for VideoToolbox encoder. Also fixes a crash on encoder Release. BUG=webrtc:4081 Committed: https://crrev.com/f75d0082350096077e6553a149bda7749593b9c7 Cr-Commit-Position: refs/heads/master@{#11729}

Patch Set 1 : Rebase #

Total comments: 1

Patch Set 2 : CR comments #

Patch Set 3 : CritSection and kbit #

Patch Set 4 : Remove unneeded call #

Total comments: 15

Patch Set 5 : CR comments #

Patch Set 6 : Rebase #

Patch Set 7 : Fix GN build. #

Total comments: 12

Patch Set 8 : CR comments #

Total comments: 23

Patch Set 9 : Use bps everywhere. #

Patch Set 10 : Fix UT #

Total comments: 14

Patch Set 11 : Give constant a name. #

Patch Set 12 : Instant adjustments only for large rate changes. #

Total comments: 4

Patch Set 13 : Move setters to ctor args instead. #

Patch Set 14 : Update some comments. #

Patch Set 15 : Fix win compile errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+580 lines, -314 lines) Patch
M webrtc/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/base/base.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/base/base_tests.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + webrtc/base/rate_statistics.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
A + webrtc/base/rate_statistics.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -5 lines 0 comments Download
A + webrtc/base/rate_statistics_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/modules.gyp View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/BUILD.gn View 1 2 3 4 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
D webrtc/modules/remote_bitrate_estimator/rate_statistics.h View 1 2 3 4 1 chunk +0 lines, -53 lines 0 comments Download
D webrtc/modules/remote_bitrate_estimator/rate_statistics.cc View 1 2 3 4 1 chunk +0 lines, -85 lines 0 comments Download
D webrtc/modules/remote_bitrate_estimator/rate_statistics_unittest.cc View 1 2 3 4 1 chunk +0 lines, -97 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/video_coding/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A webrtc/modules/video_coding/bitrate_adjuster.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +160 lines, -0 lines 0 comments Download
A webrtc/modules/video_coding/bitrate_adjuster_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +168 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_decoder.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -2 lines 0 comments Download
M webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +121 lines, -59 lines 0 comments Download
A webrtc/modules/video_coding/include/bitrate_adjuster.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +90 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/video_coding.gypi View 1 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/video/receive_statistics_proxy.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 67 (24 generated)
tkchin_webrtc
4 years, 10 months ago (2016-02-03 15:41:36 UTC) #5
pbos-webrtc
I don't think we should add another layer to VideoEncoders, if this is a bug ...
4 years, 10 months ago (2016-02-03 15:50:07 UTC) #6
pbos-webrtc
https://codereview.webrtc.org/1660963002/diff/40001/webrtc/video/video_encoder_hardware.cc File webrtc/video/video_encoder_hardware.cc (right): https://codereview.webrtc.org/1660963002/diff/40001/webrtc/video/video_encoder_hardware.cc#newcode90 webrtc/video/video_encoder_hardware.cc:90: int32_t HardwareVideoEncoderWrapper::SetRates(uint32_t bitrate, This one is permitted to be ...
4 years, 10 months ago (2016-02-03 15:52:22 UTC) #7
tkchin_webrtc
On 2016/02/03 15:50:07, pbos-webrtc wrote: > I don't think we should add another layer to ...
4 years, 10 months ago (2016-02-03 16:00:40 UTC) #8
pbos-webrtc
Prefer adding it as a component, if it's to be turned on for all HW ...
4 years, 10 months ago (2016-02-03 16:06:11 UTC) #10
stefan-webrtc
On 2016/02/03 16:06:11, pbos-webrtc wrote: > Prefer adding it as a component, if it's to ...
4 years, 10 months ago (2016-02-03 16:30:33 UTC) #11
stefan-webrtc
On 2016/02/03 16:30:33, stefan-webrtc (holmer) wrote: > On 2016/02/03 16:06:11, pbos-webrtc wrote: > > Prefer ...
4 years, 10 months ago (2016-02-03 16:31:05 UTC) #12
tkchin_webrtc
PTAL
4 years, 10 months ago (2016-02-05 14:53:09 UTC) #13
tkchin_webrtc
ping.
4 years, 10 months ago (2016-02-08 15:53:58 UTC) #15
stefan-webrtc
4 years, 10 months ago (2016-02-09 10:04:17 UTC) #17
stefan-webrtc
Erik will take a look.
4 years, 10 months ago (2016-02-09 10:04:37 UTC) #18
sprang
Could you please add a bitrate_adjuster_unittest.cc as well. Change the clock implementation used so that ...
4 years, 10 months ago (2016-02-09 10:46:26 UTC) #20
tkchin_webrtc
PTAL https://codereview.webrtc.org/1660963002/diff/100001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/100001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode69 webrtc/modules/video_coding/bitrate_adjuster.cc:69: if (bitrate_tracker_.count() < 60) { On 2016/02/09 10:46:26, ...
4 years, 10 months ago (2016-02-11 00:03:21 UTC) #21
tkchin_webrtc
On 2016/02/11 00:03:21, tkchin_webrtc wrote: > PTAL > > https://codereview.webrtc.org/1660963002/diff/100001/webrtc/modules/video_coding/bitrate_adjuster.cc > File webrtc/modules/video_coding/bitrate_adjuster.cc (right): > ...
4 years, 10 months ago (2016-02-12 22:32:36 UTC) #22
sprang_webrtc
lgtm Sorry for the late reply, was sick a few day last week... Thanks for ...
4 years, 10 months ago (2016-02-15 08:51:32 UTC) #24
tkchin_webrtc
Stefan/Peter - mind rubber stamping for OWNERS? kjellander@ - mind stamping for BUILD.gn?
4 years, 10 months ago (2016-02-17 00:12:45 UTC) #27
kjellander_webrtc
lgtm, assuming the BUILD.gn differences are handled in another CL (not necessarily by you since ...
4 years, 10 months ago (2016-02-17 06:38:52 UTC) #29
tkchin_webrtc
https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/remote_bitrate_estimator/BUILD.gn File webrtc/modules/remote_bitrate_estimator/BUILD.gn (right): https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/remote_bitrate_estimator/BUILD.gn#newcode20 webrtc/modules/remote_bitrate_estimator/BUILD.gn:20: "../../base:rtc_base", On 2016/02/17 06:38:52, kjellander (webrtc) wrote: > When ...
4 years, 10 months ago (2016-02-17 21:55:41 UTC) #30
pthatcher
lgtm for webrtc/base
4 years, 10 months ago (2016-02-17 22:19:51 UTC) #32
stefan-webrtc
Lgtm, but consider my comments https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode122 webrtc/modules/video_coding/bitrate_adjuster.cc:122: << (uint32_t)last_adjusted_bitrate static_cast https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode123 ...
4 years, 10 months ago (2016-02-18 20:56:58 UTC) #33
pbos-webrtc
https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h File webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h (right): https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h#newcode31 webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h:31: public BitrateAdjusterObserver { On 2016/02/18 20:56:58, stefan-webrtc (holmer) wrote: ...
4 years, 10 months ago (2016-02-18 21:08:31 UTC) #34
tkchin_webrtc
Thanks for looking. https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode122 webrtc/modules/video_coding/bitrate_adjuster.cc:122: << (uint32_t)last_adjusted_bitrate On 2016/02/18 20:56:58, stefan-webrtc ...
4 years, 10 months ago (2016-02-18 23:50:39 UTC) #36
stefan-webrtc
lgtm https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h File webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h (right): https://codereview.webrtc.org/1660963002/diff/160001/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h#newcode31 webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.h:31: public BitrateAdjusterObserver { On 2016/02/18 23:50:39, tkchin_webrtc wrote: ...
4 years, 10 months ago (2016-02-19 08:23:03 UTC) #37
pbos-webrtc
Looks a lot better. I'd like to get _bps units for the bitrate stuff (kbps ...
4 years, 10 months ago (2016-02-19 11:26:40 UTC) #38
tkchin_webrtc
I used kbit because that's what was provided to the VideoEncoder iface. If that's going ...
4 years, 10 months ago (2016-02-19 18:51:10 UTC) #39
pbos-webrtc
https://codereview.webrtc.org/1660963002/diff/200001/webrtc/base/BUILD.gn File webrtc/base/BUILD.gn (right): https://codereview.webrtc.org/1660963002/diff/200001/webrtc/base/BUILD.gn#newcode275 webrtc/base/BUILD.gn:275: "rate_statistics.cc", This should go into rtc_base_approved https://codereview.webrtc.org/1660963002/diff/200001/webrtc/base/base.gyp File webrtc/base/base.gyp ...
4 years, 10 months ago (2016-02-19 18:57:49 UTC) #40
tkchin_webrtc
PTAL https://codereview.webrtc.org/1660963002/diff/200001/webrtc/base/BUILD.gn File webrtc/base/BUILD.gn (right): https://codereview.webrtc.org/1660963002/diff/200001/webrtc/base/BUILD.gn#newcode275 webrtc/base/BUILD.gn:275: "rate_statistics.cc", On 2016/02/19 18:57:49, pbos-webrtc wrote: > This ...
4 years, 10 months ago (2016-02-19 23:30:05 UTC) #41
pbos-webrtc
Bit confusing about max bitrate, shouldn't max adjustment be over target, otherwise this can't increase ...
4 years, 10 months ago (2016-02-22 15:44:18 UTC) #42
tkchin_webrtc
https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode30 webrtc/modules/video_coding/bitrate_adjuster.cc:30: bitrate_tracker_(1.5 * kBitrateUpdateIntervalMs, 8 * 1000) { On 2016/02/22 ...
4 years, 10 months ago (2016-02-22 18:23:18 UTC) #43
pbos-webrtc
https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode68 webrtc/modules/video_coding/bitrate_adjuster.cc:68: return .95 * target_bitrate_bps_; On 2016/02/22 18:23:18, tkchin_webrtc wrote: ...
4 years, 10 months ago (2016-02-22 18:37:19 UTC) #44
tkchin_webrtc
PTAL Addressed offline comments re: fast changing rates. https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode68 webrtc/modules/video_coding/bitrate_adjuster.cc:68: return ...
4 years, 10 months ago (2016-02-23 00:05:27 UTC) #45
pbos-webrtc
https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode110 webrtc/modules/video_coding/bitrate_adjuster.cc:110: float min_bitrate_bps = GetMinAdjustedBitrateBps(); On 2016/02/23 00:05:27, tkchin_webrtc wrote: ...
4 years, 10 months ago (2016-02-23 15:04:40 UTC) #47
tkchin_webrtc
https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc File webrtc/modules/video_coding/bitrate_adjuster.cc (right): https://codereview.webrtc.org/1660963002/diff/240001/webrtc/modules/video_coding/bitrate_adjuster.cc#newcode110 webrtc/modules/video_coding/bitrate_adjuster.cc:110: float min_bitrate_bps = GetMinAdjustedBitrateBps(); On 2016/02/23 15:04:40, pbos-webrtc wrote: ...
4 years, 10 months ago (2016-02-23 17:03:20 UTC) #48
pbos-webrtc
lgtm
4 years, 10 months ago (2016-02-23 17:04:55 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660963002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660963002/320001
4 years, 10 months ago (2016-02-23 18:12:57 UTC) #52
pthatcher1
lgtm
4 years, 10 months ago (2016-02-23 20:26:01 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660963002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660963002/360001
4 years, 10 months ago (2016-02-23 20:32:39 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: mac_baremetal on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 10 months ago (2016-02-23 22:33:19 UTC) #59
kjellander_webrtc
On 2016/02/23 22:33:19, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 10 months ago (2016-02-24 06:46:52 UTC) #60
kjellander_webrtc
On 2016/02/24 06:46:52, kjellander (webrtc) wrote: > On 2016/02/23 22:33:19, commit-bot: I haz the power ...
4 years, 10 months ago (2016-02-24 06:47:28 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660963002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660963002/360001
4 years, 10 months ago (2016-02-24 06:47:56 UTC) #63
commit-bot: I haz the power
Committed patchset #15 (id:360001)
4 years, 10 months ago (2016-02-24 06:49:48 UTC) #65
commit-bot: I haz the power
4 years, 10 months ago (2016-02-24 06:49:58 UTC) #67
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/f75d0082350096077e6553a149bda7749593b9c7
Cr-Commit-Position: refs/heads/master@{#11729}

Powered by Google App Engine
This is Rietveld 408576698