Commit graph

25 commits

Author SHA1 Message Date
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Danil Chapovalov
f317f7106a Remove option to parse RateControlSettings from the global field trial string
Bug: webrtc:42220378
Change-Id: Iff016f0f53f427ff59df816d8d87dc4a8119db65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350921
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42348}
2024-05-20 10:38:14 +00:00
Danil Chapovalov
ac426265b6 Cleanup usage of FieldTrialsView by RateControlSettings and CongestionWindowPushbackController
Replace factory that takes optional FieldTrialView with a constructor that takes non-optional reference to the same interface - all callers already guarantee it is not nullptr
Replace several local IsEnabled/IsDisabled helpers with the same helpers in FieldTrialView
In CongestionWindowPushbackController tests pass field trials bypassing global field trial string

Bug: webrtc:42220378
Change-Id: Ic49ad78919d834a5e3b9b69545d3b39088023a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349900
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42270}
2024-05-10 12:40:20 +00:00
Per Kjellander
0dbee62eb9 Remove unused RateControlSettings::TriggerProbeOnMaxAllocatedBitrateChange
The flag has been default true for a long period of time.(longer than https://webrtc-review.googlesource.com/c/src/+/148581)
Reference to it was removed in https://webrtc-review.googlesource.com/c/src/+/282860

Bug: webrtc:14392
Change-Id: I08aab062acc27d39b41c9d96571ed2ce058f2eec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282862
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38599}
2022-11-10 09:12:08 +00:00
Jonas Oreland
6c2dae21e9 Move VideoEncoderConfig from api/ into video/config
This cl move VideoEncoderConfig from api/ to video/config.

VideoStreamEncoderInterface and VideoStreamEncoderObserver
are moved as collateral.

brandt@ think that the reason these were in api/ in the
first place had to downstream project.

Functionality wise, this is a NOP, but it makes it easier
to modify the encoder (config).

Bug: webrtc:14451
Change-Id: I2610d815aeb186298498e7102cac773ecac8cd36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277002
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38242}
2022-09-29 09:44:43 +00:00
Erik Språng
0c1a934e26 Remove unused video/screenshare hysteresis trials.
This removes the unused field trials
`WebRTC-SimulcastScreenshareUpswitchHysteresisPercent` and
`WebRTC-SimulcastScreenshareUpswitchHysteresisPercent` as well as the
`video_hysteresis` and `screenshare_hysteresis` parameters in
`WebRTC-VideoRateControl`.

The hysteresis parameters in `WebRTC-StableTargetRate` are currently
left, their future is unclear...

Bug: webrtc:9734
Change-Id: I9e6bbe4b630a0501d365bf69e87e65164c500122
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269207
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37635}
2022-07-28 07:23:19 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Ying Wang
4593047ee1 Make congestion window pushback drop frame experiment config default.
Bug: None
Change-Id: Ic3138b691cdf535e3d0e95ee6c1d63794414a1e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204803
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33177}
2021-02-05 11:54:47 +00:00
Erik Språng
9d69cbeabf Changes default pacing factor to 1.1x
This changes the default behavior to use pacing factor of 1.1x instead
of 2.5x, it also sets libvpx rate controler as trusted, turns on the
encoder pushback mechanism and sets spatial hysteresis to 1.2.
The unused "dynamic rate" settings in libvpx is removed.

The new settings matches what has been used in chromium since 2019.
If needed, the legacy behavior can be enabled using the field trial
WebRTC-VideoRateControl.

Bug: webrtc:10155
Change-Id: I8186b491aa5bef61e8f568e96c980ca68f0c208f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186661
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32477}
2020-10-23 13:43:32 +00:00
Ying Wang
9b881abea9 Enable congestion window pushback to reduce bitrate by only drop video frames.
With current congestion window pushback, when congestion window is filling up, it will reduce bitrate directly and encoder may reduce encode quality, resolution, or framerate to adapt to the allocated bitrate, the behavior is depending on the degradation preference.
This change enable congestion window to only drop frames to reduce bitrate (when needed) instead of reduce general bitrate allocation.

Bug: webrtc:11334
Change-Id: I9cf5c20a0858c4d07d006942abe72aa5e1f7cb38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168059
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30483}
2020-02-07 14:14:47 +00:00
Christoffer Rodbro
034f767a91 Allow setting the initial congestion window size by config.
Bug: webrtc:11148
Change-Id: I4700a261661dca51d769e0a277704e1f9316e83d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161089
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30038}
2019-12-09 11:00:10 +00:00
Rasmus Brandt
2b9317ad76 Stop checking VP8BaseHeavyTl3RateAllocation field trial on every frame.
- Centralize field trial string reading to RateControlSettings
- Cache RateControlSettings at all production code use sites

Bug: None
Change-Id: I0dbce9cc97fea0bc780982e7ef270b417a8c15bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158664
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29680}
2019-11-04 13:50:59 +00:00
Sebastian Jansson
0ee8008a0d Use struct parser for rate control trial.
Bug: webrtc:9883
Change-Id: I9ec7988da2e4d88bedd9b71cae00452f531980d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148581
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28856}
2019-08-14 11:47:12 +00:00
Åsa Persson
a09484940b RateControlSettings: add option to set min pixels per frame for libvpx vp8.
Bug: none
Change-Id: I09aa1bcea2f4a9cd65ffeef1df1d9656e4604def
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144029
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28412}
2019-06-28 10:54:23 +00:00
Åsa Persson
d7dd49ff3d RateControlSettings: add option to set max QP for libvpx vp8.
Bug: none
Change-Id: Ia662068fe179faebc1df0aaa7f37b6e989b6525f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135569
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27888}
2019-05-09 07:04:55 +00:00
Erik Språng
3d11e2f81c Allow encoder target bitrate to reach media rate if there is headroom.
This CL adds a field trial that enables the EncoderBitrateAdjuster to
allow higher target bitrate if we are not network constrained. We still
don't allow the bitrate to go higher than the average target media rate
though.

Bug: webrtc:10155
Change-Id: Id5995070aa0cbe84b9305a422279141b38664bb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132717
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27627}
2019-04-15 15:11:39 +00:00
Erik Språng
7a3fe89138 Tweak libvpx vp8/vp9 encoder rc settings based on network headroom.
This CL adds an experiment where aggressiveness of the rate controller
is tuned based on if the application is network constrained or not.

Bug: webrtc:10155
Change-Id: I6c8cd116f57321c5b36cf5a69840913936091aaa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132786
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27615}
2019-04-15 11:59:15 +00:00
Erik Språng
7f24fb9c1e Add settings to turn off VP8 base layer qp limit
This quality boost means that we sometimes drop a _lot_ of frames in the
base layer. It also interacts poorly with the bitrate adjuster since
even if frames are dropped they are often over-sized.

The setting still leaves the current behavior as default, but can be
changed using the WebRTC-VideoRateControl field trial.

Bug: webrtc:10155
Change-Id: I1a92ec69bab61b5148fe9d8bc391ac5ee1019367
Reviewed-on: https://webrtc-review.googlesource.com/c/122840
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26659}
2019-02-13 11:54:19 +00:00
Erik Språng
7ca375c8ca Implement encoder overshoot detector and rate adjuster.
The overshoot detector uses a simple pacer model to determine an
estimate of how much the encoder is overusing the target bitrate.
This utilization factor can then be adjuster for when configuring the
actual target bitrate.

Spatial layers (simulcast streams) are adjusted separately.
Temporal layers are measured separately, but are combined into a single
utilization factor per spatial layer.

Bug: webrtc:10155
Change-Id: I8ea58dc6c4871e880553d7c22202f11cb2feb216
Reviewed-on: https://webrtc-review.googlesource.com/c/114886
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26573}
2019-02-06 15:54:11 +00:00
Rasmus Brandt
c402dbe2b0 Account for simulcast hysteresis in padding rate calculation.
Bug: webrtc:10271
Change-Id: If0b0eb7d94fb1c892880ff4745f34c43fcdeee54
Reviewed-on: https://webrtc-review.googlesource.com/c/120661
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26527}
2019-02-04 10:49:04 +00:00
Erik Språng
5118bbc8b7 Add ability to set max probing bitrate via GoogCcNetworkController
Bug: webrtc:10223
Change-Id: I8e9ee0cd333634e7d0b53d3d446a580374cc88b4
Reviewed-on: https://webrtc-review.googlesource.com/c/120342
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26452}
2019-01-29 19:19:04 +00:00
Erik Språng
2c58ba1f24 Move simulcast hysteresis factor parsing to RateControlSettings
Bug: webrtc:10223
Change-Id: I962ca959afbcd8c27a0f79533c6e3c97369c697e
Reviewed-on: https://webrtc-review.googlesource.com/c/119262
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26374}
2019-01-23 16:34:34 +00:00
Erik Språng
4b4266f00f Move parsing of trusted rate controller to RateControlSettings
Bug: webrtc:10223
Change-Id: Iadf46e278e0f994ed95ff1a240c1f39a0421ab7c
Reviewed-on: https://webrtc-review.googlesource.com/c/119261
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26371}
2019-01-23 14:37:08 +00:00
Erik Språng
cd76eabdd7 Parsing of pacing factor and alr probing in RateControlSettings
Bug: webrtc:10223
Change-Id: Ibba96a220414520872edcc9f87fddefbcab374d4
Reviewed-on: https://webrtc-review.googlesource.com/c/118740
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26353}
2019-01-22 10:01:39 +00:00
Erik Språng
7121564e97 Move congestion window field trial parsing to new class.
This cl is part of work to move several experiments into a joint
experiment group. Most of them vill be ralted to video, hence the name.

Bug: webrtc:10223
Change-Id: I8767c43abb6aa910ab51710eeb908e0f9df1e296
Reviewed-on: https://webrtc-review.googlesource.com/c/118361
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26346}
2019-01-21 16:39:42 +00:00