Commit graph

1156 commits

Author SHA1 Message Date
Erik Språng
969ccf0e12 Reland "VP9 decoder: Sets thread count based on resolution, reinit on change."
This is a reland of d592575698

Patchset 2 is a reland of
https://webrtc-review.googlesource.com/c/src/+/177012

Patchset 3 is a fix for a potential crash when InitDecode()is called from
VideoStreamDecoderImpl::GetDecoder(), where the decoder_settings
parameter is a but surprisingly set to nullptr.

Original change's description:
> VP9 decoder: Sets thread count based on resolution, reinit on change.
>
> Previously, number of decoder threads for VP9 were always set to 8 but
> with a cap at number of cores. This was done since we "can't know" the
> resolution that will be used.
>
> With this change, we now intialize the number of threads based on
> resolution given in InitDecode(). If a resolution change happens in
> flight, it requires a keyframe. We therefore parse the header from
> any key frame and if it has a new resolution, we re-initialize the
> decoder.
>
> The number of threads used is based on pixel count. We set one thread
> as target for 1280x720, and scale up lineraly from there. The 8-thread
> cap is gone, but still limit it core count.
>
> This means for instance: 1 <= 720p, 2 for 1080p, 4 for 1440p, 9 for 4K.
>
> Bug: webrtc:11551
> Change-Id: I14c169a6c651c50bd1b870c4b22bc4495c8448fd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174460
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31507}

Bug: webrtc:11551
Change-Id: I2b4b146d0b8319f07ce1660202d6aa4b374eb015
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177246
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31527}
2020-06-15 19:14:52 +00:00
Erik Språng
ee4f5cca00 Wires up trial for smarter postproc settings in non-arm VP8 decoder.
Params and format is the same as for existing ARM experiment, but a new
group name is created for non-ARM experiment.

Bug: webrtc:11551
Change-Id: I3a6c0f07a8c1d714477ae4703c16e48df36ac10e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177102
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31524}
2020-06-15 15:55:39 +00:00
Danil Chapovalov
90dc5dae2c Factor encoded frame generation code into own target
Show it can make vp9 tests cleaner too.

Bug: None
Change-Id: I8333a61dec1ef90ade9faffea94e1555ccbfcfaa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177013
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31523}
2020-06-15 12:25:06 +00:00
philipel
9465978a3b Remove framemarking RTP extension.
BUG=webrtc:11637

Change-Id: I47f8e22473429c9762956444e27cfbafb201b208
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176442
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31522}
2020-06-15 11:18:00 +00:00
Erik Språng
ef377ec6d5 Revert "VP9 decoder: Sets thread count based on resolution, reinit on change."
This reverts commit d592575698.

Reason for revert: May cause crashes.

Original change's description:
> VP9 decoder: Sets thread count based on resolution, reinit on change.
> 
> Previously, number of decoder threads for VP9 were always set to 8 but
> with a cap at number of cores. This was done since we "can't know" the
> resolution that will be used.
> 
> With this change, we now intialize the number of threads based on
> resolution given in InitDecode(). If a resolution change happens in
> flight, it requires a keyframe. We therefore parse the header from
> any key frame and if it has a new resolution, we re-initialize the
> decoder.
> 
> The number of threads used is based on pixel count. We set one thread
> as target for 1280x720, and scale up lineraly from there. The 8-thread
> cap is gone, but still limit it core count.
> 
> This means for instance: 1 <= 720p, 2 for 1080p, 4 for 1440p, 9 for 4K.
> 
> Bug: webrtc:11551
> Change-Id: I14c169a6c651c50bd1b870c4b22bc4495c8448fd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174460
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31507}

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

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

Bug: webrtc:11551
Change-Id: Id235c8ded83b3e1fc1d132c8f56c9f20001f6f22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177242
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31521}
2020-06-15 10:11:09 +00:00
Erik Språng
aa5c1e8fd2 Revert "Adjusts allowable thread count for vp9 decoders."
This reverts commit 26e5046951.

Reason for revert: Part of change that may cause crashes.

Original change's description:
> Adjusts allowable thread count for vp9 decoders.
> 
> Set 2 thread as target for 1280x720 pixel count, and then scale up
> linearly from there - but cap at physical core count.
> For common resolutions this results in:
> 1 for 360p
> 2 for 720p
> 4 for 1080p
> 8 for 1440p
> 18 for 4K
> 
> Bug: webrtc:11551
> Change-Id: I666bd971eccddee096749f20d3b08eb40fe868ad
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177012
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31513}

TBR=sprang@webrtc.org,kron@webrtc.org

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

Bug: webrtc:11551
Change-Id: I4ea5166efeed3d55255a0243a69deb584a0e19e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177240
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31517}
2020-06-15 08:38:54 +00:00
Erik Språng
26e5046951 Adjusts allowable thread count for vp9 decoders.
Set 2 thread as target for 1280x720 pixel count, and then scale up
linearly from there - but cap at physical core count.
For common resolutions this results in:
1 for 360p
2 for 720p
4 for 1080p
8 for 1440p
18 for 4K

Bug: webrtc:11551
Change-Id: I666bd971eccddee096749f20d3b08eb40fe868ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177012
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31513}
2020-06-12 13:52:19 +00:00
Danil Chapovalov
222fdfdace in AV1 Encoder remove hack of removing temporal delimiter OBU
Bug: webrtc:11174
Change-Id: I70e3ab1af92562b44f974aa415e0215e06fcf1cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177009
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31512}
2020-06-12 12:42:09 +00:00
Johannes Kron
7ff6355b88 Add decoder support for VP9 profile 1 I444
libvpx already supports VP9 profile 1. Add code to enable SDP negotiation of receiving VP9 profile 1.

Bug: webrtc:11555
Change-Id: I35d12d159a1414aac744f202331d3a9c4a84f5af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176322
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31509}
2020-06-12 05:17:24 +00:00
Erik Språng
d592575698 VP9 decoder: Sets thread count based on resolution, reinit on change.
Previously, number of decoder threads for VP9 were always set to 8 but
with a cap at number of cores. This was done since we "can't know" the
resolution that will be used.

With this change, we now intialize the number of threads based on
resolution given in InitDecode(). If a resolution change happens in
flight, it requires a keyframe. We therefore parse the header from
any key frame and if it has a new resolution, we re-initialize the
decoder.

The number of threads used is based on pixel count. We set one thread
as target for 1280x720, and scale up lineraly from there. The 8-thread
cap is gone, but still limit it core count.

This means for instance: 1 <= 720p, 2 for 1080p, 4 for 1440p, 9 for 4K.

Bug: webrtc:11551
Change-Id: I14c169a6c651c50bd1b870c4b22bc4495c8448fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174460
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31507}
2020-06-11 17:43:27 +00:00
Ilya Nikolaevskiy
2899b3bc3d Allow HVGA Vp9 SVC to have 2 spatial layers and remove excessive rounding
Bug: webrtc:11652
Change-Id: I8bfa91c3115d6ebb17beefbb2a5e51efbbd599e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177000
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31502}
2020-06-11 13:50:16 +00:00
Danil Chapovalov
24263f4ffb Embed FrameDependencyTemplate builder helpers directly into the struct
Bug: None
Change-Id: I4c13bdabd08dd6a6011cb534c765c1dd09f218d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176843
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31500}
2020-06-11 13:43:51 +00:00
Jerome Jiang
e366045375 Add implementation name for libaom decoder
Change-Id: I96d07727ef41c7f2ab0e35d89415c5a8ec4393b4
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176940
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31495}
2020-06-11 04:45:42 +00:00
Ilya Nikolaevskiy
989229d6fc [VP9 SVC] Cleanup external reference control workaround
Bug: chromium:1027108,webrtc:11319
Change-Id: I4d8bb0858204fa4f911e954e32d51537291db5e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175139
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31485}
2020-06-10 12:02:50 +00:00
Danil Chapovalov
0e2dd1271e Add av1 structures for 3 spatial and/or 3 temporal layers
Bug: webrtc:11404
Change-Id: I2a2a40202b1dc8bec66baffc8883e59b9be9bade
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176518
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31478}
2020-06-09 14:50:21 +00:00
Danil Chapovalov
a48dd43fe1 Add builder setters for ScalableVideoStructure::LayerFrameConfig
Bug: None
Change-Id: I19721f87b9f4641e093dc51f9c023b0493adcf97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176702
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31473}
2020-06-09 10:31:35 +00:00
Ilya Nikolaevskiy
09eb6e249d [VP9 SVC] Round spatial layers dimensions to ensure integer scaling factors are used
Bug: webrtc:11652
Change-Id: Id3642d607f62b72a567d521d9874b8588c2ce429
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176517
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31465}
2020-06-08 19:00:30 +00:00
Mirko Bonadei
2dcf348011 Use absl_deps in order to preapre to the Abseil component build release.
Bug: webrtc:1046390
Change-Id: Ia35545599de23b1a2c2d8be2d53469af7ac16f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176502
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31463}
2020-06-08 12:59:40 +00:00
Danil Chapovalov
4091d34171 Add av1 scalability structures for 2 spatial and 2 temporal layers.
Bug: webrtc:11404
Change-Id: I0a2257b88666a0158a85162974430c2c08d61b40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176501
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31460}
2020-06-08 10:23:23 +00:00
Markus Handell
f70fbc8411 Introduces rtc_base/synchronization/mutex.h.
This change introduces a new non-reentrant mutex to WebRTC. It
enables eventual migration to Abseil's mutex.

The mutex types supportable by webrtc::Mutex are

- absl::Mutex
- CriticalSection (Windows only)
- pthread_mutex (POSIX only)

In addition to introducing the mutexes, the CL also changes
PacketBuffer to use the new mutex instead of rtc::CriticalSection.

The method of yielding from critical_section.cc was given a
mini-cleanup and YieldCurrentThread() was added to
rtc_base/synchronization/yield.h/cc.

Additionally, google_benchmark benchmarks for the mutexes were added
(test courtesy of danilchap@), and some results from a pthread/Abseil
shootout were added showing Abseil has the advantage in higher
contention.

Bug: webrtc:11567, webrtc:11634
Change-Id: Iaec324ccb32ec3851bf6db3fd290f5ea5dee4c81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176230
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31443}
2020-06-04 09:55:12 +00:00
Danil Chapovalov
aa40b89006 Add Scalability structure tests for individual frame configurations
Bug: webrtc:10342
Change-Id: Ia768f6b37a4e9b0ce66139e799833746054e3a4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176443
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31438}
2020-06-04 07:32:06 +00:00
Jerome Jiang
7f7fb830ba Reland "Add av1 test running real video clips."
This reverts commit 6958d2c6f0.

Disable the test on iOS.

Bug: None
Change-Id: Ie42fada10a92bd4a802c6c79caeb4965410ddf6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176461
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31437}
2020-06-04 06:32:46 +00:00
Jerome Jiang
6813767e52 Av1 wrapper: only use speed 6 on cores > 2
Bug: None
Change-Id: Iacddfbca1d2579c3a397339a1c18008a10238348
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176463
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31436}
2020-06-04 03:23:54 +00:00
Jerome Jiang
1220c39953 av1: add a few controls to wrapper
this will speed up realtime encoding.

Change-Id: I39d42f3c195d2f520f04f7357e72b0903905ea81
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176383
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31431}
2020-06-03 20:56:00 +00:00
Danil Chapovalov
649aa3416e in libaom decoder use public control function instead of internal one
to unblock rolling new version where private function is no longer available

Bug: None
Change-Id: I9c35fede3f331f7688cc97acfbda1250b42348a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176441
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31427}
2020-06-03 15:03:07 +00:00
Danil Chapovalov
40f1fe9cff Add unittests to validate scalability structures without encoder
Bug: webrtc:10342
Change-Id: I66407e635502b7c87f8d4ab49c95f5c1326da4a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176412
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31423}
2020-06-03 12:59:25 +00:00
Danil Chapovalov
4b1ab57283 Add av1 test with spatial scalability.
Bug: webrtc:11404
Change-Id: I6faa72a86d6f48b21b1e1cd6c2a1d748e168d018
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176366
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31410}
2020-06-02 13:27:57 +00:00
Ying Wang
6958d2c6f0 Revert "Add av1 test running real video clips."
This reverts commit 3a2be87b80.

Reason for revert: break internal test

Original change's description:
> Add av1 test running real video clips.
> 
> Bug: None
> Change-Id: I93bb8b3bf15d607d061aa74ad9e34609ffb2ef0a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175821
> Commit-Queue: Jerome Jiang <jianj@google.com>
> Commit-Queue: Stefan Holmer <holmer@google.com>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31401}

TBR=danilchap@webrtc.org,jianj@google.com,stefan@webrtc.org,holmer@google.com,marpan@webrtc.org

Change-Id: I2689ab4f7f26af6e26a4a188a2aa0b4f90a1a92f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176374
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31405}
2020-06-02 10:40:38 +00:00
Jerome Jiang
3a2be87b80 Add av1 test running real video clips.
Bug: None
Change-Id: I93bb8b3bf15d607d061aa74ad9e34609ffb2ef0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175821
Commit-Queue: Jerome Jiang <jianj@google.com>
Commit-Queue: Stefan Holmer <holmer@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31401}
2020-06-02 07:36:20 +00:00
Danil Chapovalov
00b172a6fa Add av1 test with temporal scalability.
Bug: webrtc:11404
Change-Id: Iaf2fcca0dd450f7b296bd0250a119b8e7dfef270
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176181
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31397}
2020-06-01 14:28:45 +00:00
Mirko Bonadei
9ca7365a8c Deprecate webrtc::NackModule.
This CL moves webrtc::NackModule to a deprecated folder and annotates
the type with RTC_DEPRECATED.

Since the header should not be used outside of WebRTC, this CL doesn't
created a forward header.

Bug: webrtc:11611
Change-Id: I4d5899d473d78b8c7f4a6a018e2805648244b5f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176360
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31394}
2020-05-30 16:34:44 +00:00
Jerome Jiang
85b288b0ff av1: enable error resilient, set max intra rate and disable order hint
error resilient needs to be enabled for layered encoding.

Bug: None
Change-Id: I399dc227507d4f48f21358141aa1874d126e92a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176340
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31391}
2020-05-30 03:10:27 +00:00
Danil Chapovalov
a4d70a802c Configure libaom encoder with scalability parameters
Bug: webrtc:11404
Change-Id: I9535d9dec2e0e0d85bf3435f921d6e78034c7bf8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175653
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31373}
2020-05-28 09:06:11 +00:00
Markus Handell
3eac111115 PacketBuffer: remove lock recursions.
This change removes lock recursions and adds thread annotations.

Bug: webrtc:11567
Change-Id: Ibc429571926693f4b3de78f97a5dc5501d93a4a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176240
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31369}
2020-05-27 15:45:16 +00:00
Tommi
63673fe2cc Remove locks and dependency on ProcessThread+Module from NackModule2.
Change-Id: I39975e7812d7722fd231ac57e261fd6add9de000
Bug: webrtc:11594
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175341
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31367}
2020-05-27 14:20:34 +00:00
Danil Chapovalov
df95f5d43f Add parametrized unit tests for av1 to check scalability structures
Bug: webrtc:11404
Change-Id: If92a4b0a0a78a12ff43ec3a27b189cdc7218c9c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175601
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31365}
2020-05-27 10:27:18 +00:00
Mirko Bonadei
621c33653f Remove //modules/video_coding:nack_module from API.
Bug: None
Change-Id: I8e6cc61ae8406993909d0ab97896ccbaa89349c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176082
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31349}
2020-05-26 06:48:06 +00:00
Danil Chapovalov
f2c0f15282 In media/ and modules/video_coding replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: I5c7f5dc99e62619403ed726c23201ab4fbd37cbe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175647
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31340}
2020-05-25 08:46:30 +00:00
Tommi
d3807da009 Fork NackModule and RtpVideoStreamReceiver
Bug: webrtc:11595
Change-Id: I4d14c0bf9c32e09d1624099a256f2778afebd4df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175901
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31337}
2020-05-22 17:07:16 +00:00
Jerome Jiang
3cc1a6509b Set av1 speed from resolution.
Use speed 6 for better quality for low resolution, speed 8 for HD for better speed.
This will better balance speed and quality.

Change-Id: I3d8dbd45533471ce58d53c1ac26f92c7b1106259
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175281
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#31336}
2020-05-20 20:06:46 +00:00
Tommi
430951a0d4 Update call expectations in ReceiveStatisticsProxy, add thread checks
Bug: chromium:1084619
Change-Id: If9042d44ad99eacd431ee2a5e84486cfaf282d7e
Tbr: stefan@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175658
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31330}
2020-05-20 10:27:50 +00:00
Ilya Nikolaevskiy
43c108b7e9 Log decoder implementation name
Bug: none
Change-Id: I2c6b6a2a62bbcd058b8ed336e6e0f36b8b0d0844
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175220
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31321}
2020-05-19 12:23:30 +00:00
Åsa Persson
3361af35dd Add option to disable reduced jitter delay through field trial.
Bug: none
Change-Id: Id07cb7dd69cd6198eb95a5e9c0987943471f7da2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175565
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31320}
2020-05-19 11:51:29 +00:00
Danil Chapovalov
61bc0d1ed3 Introduce ChainDiffCalculator
to convert flags which chains a video frame part of into chain_diffs

Bug: webrtc:10342
Change-Id: I6fb899eae934078223b101c9f85e2ac101980d4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175108
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31306}
2020-05-18 14:22:44 +00:00
Danil Chapovalov
b471ac791c Introduce layering controller interface for av1 encoder
Add TODOs into AV1 encoder wrapper where it suppose to be used.

Bug: webrtc:11404
Change-Id: If049066b84be72829867d5084827a7d275648a7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174806
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31278}
2020-05-15 15:25:42 +00:00
Sergey Silkin
33d81a05eb Keep OpenH264 iMaxBitrate unspecified.
Max encoder bitrate in WebRTC and OpenH264 are different settings. In
WebRTC it is a cap for encoder target bitrate whilst in OpenH264 it is
a peak bitrate. I.e. OpenH264 is allowed to produce bitrate up to
iMaxBitrate for short time interval. That is not what WebRTC expects.

https://webrtc.googlesource.com/src/+/5ee6967c4edc667688d736c27db6f2e7be00dd0a
disabled encoders re-initialization on min/max bitrate change. Reinit of
some HW encoders takes hundreds of milliseconds and causes video freeze.
I missed that max bitrate is used by OpenH264. This caused regression
described in webrtc:11543.

This change sets iMaxBitrate=UNSPECIFIED_BIT_RATE (which is the default
value). Settings iMaxBitrate=UNSPECIFIED_BIT_RATE disables the frame
dropping logic based on that parameter. But the encoder still will drop
frames based on buffer fullness, https://source.chromium.org/chromium/chromium/src/+/master:third_party/openh264/src/codec/encoder/core/src/ratectl.cpp;l=806-807

Bug: webrtc:10773, webrtc:11543
Change-Id: I728be49e0df8a0d9a8f4438299e4c7b4c1497a78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174745
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31192}
2020-05-08 15:10:26 +00:00
Danil Chapovalov
28da36a6ea Add unittest for av1 wrappers to test Encode and Decode functions
while helpful by itself, it is also a preparation
for adding unittests for (to be added) svc features of the encoder.

Bug: webrtc:11404
Change-Id: I62b0645f44579f21f228d406a206b4c01d80dd02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174580
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31189}
2020-05-08 11:57:27 +00:00
Tommi
553c869c58 Start consolidating management/querying of stats on the Call thread.
Call is instantiated on what we traditionally call the 'worker thread'
in PeerConnection terms. Call statistics are however gathered, processed
and reported in a number of different ways, which results in a lot of
locking, which is also unpredictable due to the those actions themselves
contending with other parts of the system.

Designating the worker thread as the general owner of the stats, helps
us keeps things regular and avoids loading unrelated task queues/threads
with reporting things like histograms or locking up due to a call to
GetStats().

This is a reland of remaining changes from https://webrtc-review.googlesource.com/c/src/+/172847:
This applies the changes from the above CL to the forked files and
switches call.cc over to using the forked implementation.

Bug: webrtc:11489
Change-Id: I93ad560500806ddd0e6df1448b1bcf5a1aae7583
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174000
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31186}
2020-05-08 07:24:39 +00:00
Danil Chapovalov
b63331bb8f Cleanup mocks for Video (en|de)coder factories
In particular remove proxy mocks in favor of lambdas and Return(ByMove(...))

Bug: None
Change-Id: If6b79601437e82a7116479d128d538e965622fab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174701
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31179}
2020-05-07 11:58:50 +00:00
philipel
cce86430d8 Removed spammy log message from the FrameBuffer.
Inserting old frames is not an error condition and should not print a warning, and given that it happens all the time it is also very spammy.

Bug: chromium:1066819
Change-Id: Iad2b5edc5e62822c02e2bb2a53d4318f957be3bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173022
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31172}
2020-05-06 11:36:47 +00:00