Based on the results of the experiment (b/335129329).
Bug: webrtc:15827, b/320629637, b/335129329, chromium:329396373
Change-Id: I1599f4c1be79ee3385aac1ff345168982c8278f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360960
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42895}
Current version of the dav1d decoder does not propagate any QP value to the Decoded callback. This CL updates this such that the base QP gets propagated from the frame header.
Bug: None
Change-Id: Ib7624b7e27d2c973f1821df5688cbb444e4847a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359740
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emil Vardar (xWF) <vardar@google.com>
Cr-Commit-Position: refs/heads/main@{#42790}
e.g all files in the api/test folder not including subdirectories
Bug: webrtc:42226242
Change-Id: I18d74a18f8feec41eb252faa9acfffd1d6f45ce4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#42773}
Libvpx was adjusted to support scenarios test verifies, but WebRTC tests were forgotten.
Bug: webrtc:42223649
Change-Id: I19a10c939d844d00dd564bc0a16fe21844cc7cfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357680
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42665}
In preparation for upcoming changes in GetSimulcastConfig(), which will require a vector of stream resolutions instead of just the max resolution as an input, switch tests to use CreateEncoderStreams() instead of calling GetSimulcastConfig() directly.
Bug: webrtc:351644568, b/352504711
Change-Id: I541dd54a21a8b75028cff07a250f858a47898223
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357400
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42648}
This is a cleanup of simulcast.cc. max_qp is not needed to decide simulcast config. Move setting of max QP in VideoStream one level up, to EncoderStreamFactory::CreateEncoderStreams(), where it can be set per stream.
Bug: webrtc:351644568, b/352504711
Change-Id: Ia0e3e9d90032383574dc8867b30d362e9c5df7e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357102
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42634}
This is a cleanup of simulcast.cc. bitrate_priority is not needed to decide simulcast config. Move setting of bitrate priority in VideoStream one level up, to EncoderStreamFactory::CreateEncoderStreams().
Bug: webrtc:351644568
Change-Id: I002d728ccf8d141fe4bbb32b390129ce57c830cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357101
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42629}
Current thresholds were tuned to guarantee no buffer overshoot in an extreme scenario (encoding a high complexity video in a low bitrate).
Bug: b/337757868, webrtc:351644568
Change-Id: I832b2564af6f18f06550338cc9b3618f8acdf831
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356580
Reviewed-by: Dan Tan <dwtan@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42620}
For better consistency with the rest codebase (it is min_/max_ for all params in video_encoder.h; only qp is for some reason prefixed with minimum_).
Also fixed constant names in libaom AV1 encoder wrapper (moved min from suffix to prefix, minimum -> min_).
Bug: chromium:328598314
Change-Id: I6d8521a3abff3a0595a5241c02ef4746eb4694df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356600
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42604}
Before this change the AV1 encoder wrapper converted target frame rate from double to integer with rounding to the middle. That approach resulted in a bitrate mismatch caused by rounding error. The mismatch was especially high at low frame rates. For example, at target frame rate 1.4fps the bitrate mismatch reached 40%:
out/debug/video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --framerate_fps=1.4 --width=320 --height=180 --bitrate_kbps=32 --num_frames=600
...
RESULT s0t0_bitrate_mismatch_pct: DISABLED_EncodeDecode= {39.171875,0} n%
After the change the mismatch reduced to ~2% in the same scenario:
RESULT s0t0_bitrate_mismatch_pct: DISABLED_EncodeDecode= {-2.178125,0} n%
Bug: b/337757868
Change-Id: Ia51f92b3dfdce103eed1d04cac0e084b69fa8213
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356500
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42601}
This reverts commit 86ff48adae.
Reason for revert: Speculative revert due to failing downstream tests
Original change's description:
> Rewrite simulcast config to equivalent SVC for vp9 simulcast
>
> This allows to utilize libvpx optimizations considerably improving performance.
> The change happens inside libvpx_vp9_encoder and is invisible to other parts of webrtc.
>
> This CL includes unit tests, an E2E test already exists: StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.Simulcast/VP9 in peerconnection_unittests.
>
> Bug: webrtc:347737882
> Change-Id: Ic48316ad597700ed07e594d592413cf84b6b20d4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355003
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42554}
Bug: webrtc:347737882
Change-Id: Ib84c9c0e20763348abfae838f2fb1aff31581a55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355943
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42564}
The minimum QP field will be used to signal what the QP value will be
once the encoder reach its target video quality. This will be used
in the generalized QP convergence detection.
Bug: chromium:328598314
Change-Id: I82299cd921e3c091e651218d1e3f337875176567
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355701
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/main@{#42559}
This allows to utilize libvpx optimizations considerably improving performance.
The change happens inside libvpx_vp9_encoder and is invisible to other parts of webrtc.
This CL includes unit tests, an E2E test already exists: StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.Simulcast/VP9 in peerconnection_unittests.
Bug: webrtc:347737882
Change-Id: Ic48316ad597700ed07e594d592413cf84b6b20d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355003
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42554}
This is a forward fix for https://webrtc-review.googlesource.com/c/src/+/354622 that breaks client code using nalus_length.
No-Try: true
Change-Id: Ic0fc41696e408adefe4eb8792150a64b1eab49da
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354840
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42493}
Set layer QP limits equal to QP limits in the main encoder config. This reduces number of nodes to modify if you need to change the settings.
Bug: b/337757868
Change-Id: Id7f6f9d6527903e8e22ff4fad2c974bee6e87cb3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353982
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42466}
So that this class can use propagated field trials instead of the global
Bug: webrtc:42220378
Change-Id: Ic1dba0c4967735606904329f7e9e6c09f186b809
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350641
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42326}
To allow various VideoBitrateAllocators to use propagated rather than global field trials
This relands the
https://webrtc-review.googlesource.com/c/src/+/349920
where patchset#1 is identical to the original change,
patchset#2 undoes (postpones) the expectation downstream propagates the Environment too.
Bug: webrtc:42220378
Change-Id: I4a9a32bb0926a875d37f3ba19dd5309e97546553
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350364
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42298}
To allow various VideoBitrateAllocators to use propagated rather than global field trials
Bug: webrtc:42220378
Change-Id: I52816628169a54b18a4405d84fee69b101f92f72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349920
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42288}
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}
This is a cleanup in VP9 encoder wrapper. The removed code paths were only used in tests. In prod layers are configured explicitly via VideoCodec::spatialLayers[].
Bug: webrtc:42225151
Change-Id: I1de90039488b36e3c88e788c78e675bf2ee68f9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349222
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42250}
This was a kill-switch for frame dropping in AV1 encoder. The frame dropping was enabled in June 2023. Since we have not heard about about any issues related to the frame dropping, we can remove the field trial.
Bug: webrtc:42225542
Change-Id: I4b2f1d5ff61e4ae3a4a7fc6711bb83f7d522fc6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349921
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42241}
Instead of from the global field trial string.
Bug: webrtc:42220378
Change-Id: Iddb41429e388792de02f702b4caa35689c57d9e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347720
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42201}
The width and height of mapped_buffer must match the d_w and d_h members
of frame_to_encode_, which is passed to aom_codec_encode().
Bug: b:330482827
Change-Id: I85d8c82133768685565f165eafc893c42dc40b12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345807
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#42036}
This CL partly restores the changes that were introduced in
https://webrtc-review.googlesource.com/c/src/+/344681
The predefined SdpVideoFormat for AV1 causes some backwards
compatibility issues with downstream projects that are using
the preliminary codec name AV1X.
Bug: b/333007070
Change-Id: I2d4df241d47b399b0012e6095dd6c2445e60e2c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345941
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42011}
This changes the libvpx VP9 encoder to generate the scalability mode based on the current encoding parameters when using layer activation.
Tested: Ran with L3T3_KEY reduced to L2T3_KEY and L1T3 due to bandwidth or layer activation. Added unit tests.
Bug: webrtc:15892
Change-Id: Iaedca4ea5fc3a692996666ceaf0d6aa03fb058a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344760
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42007}