Commit graph

100 commits

Author SHA1 Message Date
Danil Chapovalov
cad3e0e2fa Replace DataSize and DataRate factories with newer versions
This is search and replace change:
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::Bytes<\(.*\)>()/DataSize::Bytes(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::bytes/DataSize::Bytes/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BitsPerSec<\(.*\)>()/DataRate::BitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BytesPerSec<\(.*\)>()/DataRate::BytesPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::KilobitsPerSec<\(.*\)>()/DataRate::KilobitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::bps/DataRate::BitsPerSec/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::kbps/DataRate::KilobitsPerSec/g"
git cl format

Bug: webrtc:9709
Change-Id: I65aaca69474ba038c1fe2dd8dc30d3f8e7b94c29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168647
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30545}
2020-02-18 16:09:50 +00:00
Danil Chapovalov
0c626afcf3 Use newer version of TimeDelta and TimeStamp factories in webrtc
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30491}
2020-02-10 12:21:17 +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
Åsa Persson
f5e71e46dc BalancedDegradationSettings: add codec specific min bitrate settings.
Bug: none
Change-Id: I7875a3c8499c883ffecad519063c0eb82a8a7073
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165341
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30192}
2020-01-09 12:45:33 +00:00
Åsa Persson
3a7e8b0403 BalancedDegradationSettings: update codec specific settings.
Bug: none
Change-Id: I126aa4aafcf43a294197b83443c093bd5f22b57e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161954
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30075}
2019-12-12 18:23:25 +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
Danil Chapovalov
dc36829db0 Add VideoCodecType::kVideoCodecAV1 value
Bug: webrtc:11042
Change-Id: I3c5151c9e47679760f8f7d79270488fa8f4c7db5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159282
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29927}
2019-11-27 10:18:45 +00:00
Åsa Persson
e644a03195 Add field trial for rampup in quality based on available bandwidth.
Bug: none
Change-Id: I32e1ea6fb2f2e20fc631e09b02c8f3a11b6c9fac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158888
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29751}
2019-11-11 10:13:28 +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
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).

Source sets always pass all the object files to the linker.

On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.

See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set

Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
2019-10-17 21:17:18 +00:00
Elad Alon
80f53b785b Extend WebRTC-Video-MinVideoBitrate to experiment per-codec
The experiment was extended to support per-codec minimum bitrates
for the following codecs:
 * VP8
 * VP9
 * H.264

The old semantic meaning for the field trial is retained, in that
specifying "br:" applies a minimum bitrate to all codecs. If "br:"
is not specified, the per-codec minimum config is consulted.

Bug: webrtc:11024
Change-Id: I89630262c7710771d5e25d039fe35f0bd217b58a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156171
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29450}
2019-10-11 15:34:33 +00:00
Sebastian Jansson
f23131fdf2 Removing AudioAllocationSettings moving functionality to AudioSendStream.
This is a no-op change that just removes the AudioAllocationSettings
helper class that was previously introduced since the field trials in it
were used in several places. Those other usages has now been removed
and AudioSendStream is now the only user. By moving the trials directly
to AudioSendStream we reduce the reader overhead when trying to follow
what a particular field trial does.

The "WebRTC-Audio-ForceNoTWCC" trial was removed as it is always set
together with "WebRTC-Audio-ABWENoTWCC".

Bug: webrtc:9883
Change-Id: Ib63589255bfe7adb155ea41279bdcd153f1536c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155366
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29371}
2019-10-03 10:52:16 +00:00
Björn Terelius
86873f0cd3 Improve field trial error message.
Bug: None
Change-Id: I112cda6fead3d68136fd7be551686e40191fa87f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153482
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29235}
2019-09-19 09:38:49 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Philip Eliasson
29ab487ea7 Revert "Removes string support in field trial parser."
This reverts commit e74156f7d0.

Reason for revert: This turned out to be useful :)

Original change's description:
> Removes string support in field trial parser.
> 
> This prepares for simplifying the behavior of optionals so that
> an empty parameter value resets the optional.
> 
> Bug: webrtc:9883
> Change-Id: I8ef8fe9698235044cac66bc4a587abe874c8f854
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150883
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29061}

TBR=terelius@webrtc.org,srte@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:9883
Change-Id: Idbb4061f4b423987e62f3a9ad9bee2410e2cec96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152383
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29137}
2019-09-10 14:39:55 +00:00
Erik Språng
2b9dba3d9c Implement stable rate support in SimulcastRateAllocator
Bug: webrtc:10126
Change-Id: I2ea8d27b0bd6f7ffd1ebbba451bd1ce1f2eee3d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151121
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29097}
2019-09-06 11:17:30 +00:00
Erik Språng
cf9cbf5edb Add support for stable bitrate target in SvcRateAllocator
Bug: webrtc:10126
Change-Id: I1362d183bb91510db4e2763a779bcdf681d855ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149069
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29066}
2019-09-04 14:22:43 +00:00
Sebastian Jansson
e74156f7d0 Removes string support in field trial parser.
This prepares for simplifying the behavior of optionals so that
an empty parameter value resets the optional.

Bug: webrtc:9883
Change-Id: I8ef8fe9698235044cac66bc4a587abe874c8f854
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150883
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29061}
2019-09-04 11:26:24 +00:00
Bjorn Terelius
9f00f0e533 Add support for unsigned parameters in FieldTrialParser
Bug: webrtc:10932
Change-Id: I3f56244a6be532065e4096cf1a289e27a032bc44
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150886
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29018}
2019-08-30 08:23:37 +00:00
Åsa Persson
30ab015fc9 BalancedDegradationSettings: add min bitrate configuration for resolution.
Add separate setting for configuring min bitrate that only applies when
adapting up in resolution.

Bug: none
Change-Id: I83d33ac3110a22602065b8d83130e3f619cb1eba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150329
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28970}
2019-08-27 11:05:10 +00:00
Erik Språng
adfb4f7938 Add ability to parse stable bwe experiment settings
Bug: webrtc:10126
Change-Id: If90aa2303b19d1ba9f9c53060e423ab1e6677ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149174
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28960}
2019-08-26 15:31:19 +00:00
Åsa Persson
4869bd6309 Add method CanAdaptUp based on bitrate to BalancedDegradationSettings.
Bug: none
Change-Id: Ibeded1f7193384a8ae5bd3f2ce4ccaa4c7db7290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150333
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28957}
2019-08-26 12:48:35 +00:00
Åsa Persson
f5e5d250bc BalancedDegradationSettings: add option to configure a min framerate diff.
If a framerate reduction (input fps - restricted fps) is less than the
configured diff, shorten interval to next qp check.

Bug: none
Change-Id: Ia0b9e0638e5ba75cdc20a1bb45bfcb7d858c5f89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149040
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28880}
2019-08-16 16:13:46 +00:00
Åsa Persson
1b247f1e6e BalancedDegradationSettings: add option to configure min bitrate.
Add possibility to configure min bitrate based on resolution.
Only adapt up if bw estimate is above the min bitrate for next higher resolution.

Bug: none
Change-Id: Ie38faae07d23336675ec33697ace6f6fed322efa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148598
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28863}
2019-08-15 07:16:33 +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
0c38a86533 BalancedDegradationSettings: add option to configure no fps limit.
If configuring max valid framerate (100), no framerate restriction is
used (std::numeric_limits<int>::max()).

E.g. pixels:1000|2000,fps:5|10 is same as pixels:1000|2000|3000,fps:5|10|100

Bug: none
Change-Id: Ie981841ee8e23cb73c0ef55738ca69055916d902
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148980
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28854}
2019-08-14 08:56:38 +00:00
Sebastian Jansson
55251c3d49 Adds struct parameters parser/encoder.
This is similar to the field trial parser but it uses a normal struct
with normal fields as underlying storage. This makes it easier to
understand and use as only the encoding and parsing uses non-
standard constructs. Additionally, it makes it easier to use the
struct as a regular config struct when the values are not set
using field trials.

Bug: webrtc:9883
Change-Id: I5b16c2a71875b6f478383decff18fbaa62bc404a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145203
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28810}
2019-08-08 15:21:35 +00:00
Erik Språng
d7ee76cadd Wire up field trials for some experimental screenshare settings
Bug: b/132074409
Change-Id: I83d5334255bad4fcf585b9850506bbfe1914ba57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147868
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28758}
2019-08-05 13:47:01 +00:00
Åsa Persson
139f4dc7ac QualityScaler: Add option to try fast adapt down at start up based on initial bw estimates.
optional<int> initial_bitrate_interval_ms: time interval since start of call
where fast adapt down is allowed.
optional<double> initial_bitrate_factor: try fast adapt down if bw estimate is
below initial bitrate * factor.

Bug: none
Change-Id: I63e1fdaac6556d8e9a961a42e11c925f9ecb9771
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147725
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28753}
2019-08-05 09:43:19 +00:00
Christoffer Rodbro
7f8dbe18ea Add config to specify raw audio priority bitrate including overhead.
Bug: webrtc:10815
Change-Id: I6a498d6c6bcd4fe4ba6ccc4d6f407d686528d946
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145333
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28590}
2019-07-17 15:28:46 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Åsa Persson
48284b86d4 BalancedDegradationSettings: Add option to configure fps based on codec type.
Bug: none
Change-Id: I43b3d976b9400a0552fee80a6a65c215c71049ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144543
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28503}
2019-07-08 11:46:25 +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
1231419785 BalancedDegradationSettings: Add option to configure QP thresholds.
Add possibility to configure low/high QP thresholds based on resolution.

Bug: none
Change-Id: Iaa3168b77678bd74feb67295d7658c0140721231
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141867
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28348}
2019-06-24 09:32:51 +00:00
“Michael
d3a4ebe332 Control rtt_mult addition cap via experiment.
Bug: webrtc:10717
Change-Id: I68f7d8216e1a1611e692dd82ba96890cad98c7de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140284
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28191}
2019-06-07 09:43:26 +00:00
Bjorn Terelius
787f4b2a71 Fix text logging of ALR detector experiment settings.
Bug: None
Change-Id: I580528dee5492eb7e3458d114218de4c315804bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138900
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28088}
2019-05-28 14:35:37 +00:00
Sebastian Jansson
d9b4f3330f Cleanup of AudioAllocationSettings flags.
Using simple IsEnabled/IsDisabled instead of the parser for Enabled/
Disabled flags to improve readability.

Bug: webrtc:9883
Change-Id: I3dbf906d49f99269f73a8ced6b3f042181228f3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138078
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28062}
2019-05-24 14:14:08 +00:00
Christoffer Rodbro
a352248c43 Add a config flag to disable the audio ALR probing request.
Bug: webrtc:10200
Change-Id: Ifc5ea100cd66a7ccd6b777259d6531c93118eeb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138064
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28035}
2019-05-23 11:23:43 +00:00
Niels Möller
04a3cc1ad9 Delete rtc_base/unittest_main.cc
Usage replaced with test/test_main.cc.

Bug: webrtc:5996
Change-Id: I65e7539f2072fb45255a3c1af0b10dd06e1701ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137805
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28010}
2019-05-21 14:44:11 +00:00
Åsa Persson
f3d828eb8e Make balanced degradation settings configurable through field trial.
Bug: none
Change-Id: Iad6dfdfdae13149bb8abe4b884e288e50aa7b73d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135102
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27892}
2019-05-09 12:13:24 +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
Jonas Olsson
8f119ca0a7 Enable experiments with audio bitrate priority.
This CL makes it possible to configure the priority of audio streams in
bitrate allocations using field trials.

It also adds the option to forcibly ignore any injected audio allocation
strategy, so that experimentation with allocation won't be blocked on
the work to remove the strategy injection.

Bug: webrtc:10603
Change-Id: Ic36ceee6c15eb0fad275866f77e2a121066e516c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135467
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27881}
2019-05-08 14:21:01 +00:00
Åsa Persson
517678cc49 Add ability to configure quality scaler settings through field trial.
optional<int> min_frames: The minimum number frames to observe to make a
                          scaling decision.
Default: kMinFramesNeededToScale in quality_scaler.cc

optional<double> initial_scale_factor: The sample period scale factor.
Default: kSamplePeriodScaleFactor in quality_scaler.cc

optional<double> scale_factor: Option to use a reduced sampling interval when
                               last check did not result in an adaptation (if
                               unset the initial_scale_factor is used).

Bug: none
Change-Id: I3bb955d1f8d7d7d49bc118361614b5aa59605231
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135125
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27860}
2019-05-06 13:20:27 +00:00
Daniel Lee
9356252bfb Ensure that we always set values for min and max audio bitrate.
(Re-land reverted cr).

Use (in order from lowest to highest precedence):
-- fixed 32000bps
-- fixed target bitrate from codec
-- explicit values from the rtp encoding parameters
-- Final precedence is given to field trial values from
   WebRTC-Audio-Allocation

Bug: webrtc:10487
Change-Id: I573e996fa1f243e673785cdbe687e029fd5cbf4a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133483
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Daniel Lee <dklee@google.com>
Cr-Commit-Position: refs/heads/master@{#27847}
2019-05-03 13:45:43 +00:00
Sebastian Jansson
e670fd9795 Adds getter for FieldTrialParameter keys.
This is useful in test tooling.

Bug: webrtc:9346
Change-Id: I4a2ac52927cfe72f392f8748d3bada1e88db1b6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134209
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27786}
2019-04-26 12:53:24 +00:00
Daniel Lee
63658d06ec Revert "Ensure that we always set values for min and max audio bitrate."
This reverts commit e47aee3b86.

Reason for revert: Breaks downstream project

Original change's description:
> Ensure that we always set values for min and max audio bitrate.
> 
> Use (in order from lowest to highest precedence):
> -- fixed 32000bps
> -- fixed target bitrate from codec
> -- explicit values from the rtp encoding parameters
> -- Final precedence is given to field trial values from
>    WebRTC-Audio-Allocation
> 
> Bug: webrtc:10487
> Change-Id: I7e289f209a927785572058b6fbfdf60fa14edf05
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126229
> Reviewed-by: Minyue Li <minyue@google.com>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Daniel Lee <dklee@google.com>
> Cr-Commit-Position: refs/heads/master@{#27667}

TBR=solenberg@webrtc.org,stefan@webrtc.org,srte@webrtc.org,crodbro@webrtc.org,minyue@webrtc.org,minyue@google.com,dklee@google.com

Change-Id: Ie975cf40e65105d1e4cfab417b220b6bfc34592b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10487
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133481
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Daniel Lee <dklee@google.com>
Cr-Commit-Position: refs/heads/master@{#27670}
2019-04-17 15:47:00 +00:00
Daniel Lee
e47aee3b86 Ensure that we always set values for min and max audio bitrate.
Use (in order from lowest to highest precedence):
-- fixed 32000bps
-- fixed target bitrate from codec
-- explicit values from the rtp encoding parameters
-- Final precedence is given to field trial values from
   WebRTC-Audio-Allocation

Bug: webrtc:10487
Change-Id: I7e289f209a927785572058b6fbfdf60fa14edf05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126229
Reviewed-by: Minyue Li <minyue@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Daniel Lee <dklee@google.com>
Cr-Commit-Position: refs/heads/master@{#27667}
2019-04-17 14:40:23 +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
Per Kjellander
5b69873cb5 Remove direct use of FieldTrials from AlrDetector
Instead use WebRtcKeyValueConfig and FieldTrialBasedConfig.
The purpose is to allow a user of GoogCC to use different settings on different instances.

BUG=webrtc:10335

Change-Id: I2f837688c9fdd341eecb44484cc784b1c80da1a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132791
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27617}
2019-04-15 12:11:36 +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