Commit graph

1302 commits

Author SHA1 Message Date
Mirko Bonadei
fa5ad8c0b5 Revert "AV1: change update freq and disable denoiser explicitly."
This reverts commit abf5701c37.

Reason for revert: Breaks downstream tests.

Original change's description:
> AV1: change update freq and disable denoiser explicitly.
>
> Change speed/thread settings for faster encoding.
>
> Change-Id: I74d93eac26ae8700a48c437fe235643810de1ca0
> Bug: None
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206480
> Reviewed-by: Marco Paniconi <marpan@webrtc.org>
> Reviewed-by: Marco Paniconi <marpan@google.com>
> Commit-Queue: Jerome Jiang <jianj@google.com>
> Cr-Commit-Position: refs/heads/master@{#33208}

TBR=jianj@google.com,marpan@google.com,marpan@webrtc.org

Change-Id: I47b65e1c78ccb055238a44886dac87f8fc2f5330
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206644
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33213}
2021-02-10 09:30:10 +00:00
Jerome Jiang
abf5701c37 AV1: change update freq and disable denoiser explicitly.
Change speed/thread settings for faster encoding.

Change-Id: I74d93eac26ae8700a48c437fe235643810de1ca0
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206480
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#33208}
2021-02-09 20:36:37 +00:00
Hua, Chunbo
a0848ddeff Correct SpatialLayer in VP9 unittest.
Bug: None
Change-Id: If8b26c8e7afa380f109d71a93b78bad784da34ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205961
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33187}
2021-02-08 10:13:18 +00:00
Ilya Nikolaevskiy
483b31c231 Reland "Enable Video-QualityScaling experiment by default"
This time exclude iOS from the default behaviour.

Bug: webrtc:12401
Change-Id: Ib1f77123b72c3365591b56455332b3d97b307b26
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205006
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33173}
2021-02-05 09:49:13 +00:00
Danil Chapovalov
b5823055be In VP9 encoder avoid crashing when encoder produce an unexpected frame
Since for such frame SvcController haven't setup how buffer should be
referenced and updated, the frame would likely have unexpected configuration.
Log an error to note resource have been wasted produce it and drop such frame.

Bug: webrtc:11999
Change-Id: I1784403e67b7207092d46016510460738994404e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205140
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33148}
2021-02-03 14:56:09 +00:00
Åsa Persson
9111bd18b1 LibvpxVp8Encoder: add option to configure resolution_bitrate_limits.
Bug: none
Change-Id: Ia01d630fc95e19a4a08cd7a004238c22d823b4dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205521
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33144}
2021-02-03 11:25:32 +00:00
Artem Titov
c8421c4c3e Replace rtc::ThreadChecker with webrtc::SequenceChecker
Bug: webrtc:12419
Change-Id: I825c014cc1c4b1dcba5ef300409d44859e971144
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205002
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33136}
2021-02-02 14:56:27 +00:00
Ilya Nikolaevskiy
d6604df27f Revert "Enable Video-QualityScaling experiment by default"
This reverts commit 066b5b6ed7.

Reason for revert: Regressions on iOS testbots.

Original change's description:
> Enable Video-QualityScaling experiment by default
>
> Bug: webrtc:12401
> Change-Id: Iebf3130e785892bb9fddf1012bc46027a21085a4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204000
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33091}

TBR=ilnik@webrtc.org,asapersson@webrtc.org

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

Bug: webrtc:12401
Change-Id: I489b805c7741b63c22c16cfce03347179a3e2602
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205001
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33123}
2021-02-01 13:20:49 +00:00
Sergio Garcia Murillo
3faea70d1a allow empty scalability mode in AV1 encoder
Bug: chromium:1170699
Change-Id: I74c633e74c85c3b940d6302cdc8fa319e187b1e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204221
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33122}
2021-02-01 13:00:09 +00:00
Åsa Persson
c91c4233e3 LibvpxVp9Encoder: add option to configure resolution_bitrate_limits.
Bug: none
Change-Id: Icdd7333296d652b1e0c159226df702084303475c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204701
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33121}
2021-02-01 11:48:00 +00:00
Andrey Logvin
7864600a6e Add absl_deps field for rtc_test and rtc_executable
To be able to build these targets in chromium we need to replace all abseil dependencies with "//third_party/abseil-cpp:absl".

Bug: webrtc:12404
Change-Id: Ie0f6af73f2abc73e5744520cfd9a6414e2f948e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202762
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33108}
2021-01-29 16:40:49 +00:00
Ilya Nikolaevskiy
066b5b6ed7 Enable Video-QualityScaling experiment by default
Bug: webrtc:12401
Change-Id: Iebf3130e785892bb9fddf1012bc46027a21085a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204000
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33091}
2021-01-28 18:17:03 +00:00
Jerome Jiang
103876f379 av1: turn off a few tools that are not used for rtc
Explicitly turn off obmc, warped motion, global motion and ref frame mv.

Bug: chromium:1095763, chromium:1170346
Change-Id: I19bc4fceef4cd5e35ea6699e6af883af244f8954
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203900
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#33075}
2021-01-26 17:49:34 +00:00
Florent Castelli
54fb32a15e IvfFileReader: Fix SpatialIndex values
The SpatialIndex value from an EncodedImage is 0-based, but values were
off by 1.

Bug: none
Change-Id: Ie74e6450ddef1cfaee68fa230c441030fa86a64a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203525
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33067}
2021-01-25 13:11:45 +00:00
Danil Chapovalov
11215febb9 Require scalability mode to initialize av1 encoder.
To make VideoCodec::scalability_mode the only option to set and
change the scalability structure, for easier maintainability.

Bug: webrtc:11404
Change-Id: I6570e9a93ddf2897ff7584c5d20a246346e853e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192361
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33056}
2021-01-22 09:46:52 +00:00
Erik Språng
03eed7c8d0 Fixes issue triggered by WebRTC-VP9-PerformanceFlags trial.
Using WebRTC-VP9-PerformanceFlags and settings a multi-layer config,
and then configuring the codec in non-svc mode would cause us to not
set the cpu speed in libvpx. For some reason, that could trigger a
crash in the encoder.

This CL fixes that, and adds new test coverage for the code affected
byt the trial.

Bug: chromium:1167353, webrtc:11551
Change-Id: Iddb92fe03fc12bac37717908a8b5df4f3d411bf2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202761
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33051}
2021-01-21 10:29:05 +00:00
Danil Chapovalov
ba91dbcb3e In SVC controllers add support for frames dropped by encoder
by updating flag that T1 frame can be referenced when it is encoded
rather than when it is sent for encoding.
Otherwise when encoder drops T1 frame, configuration for following T2 frame would
still try to reference that absent T1 frame leading to invalid references.

Bug: None
Change-Id: I6398275971596b0618bcf9c926f0282f74120976
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202030
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33002}
2021-01-15 17:17:45 +00:00
Mirko Bonadei
e5f4c6b8d2 Reland "Refactor rtc_base build targets."
This is a reland of 69241a93fb

Fix: The problem was related to NO_MAIN_THREAD_WRAPPING, which
affects https://source.chromium.org/chromium/chromium/src/+/master:third_party/webrtc/rtc_base/thread.cc;l=257-263;drc=7acc2d9fe3a6e3c4d8881d2bdfc9b8968a724cd5.
The original CL didn't attach the definition of the macro
NO_MAIN_THREAD_WRAPPING when building for Chromium (which doesn't have
to be related to //rtc_base anymore but to //rtc_base:threading).

Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
>   break a circular dependency (is has been extracted from
>   //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
>   break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}

Bug: webrtc:9987
Change-Id: I7cdf49d2aac8357f1f50f90010bf2c2f62fa19f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202021
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33001}
2021-01-15 17:00:05 +00:00
Sergio Garcia Murillo
1528e2b3a7 Set AV1E_SET_ERROR_RESILIENT_MODE on T1 and T2 enhanced layers
TBR=marpan@webrtc.org

Bug: webrtc:11404
Change-Id: I21c97861d6df06a0e50641a9fdf26d56e50c2030
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201627
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/master@{#32997}
2021-01-15 11:14:00 +00:00
Mirko Bonadei
7acc2d9fe3 Revert "Refactor rtc_base build targets."
This reverts commit 69241a93fb.

Reason for revert: Breaks WebRTC roll into Chromium.

Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
>   break a circular dependency (is has been extracted from
>   //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
>   break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}

TBR=mbonadei@webrtc.org,hta@webrtc.org

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

No-Try: True
Bug: webrtc:9987
Change-Id: I1e36ad64cc60092f38d6886153a94f1a58339256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201840
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32986}
2021-01-14 21:27:38 +00:00
Erik Språng
c12f625938 Adds VideoDecoder::GetDecoderInfo()
This adds a new way to poll decoder metadata.
A default implementation still delegates to the old methods.
Root call site is updates to not use the olds methods.

Follow-ups will dismantle usage of the olds methods in wrappers.

Bug: webrtc:12271
Change-Id: Id0fa6863c96ff9e3b849da452d6540e7c5da4512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196520
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32976}
2021-01-14 13:33:22 +00:00
Danil Chapovalov
b942d45110 Fill fps allocation by LibaomAv1Encoder::GetEncoderInfo
Absent fps allocation imply single layer stream which confuses bitrate adjuster.
As a result bitrate adjuster turned off S0T1 and S0T2 layers for the L3T3 structure.

Bug: webrtc:12148
Change-Id: I5b3a7b44322f347f41dd8858b3d703827e69dd72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201384
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32952}
2021-01-12 17:26:40 +00:00
Niels Möller
a68bfc5537 Delete KeepBufferRefs helpers, and use of rtc::Bind.
The rtc::Bind usages are replaced with lambdas with copy-capture
of the ref pointers.

Bug: webrtc:11339
Change-Id: I2fb544fcd2780feac3d725993c360df91899b532
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201201
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32946}
2021-01-12 12:35:38 +00:00
Mirko Bonadei
69241a93fb Refactor rtc_base build targets.
The "//rtc_base:rtc_base" build target has historically been one of the
biggest targets in the WebRTC build. Big targets are the main source of
circular dependencies and non-API types leakage.

This CL is a step forward into splitting "//rtc_base:rtc_base" into
smaller targets (as originally started in 2018).

The only non-automated changes are (like re-wiring the build system):
* The creation of //rtc_base/async_resolver.{h,cc} which allows to
  break a circular dependency (is has been extracted from
  //rtc_base/net_helpers.{h,cc}).
* The creation of //rtc_base/internal/default_socket_server.{h,cc} to
  break another circular dependency.

Bug: webrtc:9987
Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32941}
2021-01-11 18:32:30 +00:00
philipel
360da05ed1 Remove webrtc::VideoDecoder::PrefersLateDecoding.
This is just general cleanup.

The assumed behavior is late decoding, and this function is not used to make any decision (except in the deprecated jitter buffer).

Bug: webrtc:12271
Change-Id: Ifb48186d55903f068f25e44c5f73e7a724f6f456
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/200804
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32940}
2021-01-11 18:02:25 +00:00
Niels Möller
6afa794b6e Delete deprecated H264BitstreamParser methods
Bug: webrtc:10439
Change-Id: I1513907f03f9adfcf5657298e69d60519af764ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198121
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32934}
2021-01-11 09:31:54 +00:00
Per Kjellander
f86cf4c2de Add support for VideoLayersAllocation for Vp9 scv/ksvc and none scalable
VideoCodecInitializer::VideoEncoderConfigToVideoCodec is modified to always set correct frame rate, width and height on spatial layer 0 so the rest of the code does not need to differentiate between scalable/none scalable codecs.


Bug: webrtc:12000
Change-Id: I5a068b98ca2038621205f55e4024f949ab51587a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198540
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32890}
2020-12-30 16:45:03 +00:00
Niels Möller
08d2c2bf46 Delete unneeded dependencies on the Module abstraction
Bug: webrtc:7219
Change-Id: I1bcbab7e30f9964798a093e888b07d758cf226e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198124
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32865}
2020-12-21 09:09:57 +00:00
Jerome Jiang
39d1f74909 Decide Av1 num of threads on frame size and available cores.
Change-Id: I65c40a123ad848bc175311f9d9e4d2bd28734aa2
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196681
Commit-Queue: Jerome Jiang <jianj@google.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32850}
2020-12-17 05:36:48 +00:00
Markus Handell
334b1fd321 VideoReceiveStream: eliminate task post in decode path.
VideoReceiveStream2 unnecessarily posts a decode complete call to
its own queue while already being executed on it. A popular use
case in downstream project has a large amount of decoders
in use so the cost of this is multiplied by the number of active
decoders.

Fix this by removing the unnecessary task post. To allow for this,
this change also changes the frame buffer to call out to it's
handler without any locks held.

Bug: webrtc:12297
Change-Id: Ib2e26445458228a44c53dad9d585d4025f2f2945
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197420
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32845}
2020-12-16 11:25:41 +00:00
Andrey Logvin
f964dea554 Lower HighBitrateAV1 liabom test quality threshold
Lowering a bit since it is currently failing after one of CLs from https://aomedia.googlesource.com/aom.git/+log/87c414ed32..43927e4611

The error is "error: Expected: (video_stat.min_ssim) > (quality_thresholds->min_min_ssim), actual: 0.919629 vs 0.92"

Bug: None
Change-Id: I35e1e989961c6794a7f5f2015f5a8a786f1e25f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197808
Reviewed-by: Jerome Jiang <jianj@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32844}
2020-12-16 09:51:51 +00:00
Erik Språng
ebe5acb27a VideoCodecTextFixture and YuvFrameReader improvements.
Adds ability to specify desired frame size separate from actual clip
resolution, as well as clip and desired fps.
This allows e.g. reading an HD clip but running benchmarks in VGA, and
to specify e.g. 60fps for the clip but 30for encoding where frame
dropping kicks in so that motion is actually correct rather than just
plaing the clip slowly.

Bug: webrtc:12229
Change-Id: I4ad4fcc335611a449dc2723ffafbec6731e89f55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195324
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32839}
2020-12-15 23:18:06 +00:00
Erik Språng
cc02721090 Extend LibvpxInterface with VP9 support and use it from LibvpxVp9Encoder
Bug: webrtc:12274
Change-Id: I7a66a91f6a21ba482347af3c8af53544f9eb2269
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196900
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32822}
2020-12-13 18:07:05 +00:00
Erik Språng
0186d2d626 Splits vp9_impl into libvpx_vp9_encoder and libvpx_vp9_decoder.
Also moves the LibvpxVp8Interface from codec/vp8 to codec/interface and
drops vp8 from the name.

Follow-up CLs will wire up actual usage in the new classes through the
interface so that we can unit test them more easily.

Bug: webrtc:12274
Change-Id: I95f66e90245d9320e5fc23cdc845fbeb2648b38b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196522
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32816}
2020-12-10 19:31:11 +00:00
philipel
cb327d9162 Remove use of inter_layer_predicted in FrameBuffer2.
Now that RtpVp9RefFinder sets an additional reference on the frame instead of marking it as inter_layer_predicted it is no longer used.

Bug: webrtc:12206
Change-Id: I10e0930336eafc32dc86feb2f690cb131e55be2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196740
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32814}
2020-12-10 14:18:09 +00:00
philipel
0cb7326b54 Stop using inter_layer_predicted flag for VP9.
Instead of signaling an inter layer dependency with the inter_layer_prediction flag we instead flatten the frame IDs so that an inter layer dependency can be signaled as a regular frame reference.

Bug: webrtc:12206, webrtc:12221
Change-Id: I0390fd3d0f5494cde59eece227db938dbc5d7992
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196648
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32808}
2020-12-09 09:45:50 +00:00
philipel
2f0dcc8eb9 Clean up RtpVp9RefFinder unittests.
Bug: webrtc:12221
Change-Id: I2ad77475bd62775452c7b81ba7ad193bea66cc8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196527
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32794}
2020-12-08 10:05:33 +00:00
Erik Språng
3931591476 Reland "Adds experimental libvpx VP9 speed settings."
This is a reland of 6e7167456b

Patch set 1 is the original.
Later patch sets fix a parsing bug, and adds a new flag which enables
or disabled the ability to set separate per spatial layer speed
(use_per_layer_speed).

Original change's description:
> Adds experimental libvpx VP9 speed settings.
>
> Using the field trial WebRTC-VP9-PerformanceFlags, this CL allows you to
> configure the libvpx VP9 encoder with a list of flags to affect the
> quality vs speed tradeoff. This CL adds support for:
>
> * Speed (effort), for the temporal base layer frames
> * Speed for higher (non-base) layer frames
> * De-blocking (as part of the loopfilter) enabled for:
>   0 = all frames
>   1 = all but frames from the highest temporal layer
>   2 = no frames
>
> Each entry in the list has a threshold in min number of pixels needed
> for settings in the entry to apply.
>
> Example: Two spatial layers (180p, 360p) with three temporal
> layers are configured. Field trial "WebRTC-VP9-PerformanceFlags" set to:
> "use_per_layer_speed,min_pixel_count:0|129600,base_layer_speed:5|7,high_layer_speed:8|8,deblock_mode:1|2"
> This translates to:
> S0:
>   - TL0: Speed 5, deblocked
>   - TL1: Speed 8, deblocked
>   - TL2: Speed 8, not deblocked
> S1:
>   - TL0: Speed 7, not deblocked
>   - TL1: Speed 8, not deblocked
>   - TL2: Speed 8, not deblocked
>
> Bug: webrtc:11551
> Change-Id: Ieef6816d3e0831ff53348ecc4a90260e2ef10422
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188461
> Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32749}

Bug: webrtc:11551
Change-Id: Ie7c703eb122197235d8ce77cb72db7a347382468
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196345
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32780}
2020-12-06 19:39:57 +00:00
Erik Språng
ead570c963 Revert "Adds experimental libvpx VP9 speed settings."
This reverts commit 6e7167456b.

Reason for revert: Unexpected perf change

Original change's description:
> Adds experimental libvpx VP9 speed settings.
>
> Using the field trial WebRTC-VP9-PerformanceFlags, this CL allows you to
> configure the libvpx VP9 encoder with a list of flags to affect the
> quality vs speed tradeoff. This CL adds support for:
>
> * Speed (effort), for the temporal base layer frames
> * Speed for higher (non-base) layer frames
> * De-blocking (as part of the loopfilter) enabled for:
>   0 = all frames
>   1 = all but frames from the highest temporal layer
>   2 = no frames
>
> Each entry in the list has a threshold in min number of pixels needed
> for settings in the entry to apply.
>
> Example: Two spatial layers (180p, 360p) with three temporal
> layers are configured. Field trial "WebRTC-VP9-PerformanceFlags" set to:
> "min_pixel_count:0|129600,base_layer_speed:5|8,high_layer_speed:7|8,deblock_mode:1|2"
> This translates to:
> S0:
>   - TL0: Speed 5, deblocked
>   - TL1: Speed 8, deblocked
>   - TL2: Speed 8, not deblocked
> S1:
>   - TL0: Speed 7, not deblocked
>   - TL1: Speed 8, not deblocked
>   - TL2: Speed 8, not deblocked
>
> Bug: webrtc:11551
> Change-Id: Ieef6816d3e0831ff53348ecc4a90260e2ef10422
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188461
> Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32749}

TBR=sprang@webrtc.org,ssilkin@webrtc.org,mhoro@webrtc.org

Change-Id: If910963441ac1a0e002aac7066791c7cc7764a1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11551
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196344
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32762}
2020-12-03 16:06:13 +00:00
philipel
10f76ac226 Move RtpVp9RefFinder unittests into its own file.
Bug: webrtc:12221
Change-Id: I72bb25503d2894aae596426cb40764246c087767
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196342
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32760}
2020-12-03 15:28:21 +00:00
Erik Språng
6e7167456b Adds experimental libvpx VP9 speed settings.
Using the field trial WebRTC-VP9-PerformanceFlags, this CL allows you to
configure the libvpx VP9 encoder with a list of flags to affect the
quality vs speed tradeoff. This CL adds support for:

* Speed (effort), for the temporal base layer frames
* Speed for higher (non-base) layer frames
* De-blocking (as part of the loopfilter) enabled for:
  0 = all frames
  1 = all but frames from the highest temporal layer
  2 = no frames

Each entry in the list has a threshold in min number of pixels needed
for settings in the entry to apply.

Example: Two spatial layers (180p, 360p) with three temporal
layers are configured. Field trial "WebRTC-VP9-PerformanceFlags" set to:
"min_pixel_count:0|129600,base_layer_speed:5|8,high_layer_speed:7|8,deblock_mode:1|2"
This translates to:
S0:
  - TL0: Speed 5, deblocked
  - TL1: Speed 8, deblocked
  - TL2: Speed 8, not deblocked
S1:
  - TL0: Speed 7, not deblocked
  - TL1: Speed 8, not deblocked
  - TL2: Speed 8, not deblocked

Bug: webrtc:11551
Change-Id: Ieef6816d3e0831ff53348ecc4a90260e2ef10422
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188461
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32749}
2020-12-02 19:20:57 +00:00
philipel
39f09b4c83 Handle AV1 without DependencyDescriptor.
Bug: webrtc:12221
Change-Id: I757c9407d71131a15e5d6b274e16c7a639512761
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196080
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32729}
2020-12-01 12:36:42 +00:00
philipel
4e702169e4 Break RtpFrameReferenceFinder into descriptor specific parts.
This CL breaks out descriptor specific parts into separate classes. All logic in the newly added classes is just copy pasted from the (previously massive) RtpFrameReferenceFinder with the exception of how frames are being returned, which is now done via return value rather than a callback. Basically, all interesting changes have been made in the RtpFrameReferenceFinder.

Bug: webrtc:12221
Change-Id: I5f958d2fbf4b77ba11c3c6c01d8d0d80e325be60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195448
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32717}
2020-11-27 17:59:28 +00:00
Danil Chapovalov
4005e5abb8 Add av1 svc configuration for target bitrates
This configuration mostly copies vp9 configuration for regular video,
but is done separately to allow tune av1 svc bitrates independently of vp9.

Bug: webrtc:12148
Change-Id: Icd11817ada8f9b6135ee2da57204eadb50de3954
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195329
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32713}
2020-11-27 13:32:05 +00:00
Danil Chapovalov
9a5e21da68 in Vp8 encoder fill resolution into codec agnostic structure
so that it will be filled in the dependency descriptor rtp header extension

Bug: webrtc:10342
Change-Id: Ifaf4963ca84f6d495287959746686ae3dcd176d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168767
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32692}
2020-11-25 12:49:51 +00:00
philipel
a62fa7378f Removed unused H264 specific code from RtpFrameReferenceFinder.
Bug: webrtc:12221
Change-Id: I238ad9c0cb53720a91e0722d61d1704586b56398
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195005
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32684}
2020-11-24 13:51:36 +00:00
Mirko Bonadei
20e4c80fbe Reland "Introduce RTC_NO_UNIQUE_ADDRESS."
This is a reland of f5e261aaf6

This CL disables RTC_NO_UNIQUE_ADDRESS on MSan builds since
there have been some issues.

Original change's description:
> Introduce RTC_NO_UNIQUE_ADDRESS.
>
> This macro introduces the possibility to suggest the compiler that a
> data member doesn't need an address different from other non static
> data members.
>
> The usage of a macro is to maintain portability since at the moment
> the attribute [[no_unique_address]] is only supported by clang
> with at least -std=c++11 but it should be supported by all the
> compilers starting from C++20.
>
> Bug: webrtc:11495
> Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32246}

Bug: webrtc:11495, webrtc:12218
Change-Id: I4e6c7cc37d3daffad2407c9a2acfa897fa5b426a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189968
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32668}
2020-11-23 11:29:36 +00:00
Danil Chapovalov
cf1308fddd Ignore frame type when calculating generic frame dependencies.
When spatial scalability is used, both vpx and aom set key frame flag
for all spatial layers of the first frame, while rtp code expect it to
be set only on the frame without spatial dependencies.

That creates confusion for the frame dependency calculator.
Simplest solution seems to ignore that confusing signal and instead
rely encoder wrappers update frame buffer usages when key frame is generated.

Bug: webrtc:11999
Change-Id: Ica24f1d8d42d32dd24664beabf32ac24872cd15a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194002
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32667}
2020-11-23 10:52:06 +00:00
philipel
a65d78517a Don't use VP9 specific concepts to combine spatial layer frames in FrameBuffer2.
The Dependency Descriptor use unique ids for every frame, meaning spatial layer frames will all have unique ids.

Bug: webrtc:10342
Change-Id: I241a8b3959e27bd918ae7a907ab5158fe9dcd7a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194327
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32655}
2020-11-20 17:59:26 +00:00
philipel
716a3c9ff2 Remove unused includes from RtpFrameReferenceFinder.
Bug: none
Change-Id: I4fc5f70e3e532c3735a97a9d7fd8f6f51d7d2a7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194333
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32654}
2020-11-20 17:35:28 +00:00