Commit graph

373 commits

Author SHA1 Message Date
Johannes Kron
c3fcee7c3a Move h264_profile_level_id and vp9_profile to api/video_codecs
This is a refactor to simplify a follow-up CL of adding
SdpVideoFormat::IsSameCodec.

The original files media/base/h264_profile_level_id.* and
media/base/vp9_profile.h must be kept until downstream projects
stop using them.

Bug: chroimium:1187565
Change-Id: Ib39eca095a3d61939a914d9bffaf4b891ddd222f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215236
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33782}
2021-04-20 09:42:05 +00:00
Fyodor Kyslov
26abdaf478 AV1: Use Default TX type for encoding
This will further speed up intra frame encoding

Bug: None
Change-Id: I3c836502cdcb1037e3128850a085b92acd8fc7ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212821
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33544}
2021-03-23 17:19:27 +00:00
Niels Möller
490c1503d9 Delete unowned buffer in EncodedImage.
Bug: webrtc:9378
Change-Id: Ice48020c0f14905cbc185b52c88bbb9ac3bb4c93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128575
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33510}
2021-03-19 14:12:28 +00:00
Fyodor Kyslov
f8776cba62 Revert "AV1: Use Default TX type for encoding"
This reverts commit b0dc518f82.

Reason for revert: corresponding change  https://chromium-review.googlesource.com/c/chromium/src/+/2765225 from chromium has not been backported to webrtc yet.


Original change's description:
> AV1: Use Default TX type for encoding
>
> This will further speed up intra frame encoding
>
> Bug: None
> Change-Id: I1a105c6d2cdd9dc82f84d0039dbea3f0d090ab93
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212320
> Reviewed-by: Marco Paniconi <marpan@webrtc.org>
> Commit-Queue: Fyodor Kyslov <kyslov@google.com>
> Cr-Commit-Position: refs/heads/master@{#33492}

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

Change-Id: I7ff93537942ab34706db0b71c6b5f8535209619d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212340
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33494}
2021-03-17 19:16:50 +00:00
Fyodor Kyslov
b0dc518f82 AV1: Use Default TX type for encoding
This will further speed up intra frame encoding

Bug: None
Change-Id: I1a105c6d2cdd9dc82f84d0039dbea3f0d090ab93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212320
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33492}
2021-03-17 18:43:28 +00:00
Fyodor Kyslov
bff6489c94 AV1: Disable several intra coding tools.
This will speed up key frame encoding (together with libaom changes)
3x-4x times with ~13% BDRate loss on key frames only

Bug: None
Change-Id: I24332f4f7285811cdc6619ba29844fe564cae95e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212040
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Fyodor Kyslov <kyslov@google.com>
Cr-Commit-Position: refs/heads/master@{#33468}
2021-03-15 23:20:08 +00:00
Jerome Jiang
662d4c328f AV1 test: change ssim threshold
Bug: webrtc:12519
Change-Id: Ibdcaa08800d03d289f86e14cc7d94b5f2d3b7117
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209480
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#33377}
2021-03-03 18:22:45 +00:00
Sergey Silkin
db0b4a8935 Do not crash if codec is not available
Check if codec was successfully created and exit from RunTest if not
before creating VideoProcessor.

Bug: none
Change-Id: Ia6d7171650dbc9824fb78f4a8e2851f755cfd63b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209362
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33372}
2021-03-03 13:56:17 +00:00
Artem Titov
d15a575ec3 Use SequenceChecker from public API
Bug: webrtc:12419
Change-Id: I00cca16a0ec70246156ba00b97aa7ae5ccbf5364
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205323
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33220}
2021-02-10 15:04:55 +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
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
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
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
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
06bbeb3398 in Av1 encoder wrapper communicate end_of_picture flag similar to VP9
In particular move end_of_picture flag out of vp9 specific information
since VP9 is not the only codec that can use spatial scalability and
thus need to distinguish layer frame and picture (aka temporal unit).

Bug: webrtc:12167
Change-Id: I0d046d8785fbea55281209ad099738c03ea7db96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192542
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32588}
2020-11-11 14:00:52 +00:00
Mirko Bonadei
8cc6695652 Reformat python files checked by pylint (part 1/2).
After recently changing .pylintrc (see [1]) we discovered that
the presubmit check always checks all the python files when just
one python file gets updated.

This CL moves all these files one step closer to what the linter
wants.

Autogenerated with:

# Added all the files under pylint control to ~/Desktop/to-reformat
cat ~/Desktop/to-reformat | xargs sed -i '1i\\'
git cl format --python --full

This is part 1 out of 2. The second part will fix function names and
will not be automated.

[1] - https://webrtc-review.googlesource.com/c/src/+/186664

No-Presubmit: True
Bug: webrtc:12114
Change-Id: Idfec4d759f209a2090440d0af2413a1ddc01b841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32530}
2020-10-30 10:13:11 +00:00
Sergey Silkin
b72cc6d670 Analyze quality of dropped frames in VideoProcessor.
Calculate quality metrics for dropped frames by comparing original
frame against last decoded one.

This feature makes comparison of encoders which do/don't drop frames
more fair.

The feature is controlled by analyze_quality_of_dropped_frames flag
and is disabled by default.

Bug: none
Change-Id: Ifab8df92d0b76e743ff3193c05d7c8dbd14921c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190660
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32518}
2020-10-29 08:23:49 +00:00
Erik Språng
5a04ef6ca4 Tweaks videocodec_test threshold for arm vp8 simulcast
Bug: webrtc:10155
Change-Id: If4fc89c1aec34ac5775154315cc50779bbee4ee5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190285
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32495}
2020-10-26 17:25:12 +00:00
Danil Chapovalov
5ad731ad89 In VP9 wrapper fill information required to produce Dependency Descriptor
Bug: webrtc:11999
Change-Id: Id20575fca5b9279adccf1498165815aa16e044af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187340
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32421}
2020-10-16 09:20:07 +00:00
Mirko Bonadei
0abd518abd Revert "Introduce RTC_NO_UNIQUE_ADDRESS."
This reverts commit f5e261aaf6.

Reason for revert: Breaks downstream projects.

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}

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

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

Bug: webrtc:11495
Change-Id: Ice318d1b11ca3dff09c190187a0b0a32ca945fe3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186944
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32335}
2020-10-07 07:37:01 +00:00
Mirko Bonadei
f5e261aaf6 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}
2020-09-30 09:52:49 +00:00
Niels Möller
08ae7cea30 Reland "Delete the non-const version of the EncodedImage::data() method."
This is a reland of f2969fa868

Original change's description:
> Delete the non-const version of the EncodedImage::data() method.
>
> Bug: webrtc:9378
> Change-Id: I84ace3ca6a2eb4d0f7c3d4e62f815d77df581bfa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185122
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32197}

Bug: webrtc:9378
Change-Id: I8521ac567749ea547f91cf7549eb48966baffa11
Tbr: ilnik@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185807
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32209}
2020-09-28 13:51:51 +00:00
Marina Ciocea
111de34102 Revert "Delete the non-const version of the EncodedImage::data() method."
This reverts commit f2969fa868.

Reason for revert: Breaks blink_platform_unittests; sample failure:
https://ci.chromium.org/p/chromium/builders/try/linux-rel/500046

Original change's description:
> Delete the non-const version of the EncodedImage::data() method.
>
> Bug: webrtc:9378
> Change-Id: I84ace3ca6a2eb4d0f7c3d4e62f815d77df581bfa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185122
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32197}

TBR=ilnik@webrtc.org,nisse@webrtc.org,philipel@webrtc.org,titovartem@webrtc.org

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

Bug: webrtc:9378
Change-Id: I6374d263e2ee10da318ab1e040ed18bed7a96edd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185507
Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org>
Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32205}
2020-09-27 08:28:07 +00:00
Niels Möller
f2969fa868 Delete the non-const version of the EncodedImage::data() method.
Bug: webrtc:9378
Change-Id: I84ace3ca6a2eb4d0f7c3d4e62f815d77df581bfa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185122
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32197}
2020-09-25 12:14:50 +00:00
Erik Språng
ceb44959ca Reland: Wires up WebrtcKeyValueBasedConfig in media engines.
This is a reland of
https://webrtc-review.googlesource.com/c/src/+/174261

Patchset 1 contains the old cl (plus a merge conflict fix).
Later patchets are bufixes: A PeerConnection can be created without a
Call instance (in the case of DataChannel only), so we can't always
use that to fetch the current trials.

Old CL descritpion:

This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

// Since re-land is otherwise unchanged, setting previous reviewers as TBR
TBR=kthelgason@webrtc.org,mbonadei@webrtc.org,stefan@webrtc.org,srte@webrtc.org

Bug: webrtc:11926
Change-Id: I57a9e8c3454f226f77fb93215bcac83da65034b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185003
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32163}
2020-09-22 16:08:22 +00:00
Artem Titov
9d77762023 Move SampleStatsCounter to public API
Bug: None
Change-Id: I8956f6febbb1caf71e951d212d57746fe1ec5eb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184506
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32142}
2020-09-18 17:42:53 +00:00
Artem Titov
5956a17ed6 Revert "Wires up WebrtcKeyValueBasedConfig in media engines."
This reverts commit 591b2ab82e.

Reason for revert: Breaks downstream project

Original change's description:
> Wires up WebrtcKeyValueBasedConfig in media engines.
> 
> This replaces field_trial:: -based functions from system_wrappers.
> Field trials are still used as fallback, but injectable trials are now
> possible.
> 
> Bug: webrtc:11926
> Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32129}

TBR=mbonadei@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,perkj@webrtc.org

Change-Id: I3e169149a8b787aa6366bb357abb71794534c63a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184507
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32132}
2020-09-17 20:17:38 +00:00
Erik Språng
591b2ab82e Wires up WebrtcKeyValueBasedConfig in media engines.
This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

Bug: webrtc:11926
Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32129}
2020-09-17 16:24:10 +00:00
Danil Chapovalov
2549f174b5 Remove RTPFragmentationHeader creation and propagation through webrtc
Bug: webrtc:6471
Change-Id: I5cb1e10088aaecb5981888082b87ae9957bbaaef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181541
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31955}
2020-08-17 16:37:33 +00:00
Niels Möller
5b69aa6613 Move definition of SpatialLayer to api/video_codecs/spatial_layer.h
Bug: webrtc:7660
Change-Id: I54009ebc5f65b6875a8c079ab5264e0c5ce9f654
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181500
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31942}
2020-08-17 09:45:19 +00:00
Markus Handell
6deec38ede Migrate modules/video_coding to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: I8023fbe7595f7ba8ae7c7db3583fc2e560ec3df2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178803
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31644}
2020-07-07 11:41:21 +00:00
Danil Chapovalov
54544ec92a In av1 encoder set bitrate per layer when scalability is used.
Bug: webrtc:11404
Change-Id: If779c16ffb55d28d21a0900439cbe2614507e557
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177015
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31570}
2020-06-26 09:26:05 +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
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
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
Mirko Bonadei
a81e9c82fc Wrap WebRTC OBJC API types with RTC_OBJC_TYPE.
This CL introduced 2 new macros that affect the WebRTC OBJC API symbols:

- RTC_OBJC_TYPE_PREFIX:
  Macro used to prepend a prefix to the API types that are exported with
  RTC_OBJC_EXPORT.

  Clients can patch the definition of this macro locally and build
  WebRTC.framework with their own prefix in case symbol clashing is a
  problem.

  This macro must only be defined by changing the value in
  sdk/objc/base/RTCMacros.h  and not on via compiler flag to ensure
  it has a unique value.

- RCT_OBJC_TYPE:
  Macro used internally to reference API types. Declaring an API type
  without using this macro will not include the declared type in the
  set of types that will be affected by the configurable
  RTC_OBJC_TYPE_PREFIX.

Manual changes:
https://webrtc-review.googlesource.com/c/src/+/173781/5..10

The auto-generated changes in PS#5 have been done with:
https://webrtc-review.googlesource.com/c/src/+/174061.

Bug: None
Change-Id: I0d54ca94db764fb3b6cb4365873f79e14cd879b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31153}
2020-05-04 15:01:26 +00:00
Ilya Nikolaevskiy
39fb817efd [Video, Svc] Remove inactive spatial layers in codec initializer
This is more logical way to remove inactive lower layers.
Current way is to notify the encoder that the layer is inactive,
then renumber layers at the packatization level.

This Cl will allow to simplify libvpx vp9 encoder, svcRateAllocator and
vp9 packetizer.

Bug: webrtc:11319
Change-Id: Idf0bb30b729f5ecc97e31454b32934546b681aa2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173182
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31058}
2020-04-14 09:37:44 +00:00
Jerome Jiang
c93abcb341 VP9 test: change threshold to allow resizing for twice
Recent change in libvpx allows a second resize for low resolution.

Bug: None
Change-Id: I45a7ce376b274778b2fa183346de1993ef43bde7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169941
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30719}
2020-03-09 09:56:05 +00:00
Ilya Nikolaevskiy
03d909634b Ensure that the first active layer isn't disabled by too low input resolution
If e.g. CPU adaptation reduces input video size too much, video pipeline would
reduce the number of used simulcast streams/spatial layers. This may result in
disabled video if some streams are disabled by Rtp encoding parameters API.

Bug: webrtc:11319
Change-Id: Id7f157255599dcb6f494129b83477cda4bea982a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168480
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30498}
2020-02-11 14:57:51 +00:00
Artem Titov
33f9d2b383 Migrate WebRTC on FrameGeneratorInterface and remove FrameGenerator class
Bug: webrtc:10138
Change-Id: If85290581a72f81cf60181de7a7134cc9db7716e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161327
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30033}
2019-12-07 00:54:26 +00:00
Artem Titov
5256d8bc4b Refactor FrameGenerator to return VideoFrameBuffer with VideoFrame::UpdateRect
Bug: webrtc:10138
Change-Id: I22079e2630bb1f3bb27472795fe923f9143b3401
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161010
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29973}
2019-12-02 17:11:37 +00:00
Sergey Silkin
df8fd28d0b Add output_path to VideoCodecTestFixture::Config.
This lets test to set output path explicitly.

Bug: none
Change-Id: I756484775f4c7f44cd1bb904c89d9215ffa48fe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158798
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29702}
2019-11-06 08:48:52 +00:00
Danil Chapovalov
eb90e6ffe3 Merge SendTask implementation for SingleThreadedTaskQueueForTesting and TaskQueueForTest
That allows to use SingleThreadedTaskQueueForTesting via TaskQueueBase interface
but still have access to test-only SendTask function.

Bug: webrtc:10933
Change-Id: I3cc397e55ea2f1ed9e5d885d6a2ccda412beb826
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156002
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29480}
2019-10-15 09:17:36 +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
Marin Kišić
9a91161b9f Fixing way of printing logs because RTC_LOG() on Android has limit on printing 1024-60 characters in line.
Bug: webrtc:10885
Change-Id: I42c365555b682f3352644330167e2a4331ba0527
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149180
Commit-Queue: Marin Kišić <kisicmar@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29151}
2019-09-11 10:44:07 +00:00
Florent Castelli
8bbdb5b9bd Update VideoBitrateAllocator allocate to take a struct with more fields
We want to evaluate more data in order to make better choices in the
bitrate allocators.
In order to freely update the parameter list without
breaking the API many times for projects customizing them, we'll use a
struct instead.

Bug: webrtc:10126
Change-Id: I443f86781c5134950294cdd1e3197a47447cf973
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141418
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28748}
2019-08-02 13:52:54 +00:00
Sebastian Jansson
ed0febf573 Add k prefix to FrameGenerator::OutputType enum values
This prepares for using VideoFrameBuffer::Type as
FrameGenerator::OutputType, which will reduce the
number of redundant enums in the code.

Bug: webrtc:9883
Change-Id: I253f5f1ea7181e02a5cf1a92925f51da8ada6aa2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146982
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28696}
2019-07-29 09:41:31 +00:00
Sergey Silkin
44cec0b5bd Handle non-integer frame rates in video codec tests.
Encoder API accepts non-integer frame rate since
https://webrtc-review.googlesource.com/c/src/+/131949.

Bug: webrtc:10812
Change-Id: I5fc9c5dfac4b182b84a735218a2946a95cc2b93c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143483
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28548}
2019-07-12 07:37:43 +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
Florent Castelli
668ce0c7fa Remove trial WebRTC-SimulcastMaxLayers and make its behavior default
Also cleans up the unused parameters from GetSimulcastConfig.

Bug: webrtc:8785, webrtc:8486
Change-Id: I1aea8f6c9e6590211ec5ee5cafc0ec2a2100d68f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144627
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28496}
2019-07-05 14:55:46 +00:00
Niels Möller
4d504c76cb New interface EncodedImageBufferInterface, replacing use of CopyOnWriteBuffer
Bug: webrtc:9378
Change-Id: I62b7adbd9dd539c545b5b1b1520721482a4623c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138820
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28317}
2019-06-19 07:02:34 +00:00
Elad Alon
370f93a34a Reland "Inform VideoEncoder of negotiated capabilities"
This is a reland of 11dfff0878

Now that I am sure that WebRTC code is not calling the obsolete
versions, I will just remove the NOT_REACHED and call the
new version from the old ones, so as not to trip up downstream
projects.

Original change's description:
> Inform VideoEncoder of negotiated capabilities
>
> After this CL lands, an announcement will be made to
> discuss-webrtc about the deprecation of one version
> of InitEncode().
>
> Bug: webrtc:10720
> Change-Id: Ib992af0272bbb16ae16ef7e69491f365702d179e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140884
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28224}

TBR=sakal@webrtc.org,kwiberg@webrtc.org,sprang@webrtc.org

Bug: webrtc:10720
Change-Id: I46c69e45c190805c07f7e51acbe277d7eebd1600
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141412
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28236}
2019-06-11 14:49:37 +00:00
Philip Eliasson
49d661a7d3 Revert "Inform VideoEncoder of negotiated capabilities"
This reverts commit 11dfff0878.

Reason for revert: Downstream import failure.

Original change's description:
> Inform VideoEncoder of negotiated capabilities
> 
> After this CL lands, an announcement will be made to
> discuss-webrtc about the deprecation of one version
> of InitEncode().
> 
> Bug: webrtc:10720
> Change-Id: Ib992af0272bbb16ae16ef7e69491f365702d179e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140884
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28224}

TBR=sakal@webrtc.org,kwiberg@webrtc.org,eladalon@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org

Change-Id: I7f833055c67f1f879b01dd8c156ba7b8840e8747
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10720
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141411
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28225}
2019-06-11 11:56:04 +00:00
Elad Alon
11dfff0878 Inform VideoEncoder of negotiated capabilities
After this CL lands, an announcement will be made to
discuss-webrtc about the deprecation of one version
of InitEncode().

Bug: webrtc:10720
Change-Id: Ib992af0272bbb16ae16ef7e69491f365702d179e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28224}
2019-06-11 11:32:13 +00:00
Rasmus Brandt
315de596b0 Switch to RTC_LOG(LS_INFO) for non-perf VideoCodecTest text output.
This allows picking up the output in Android tests, where stdout/stderr
is lost but RTC_LOGs are picked up by the org.webrtc.Logging utility.

Tested: Downstream Android tests.
Bug: webrtc:10349
Change-Id: I1379f4303640dbc9621c64d9c88cf61bc8447ab6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132704
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27616}
2019-04-15 12:08:15 +00:00
Yves Gerey
79e9f4b9c1 Replace test::Statistics by webrtc::RunningStatistics.
The former became redundant and didn't guarantee
numerical stability for variance computation.

Bug: webrtc:10412
Change-Id: Idc291abe9add41bde9e7734f179e5d6c65f2630b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132460
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27605}
2019-04-13 17:55:27 +00:00
Erik Språng
16cb8f5d74 Reland "Replace usage of old SetRates/SetRateAllocation methods"
This is a reland of 7ac0d5f348

Original change's description:
> Replace usage of old SetRates/SetRateAllocation methods
>
> This rather large CL replaces all relevant usage of the old
> VideoEncoder::SetRates()/SetRateAllocation() methods in WebRTC.
> API is unchanged to allow downstream projects to update without
> breakage.
>
> Bug: webrtc:10481
> Change-Id: Iab8f292ce6be6c3f5056a239d26361962b14bb38
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131949
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27554}

TBR=brandtr@webrtc.org,sakal@webrtc.org,perkj@webrtc.org

Bug: webrtc:10481
Change-Id: I2978d5c527a18e885b7845c4e53a2424e8ad5b4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132551
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27593}
2019-04-12 13:37:32 +00:00
Rasmus Brandt
70c961f965 Delete unused members of VideoCodecH264.
profile-level-id for H.264 comes in through the SdpVideoFormat,
rather than through these members.

Bug: None
Change-Id: I9c4ea8873346ca16174aecf5f90a649cbaf913dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132545
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27571}
2019-04-11 15:32:48 +00:00
Niels Möller
7aacdd9515 Reland "Delete CodecSpecificInfo argument from VideoDecoder::Decode"
This is a reland of 39d3a7de02

Original change's description:
> Delete CodecSpecificInfo argument from VideoDecoder::Decode
>
> Bug: webrtc:10379
> Change-Id: I079b419604bf4e9c1994fe203d7db131a0ccddb6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125920
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27022}

Tbr: kwiberg@webrtc.org
Bug: webrtc:10379
Change-Id: I8197bebd2ae7dc460644a98795b8257b033c27c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126480
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27565}
2019-04-11 13:03:52 +00:00
Minyue Li
7ddef1af88 Revert "Replace usage of old SetRates/SetRateAllocation methods"
This reverts commit 7ac0d5f348.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Replace usage of old SetRates/SetRateAllocation methods
> 
> This rather large CL replaces all relevant usage of the old
> VideoEncoder::SetRates()/SetRateAllocation() methods in WebRTC.
> API is unchanged to allow downstream projects to update without
> breakage.
> 
> Bug: webrtc:10481
> Change-Id: Iab8f292ce6be6c3f5056a239d26361962b14bb38
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131949
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27554}

TBR=brandtr@webrtc.org,sakal@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,perkj@webrtc.org

Change-Id: I576760b584e3f258013b0279c0c173c895bbb37e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10481
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132561
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27559}
2019-04-11 10:50:29 +00:00
Erik Språng
7ac0d5f348 Replace usage of old SetRates/SetRateAllocation methods
This rather large CL replaces all relevant usage of the old
VideoEncoder::SetRates()/SetRateAllocation() methods in WebRTC.
API is unchanged to allow downstream projects to update without
breakage.

Bug: webrtc:10481
Change-Id: Iab8f292ce6be6c3f5056a239d26361962b14bb38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131949
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27554}
2019-04-11 07:46:09 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Sebastian Jansson
b55015e4e1 Replacing SequencedTaskChecker with SequenceChecker.
Bug: webrtc:9883
Change-Id: I5e3189da2a46e6f4ed1a3c5a5dfd2f7d75a16b5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130961
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27518}
2019-04-09 12:28:04 +00:00
philipel
a553c72659 Tune VideoCodecTestLibvpx.TemporalLayersVP8 thresholds.
After https://webrtc-review.googlesource.com/c/src/+/131141 there are some minor
changes to the encoding performance, hence the updated values.

Bug: none
Change-Id: I070a62ce725b0a79e5cb5c4679ab643de50c46c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131334
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27466}
2019-04-05 14:43:40 +00:00
philipel
59e875ce18 Tune VideoCodecTestLibvpx.MultiresVP8 thresholds.
After https://webrtc-review.googlesource.com/c/src/+/131141 there are some minor
changes to the encoding performance, hence the updated values.

Bug: none
Change-Id: Ifa661eea15a0d52f4760f4aac9294074faab757f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131382
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27463}
2019-04-05 13:15:34 +00:00
Rasmus Brandt
fd720b2406 Switch to SendTask instead of manually waiting for event.
Bug: webrtc:10349
Change-Id: I128856d2baf221d67e957ce0614b075ecef3c5fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131140
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27439}
2019-04-03 12:03:14 +00:00
Niels Möller
9d8eaac4ee Delete unneeded direct includes of common_types.h
And delete corresponding dependencies on :webrtc_common. After this
change, common_types.h is included directly only from code in the
following directories:

api/
api/video/
api/video_codecs/
common_video/libyuv/include/
media/base/
modules/remote_bitrate_estimator/
modules/rtp_rtcp/source/
modules/video_coding/codecs/vp9/

There remains plenty of indirect dependencies on the types declared in
common_types.h, but the fewer direct dependencies should make it
easier to find the proper place for each type.

Bug: webrtc:5876
Change-Id: I93e8f214025ecb613c19fdec2015bd3f96c59aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27376}
2019-04-01 07:18:13 +00:00
Rasmus Brandt
7d72d0fb39 Change VideoCodecTestStats API.
- Add GetFrameStatistics API:
  This is useful for downstream test users that want to read frame-level stats.
- Remove other APIs that are not used by downstream tests:
    * AddFrame
    * GetFrame
    * GetFrameWithTimestamp
    * SliceAndCalcAggregatedVideoStatistic
    * PrintFrameStatistics
    * Size
    * Clear
  The implementations, which are used by the fixture implementation, are kept.

Bug: webrtc:10349
Change-Id: Id2f6fa5a36b8341a5ccb365725f71ebe0c0f1570
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128779
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27306}
2019-03-27 09:50:54 +00:00
Rasmus Brandt
001c782ff2 Save encoded ivf files separately for different TLs.
This allows offline visualization of the different TL.

For now, there is no need to do the same for the decoded frames.

Bug: webrtc:10349
Tested: 1) ninja -C out/Debug; and out/Debug/modules_tests --gtest_filter="*MultiresVP8*:*SvcVP9*". 2) Downstream tests.
Change-Id: Iaf5ab19ee681488706d8777a5adba78efd5cc1ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128861
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27240}
2019-03-22 13:15:54 +00:00
Niels Möller
8f7ce222e7 Make VideoFrameType an enum class, and move to separate file and target
Bug: webrtc:5876, webrtc:6883
Change-Id: I1435cfa9e8e54c4ba2978261048ff3fbb993ce0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126225
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27239}
2019-03-22 12:44:51 +00:00
Rasmus Brandt
c528410d2c Improve VideoCodecTest perf stats output.
- Output verbose send stats before verbose recv stats.
- Add |rate_profile_idx| to output names.
- Only report encode framerate and keyframe size for the entire stream.
- Add encoded bitrate/framerate stats per layer. Remove # dropped frames.
- Add U/V quality stats (mainly to compare to HW codecs)

Bug: webrtc:10349
Change-Id: I8f0d05e0fdf96ea998a06732462a080245b61221
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128614
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27223}
2019-03-21 12:17:09 +00:00
Danil Chapovalov
d26a916a80 Avoid using GlobalTaskQueueFactory for TaskQueueForTest
To remove global task factory, rtc::TaskQueue need to loose it's convenient constructor
TaskQueueForTest can be used instead in tests and keep the convenient constructor.

Also cleanup the TaskQueueForTest a bit:
move the class to webrtc namespace
add default constructor
disallow copy using language construct instead of macro
cleanup build dependencies
rename build target (to match move out of the rtc namespace)

Bug: webrtc:10284
Change-Id: I17fddf3f8d4f363df7d495c28a5b0a28abda1ba7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127571
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27193}
2019-03-19 18:11:52 +00:00
Rasmus Brandt
69008a8718 Avoid div-by-zero in VideoCodecTest stats calculation.
Bug: webrtc:10400
Change-Id: I82b1e86cc8f7d1547fc4863c08c0f8ab82801ac4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128086
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27145}
2019-03-15 13:15:02 +00:00
Niels Möller
009ab3c438 Delete EncodedImage::GetBufferPaddingBytes
For the ffmpeg H.264 decoder, rely on ffmpeg being configured with
CONFIG_SAFE_BITSTREAM_READER.

Bug: webrtc:9378
Change-Id: Ia7a46580d520808e36581252a95feeb5f9c57bf9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/119665
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27124}
2019-03-14 09:08:19 +00:00
Danil Chapovalov
471783fc87 Remove rtc::QueuedTask alias, use webrtc::QueuedTask directly
Use absl::WrapUnique/absl::make_unique to create the queued tasks.

Bug: webrtc:10191
Change-Id: I8f47a60cb326b0fc361c7f0e338b25373d39937c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126525
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27063}
2019-03-11 16:49:21 +00:00
Danil Chapovalov
ad89528051 Reland "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
This reverts commit 42d8c93ec3.

Reason for revert: Got Aliby for FEC test flakes

Original change's description:
> Revert "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
> 
> This reverts commit 304e9d2df3.
> 
> Reason for revert: Breaks downstream projects.
> Seems to make VideoSendStreamTest.SupportsFlexfecSimulcastVp8 flaky.
> 
> Original change's description:
> > Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
> > 
> > Bug: webrtc:10191
> > Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27035}
> 
> TBR=danilchap@webrtc.org,kwiberg@webrtc.org
> 
> Change-Id: If98324f88e4b3d18bf2fe33597dfb9711867c243
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10191
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126484
> Reviewed-by: Yves Gerey <yvesg@webrtc.org>
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27041}

TBR=danilchap@webrtc.org,kwiberg@webrtc.org,yvesg@webrtc.org

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

Bug: webrtc:10191
Change-Id: Id87a17ae415142b8e0b11ba03ae7bad84a473fb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126720
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27056}
2019-03-11 12:32:49 +00:00
Yves Gerey
42d8c93ec3 Revert "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
This reverts commit 304e9d2df3.

Reason for revert: Breaks downstream projects.
Seems to make VideoSendStreamTest.SupportsFlexfecSimulcastVp8 flaky.

Original change's description:
> Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
> 
> Bug: webrtc:10191
> Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27035}

TBR=danilchap@webrtc.org,kwiberg@webrtc.org

Change-Id: If98324f88e4b3d18bf2fe33597dfb9711867c243
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126484
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27041}
2019-03-08 16:14:54 +00:00
Danil Chapovalov
304e9d2df3 Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current
Bug: webrtc:10191
Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27035}
2019-03-08 13:17:46 +00:00
Yves Gerey
3caf50dbb8 Make ChangeBitrateVP9 unittest a bit more lenient.
This CL slightly increases rc_threshold.max_avg_bitrate_mismatch_percent
to account for libvpx change [1].
This will allow to unblock chromium roll [2].

[1] df7039cf9a
[2] https://webrtc-review.googlesource.com/c/src/+/126301/

Bug: webrtc:10349
Change-Id: Id9d8947a4f67e384f716dc73abb8c1cbbf2c6040
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126462
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27029}
2019-03-08 09:31:44 +00:00
Jeroen de Borst
2c7b9825bc Revert "Delete CodecSpecificInfo argument from VideoDecoder::Decode"
This reverts commit 39d3a7de02.

Reason for revert: This change broke an internal project

Original change's description:
> Delete CodecSpecificInfo argument from VideoDecoder::Decode
> 
> Bug: webrtc:10379
> Change-Id: I079b419604bf4e9c1994fe203d7db131a0ccddb6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125920
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27022}

TBR=brandtr@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org

Change-Id: I2c730cc1834a3b23203fae3d7881f0890802c37b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10379
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126320
Reviewed-by: Jeroen de Borst <jeroendb@webrtc.org>
Commit-Queue: Jeroen de Borst <jeroendb@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27026}
2019-03-07 19:40:17 +00:00
Niels Möller
39d3a7de02 Delete CodecSpecificInfo argument from VideoDecoder::Decode
Bug: webrtc:10379
Change-Id: I079b419604bf4e9c1994fe203d7db131a0ccddb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125920
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27022}
2019-03-07 16:18:49 +00:00
Rasmus Brandt
6f0aafa531 Add PrintResults to VideoCodecTest.
These are used by the test runner to pick up perf values
to be shown in the perf dashboard.

Bug: webrtc:10349
Change-Id: Ib3b2479f7a20b66192751bee8237d757f5870bd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126220
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27020}
2019-03-07 15:12:40 +00:00
Niels Möller
b859b326ba Update more VideoEncoder implementations to drop CodecSpecificInfo input
Followup to https://webrtc-review.googlesource.com/c/src/+/125900.

Bug: webrtc:10379
Change-Id: If81c50c862bbcfd65a3cf7000c8327ebafe519c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126002
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27016}
2019-03-07 12:26:57 +00:00
Niels Möller
87e2d785a0 Prepare for splitting FrameType into AudioFrameType and VideoFrameType
This cl deprecates the FrameType enum, and adds aliases AudioFrameType
and VideoFrameType.

After downstream usage is updated, the enums will be separated
and be moved out of common_types.h.

Bug: webrtc:6883
Change-Id: I2aaf660169da45f22574b4cbb16aea8522cc07a6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123184
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27011}
2019-03-07 10:12:57 +00:00
Niels Möller
c8d2e73ed0 Delete CodecSpecificInfo argument from VideoEncoder::Encode
Bug: webrtc:10379
Change-Id: If9f92eb1e5891df284881082c53f0b1db1c26a38
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125900
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26992}
2019-03-06 14:01:31 +00:00
Rasmus Brandt
7b3f4a2035 Remove unused |keyframe_interval| from codec tests.
Bug: webrtc:10349
Change-Id: Iada8c8a1824f6e5424f503bb67b00382069b1dbd
Reviewed-on: https://webrtc-review.googlesource.com/c/124486
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26866}
2019-02-27 07:26:30 +00:00
Rasmus Brandt
3812fa949a Delete VideoCodecTestParameterized.
The approach used in VideoCodecTestLibvpx_DISABLED_MultiresVP8RdPerf
is better.

Bug: webrtc:10349
Change-Id: I76f7f6d9e5ddcae0b3f7f39b871dd1d96dffe56a
Reviewed-on: https://webrtc-review.googlesource.com/c/123980
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26830}
2019-02-25 09:00:26 +00:00
Sergey Silkin
d209cd1754 Lower SSIM thresholds.
VP9 SSIM slightly decreased with the latest libvpx.

Bug: webrtc:10348
Change-Id: I255e3b36751979c3226222caae7fca7bd837901e
Reviewed-on: https://webrtc-review.googlesource.com/c/123902
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26810}
2019-02-22 10:11:33 +00:00
Sergey Silkin
a0b1fb9ac7 Pass H264 profile/level settings to codec.
Bug: none
Change-Id: I0587a3d7c12a779a968b8c392c3dfa91b4ad040a
Reviewed-on: https://webrtc-review.googlesource.com/c/123180
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26735}
2019-02-18 13:06:35 +00:00
Sergey Silkin
6e1402b25f Skip SSIM calculation in real time mode.
SSIM calculation is not optimized. It takes ~100ms to process 720p frame
on Galaxy S8.

Bug: none
Change-Id: I51cc26d81124f06b2dfb27814edf2e4ae58141ce
Reviewed-on: https://webrtc-review.googlesource.com/c/121762
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26730}
2019-02-18 08:49:47 +00:00
Niels Möller
663844d800 Update test code to use EncodedImage::Allocate
Bug: webrtc:9378
Change-Id: I2ea63b097b0263b264fbbcca295365781fcae621
Reviewed-on: https://webrtc-review.googlesource.com/c/122780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26690}
2019-02-14 15:50:45 +00:00
Niels Möller
b7edf69e9a Delete rtc::File, usage replaced with FileWrapper
Bug: webrtc:6463
Change-Id: Ia0767a2e6bbacc43e63c30ed3bd3edb10ff6e645
Reviewed-on: https://webrtc-review.googlesource.com/c/121943
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26613}
2019-02-08 16:23:53 +00:00
Niels Möller
938dd9f1e8 Add owned data buffer to EncodedImage
Bug: webrtc:9378
Change-Id: I6a66b9301cbadf1d6517bf7a96028099970a20a3
Reviewed-on: https://webrtc-review.googlesource.com/c/117964
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26585}
2019-02-07 13:11:47 +00:00
Mirko Bonadei
c84f661b10 Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.

This CL moves WebRTC to the new set of APIs.

More info in [1].

This CL has been generated with this script:

declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
  git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format

[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature

Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
2019-01-31 13:23:33 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
Niels Möller
24871e4cbe Rename EncodedImage::_buffer --> buffer_, and make private
Bug: webrtc:9378
Change-Id: I0a0636077b270a7c73bafafb958132fa648aca70
Reviewed-on: https://webrtc-review.googlesource.com/c/117722
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26294}
2019-01-17 12:38:15 +00:00
Niels Möller
77536a2b81 Rename EncodedImage::_length --> size_, and make private.
Use size() accessor function. Also replace most nearby uses of _buffer
with data().

Bug: webrtc:9378
Change-Id: I1ac3459612f7c6151bd057d05448da1c4e1c6e3d
Reviewed-on: https://webrtc-review.googlesource.com/c/116783
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26273}
2019-01-16 07:40:47 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
40d55331d7 Include absl/memory/memory.h if absl::make_unique is used
Tbr: kwiberg@webrtc.org
Bug: None
Change-Id: Iaf4533d2ce0e80b351a8a664ef8cf7ba0e5ec583
Reviewed-on: https://webrtc-review.googlesource.com/c/115746
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@google.com>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26168}
2019-01-08 20:08:32 +00:00
Sergey Silkin
d716fb9ecb Reland "Refactor rate profile update."
This is a reland of b6cdfdc165

Original change's description:
> Refactor rate profile update.
>
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
>
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

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

Bug: none
Change-Id: I6ccbb32efe3d52c97e73e248ce5f06d672c9fba5
Reviewed-on: https://webrtc-review.googlesource.com/c/116286
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26155}
2019-01-08 10:35:42 +00:00
Sergey Silkin
08223c1576 Revert "Reland "Refactor rate profile update.""
This reverts commit 77aedaee69.

Reason for revert: breaks VideoCodecTestVideoToolbox tests.

Original change's description:
> Reland "Refactor rate profile update."
> 
> This is a reland of b6cdfdc165
> 
> Original change's description:
> > Refactor rate profile update.
> > 
> > RateProfile::frame_num specifies frame at which this rate profile
> > should be applied.
> > 
> > Bug: none
> > Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Reviewed-by: Seth Hampson <shampson@webrtc.org>
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26080}
> 
> Bug: none
> Change-Id: I2604878d0bbee0f2182ad74e3cc29546310b76f3
> Reviewed-on: https://webrtc-review.googlesource.com/c/115401
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26145}

TBR=ilnik@webrtc.org,shampson@webrtc.org,ssilkin@webrtc.org

Change-Id: Ib53eae70c380eefa303ddb01441f23e32f06b3ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/116285
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26148}
2019-01-07 15:41:17 +00:00
Sergey Silkin
77aedaee69 Reland "Refactor rate profile update."
This is a reland of b6cdfdc165

Original change's description:
> Refactor rate profile update.
> 
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
> 
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

Bug: none
Change-Id: I2604878d0bbee0f2182ad74e3cc29546310b76f3
Reviewed-on: https://webrtc-review.googlesource.com/c/115401
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26145}
2019-01-07 11:18:26 +00:00
Artem Titov
1ebfb6aac7 Introduce VideoFrame::id to keep track of frames inside application.
Also switch webrtc code from deprecated constructors to the builder API.

Change-Id: Ie325bf1e9b4ff1e413fef3431ced8ed9ff725107
Bug: webrtc:10138
Reviewed-on: https://webrtc-review.googlesource.com/c/114422
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26132}
2019-01-04 08:59:26 +00:00
Sergey Silkin
a1f78a4fa6 Revert "Refactor rate profile update."
This reverts commit b6cdfdc165.

Reason for revert: breaks downstream projects

Original change's description:
> Refactor rate profile update.
> 
> RateProfile::frame_num specifies frame at which this rate profile
> should be applied.
> 
> Bug: none
> Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
> Reviewed-on: https://webrtc-review.googlesource.com/c/115242
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26080}

TBR=ilnik@webrtc.org,shampson@webrtc.org,ssilkin@webrtc.org

Change-Id: I5957a0169841008436d1db70403d3694bf25d5cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/115400
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26081}
2018-12-21 09:05:01 +00:00
Sergey Silkin
b6cdfdc165 Refactor rate profile update.
RateProfile::frame_num specifies frame at which this rate profile
should be applied.

Bug: none
Change-Id: I003ee43f44299a49d83f547558284817bfaeacc0
Reviewed-on: https://webrtc-review.googlesource.com/c/115242
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26080}
2018-12-21 08:32:35 +00:00
Jiawei Ou
aa7bc7e0bb Create field trial for vp8 number of thread on iOS.
Without the added preprocessor check, iOS device will be using the desktop logic to determine the number of thread. This put iPhone 8 and iPhone X to use 3 threads and all other iPhones after iPhone 5 to use a single thread.
This CL added a preprocessor for WEBRTC_IOS to have it own thread number calculation logic. In which, the maximum number of thread is fetched from a field_trial and capped by the number of CPU available on the device.

Bug: webrtc:10005
Change-Id: I8c6257fcbf85b07bc986b5f733dbabb3feee37f7
Reviewed-on: https://webrtc-review.googlesource.com/c/110941
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25997}
2018-12-13 07:35:59 +00:00
Niels Möller
48a79465ec Convert all webrtc code to not access EncodedImage::_size directly.
Read using capacity() method, write using set_buffer() method. This is
a preparation for making the member private, and renaming it to
capacity_.

Bug: webrtc:9378
Change-Id: I2f96679d052a83fe81be40301bd9863c87074640
Reviewed-on: https://webrtc-review.googlesource.com/c/113520
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25934}
2018-12-07 16:19:34 +00:00
Ilya Nikolaevskiy
5546aef682 Vp9 flexible mode fixes
- Enable vp9 flexible mode in VideoEngine if 3 spatial layers are set.
- Enable flexible mode in loopback tools and quality tests.
- Reset first active spatial layer on keyframe in encoder.
- Ensure duplicate references are not set by the sender in video header.
- Set references manually for flexible mode in vp9 encoder.
- Delay new activated layers until next base layer frame.
- On receive side put each spatial layer as a separate frame to FrameBuffer
  and return several frames combined from FrameBuffer.

Bug: webrtc:10049,webrtc:9794,webrtc:9784
Change-Id: I01e69f134cc145deba666ccc92deb1d37a324ede
Reviewed-on: https://webrtc-review.googlesource.com/c/112289
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25895}
2018-12-04 15:36:28 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Sergey Silkin
bd04f4ae7f Increase buffer level threshold in VP8/9 tests.
This increases expected value of maximum buffer level in VP8/9 tests
up to 1 second and thus alignes it with the value that WebRTC uses by
default for these codecs.

Bug: webrtc:10017
Change-Id: I8fd41e8006f11c230d844a053c04656408c2ec97
Reviewed-on: https://webrtc-review.googlesource.com/c/111503
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25716}
2018-11-20 16:33:18 +00:00
Mirko Bonadei
22ff1a437a Fix threshold in VideoCodecTestLibvpx.ChangeFramerateVP9.
Libvpx has been recently updated and this test was failing because
of a slightly different value.

TBR=sprang@webrtc.org

Bug: webrtc:10017
Change-Id: I5fe9161eef5c3e1ff8e0dceb36a663648d8f4617
Reviewed-on: https://webrtc-review.googlesource.com/c/111461
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25709}
2018-11-20 13:09:33 +00:00
Mirko Bonadei
8ef57932b1 Switch from RTC_DISABLE_VP9 to RTC_ENABLE_VP9.
RTC_ENABLE_VP9 is more natural to deal with then RTC_DISABLE_VP9.
In all the places this macro is used, WebRTC needs to do more things
so it is easier to "do more if RTC_ENABLE_VP9 is defined" than
"do more if RTC_DISABLE_VP9 is not defined".

Bug: None
Change-Id: If992e5c554173e6af3f030f6e0fd21bd82acf9eb
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/c/111242
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25679}
2018-11-19 08:30:55 +00:00
Jiawei Ou
c2ebe21ba9 Reland "Use the factory instead of using the builtin code path in VideoCodecInitializer"
Compared the original CL: https://webrtc-review.googlesource.com/c/src/+/94782

This new CL added backward compatible functions to WebRtcMediaEngineFactory so that internal projects will not be broken.

Because of that, now we can revert all the changes to SDK and PeerConnection and do it in following CLs. This makes this CL cleaner.

One temporary disadvantage of this is the media engine now need to take a dependency onto builtin video bitrate factory, but practically it just moved code around and should not result in a large binary size change. We can remove this dependency later if needed.

Bug: webrtc:9513
Change-Id: I38708762ff365e4ca05974b99fac71edc739a756
Reviewed-on: https://webrtc-review.googlesource.com/c/109040
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25574}
2018-11-08 19:10:47 +00:00
Niels Möller
c572ff3c71 Add default constructor for rtc::Event
Bug: webrtc:9962
Change-Id: Icaa91e657e6881fcb1553f354c07866109a0ea68
Reviewed-on: https://webrtc-review.googlesource.com/c/109500
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25535}
2018-11-07 08:57:50 +00:00
Qingsi Wang
59844ce57e Revert "Use the factory instead of using the builtin code path in VideoCodecInitializer."
This reverts commit be142178aa.

Reason for revert: breaking internal projects

Original change's description:
> Use the factory instead of using the builtin code path in `VideoCodecInitializer`.
> 
> Bug: webrtc:9513
> Change-Id: Ia299ae1044a3ff4c91e208200938cba540bdcea6
> Reviewed-on: https://webrtc-review.googlesource.com/c/94782
> Commit-Queue: Jiawei Ou <ouj@fb.com>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Seth Hampson <shampson@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25456}

TBR=brandtr@webrtc.org,magjed@webrtc.org,sakal@webrtc.org,nisse@webrtc.org,andersc@webrtc.org,tommi@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,srte@webrtc.org,perkj@webrtc.org,tkchin@webrtc.org,shampson@webrtc.org,glaznev@webrtc.org,ouj@fb.com,qingsi@webrtc.org

Change-Id: I8040ccabe3ae6464d72c7696adb663c1dd275b63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9513
Reviewed-on: https://webrtc-review.googlesource.com/c/108980
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25459}
2018-11-01 04:46:02 +00:00
Jiawei Ou
be142178aa Use the factory instead of using the builtin code path in VideoCodecInitializer.
Bug: webrtc:9513
Change-Id: Ia299ae1044a3ff4c91e208200938cba540bdcea6
Reviewed-on: https://webrtc-review.googlesource.com/c/94782
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25456}
2018-10-31 22:47:02 +00:00
Danil Chapovalov
99b71dfd4a Use function_video_(en|de)coder_factory from api
Remove them from test.
It is completion of the move started with
https://webrtc-review.googlesource.com/c/src/+/107705

Bug: None
Change-Id: Ib0b26db04a1ee814322851280ba1e59b4b3f7ce6
Reviewed-on: https://webrtc-review.googlesource.com/c/107891
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25392}
2018-10-26 14:54:19 +00:00
Erik Språng
e2fd86a79c Move encoder metadata into EncoderInfo struct.
This deprecates the following methods in VideoEncoder:
  virtual ScalingSettings GetScalingSettings() const;
  virtual bool SupportsNativeHandle() const;
  virtual const char* ImplementationName() const;

Though they are not marked RTC_DEPRECATED since we still want to call
them from within the default GetEncoderInfo() until downstream
projects have been updated.

Furthmore, implementation name is changed from const char* to
std:string, which prevents some lifetime issues with dynamic encoder
names, and CodecSpecificInfo.codec_name is removed in favor of getting
the implementation name via GetEncoderInfo().

This CL removes calls to these deprecated methods, follow-ups will also
remove implementations of the methods and replace them with new
GetEncoderInfo() substitutions.

Bug: webrtc:9890
Change-Id: I6fd6e531480c0b952f53dbd5105e0b0adc3e3b0c
Reviewed-on: https://webrtc-review.googlesource.com/c/106905
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25351}
2018-10-25 08:51:53 +00:00
Rasmus Brandt
2d0c68744c Remove |hw_encoder| and |hw_decoder| from VideoCodecTestFixture::Config.
Only used for output filename nowadays. Previously, it was used for
selecting the codec implementation. That is now done by injecting
the appropriate codec factory.

Bug: webrtc:9317
Change-Id: Ia2bf28f7df165fb65410ecd1f5d646ee6604e1be
Reviewed-on: https://webrtc-review.googlesource.com/c/106023
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25204}
2018-10-16 10:59:23 +00:00
Erik Språng
c84cd950b7 Move MockVideoDecoder to api/test.
Move MockVideoDecoder from
modules/video_coding/include/mock/mock_video_codec_interface.h
to
api/test/mock_video_decoder.h

The mock encoder has already moved:
https://webrtc-review.googlesource.com/c/src/+/105620

Keeping the old header until downstream projects have been updated.

Bug: webrtc:9722
Change-Id: I4bc849173a04813064212f17761876695ca3fed4
Reviewed-on: https://webrtc-review.googlesource.com/c/105900
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25170}
2018-10-15 13:45:27 +00:00
Oleh Prypin
a1d9ca47f9 Revert "Add ability to specify if rate controller of video encoder is trusted."
This reverts commit 3e335d1423.

Reason for revert: breaks downstream project

Original change's description:
> Add ability to specify if rate controller of video encoder is trusted.
>
> If rate controller is trusted, we disable the frame dropper in the
> media optimization module.
>
> Bug: webrtc:9722
> Change-Id: I821f21fd74a400ee9d5aa3f6b42d4e569033acbe
> Reviewed-on: https://webrtc-review.googlesource.com/c/105020
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25107}

TBR=brandtr@webrtc.org,ilnik@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,perkj@webrtc.org

Change-Id: Ifdb0aae684894854a184ec1e7423a7c62e7ba237
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9722
Reviewed-on: https://webrtc-review.googlesource.com/c/105360
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25117}
2018-10-11 15:37:40 +00:00
Erik Språng
3e335d1423 Add ability to specify if rate controller of video encoder is trusted.
If rate controller is trusted, we disable the frame dropper in the
media optimization module.

Bug: webrtc:9722
Change-Id: I821f21fd74a400ee9d5aa3f6b42d4e569033acbe
Reviewed-on: https://webrtc-review.googlesource.com/c/105020
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25107}
2018-10-11 09:07:34 +00:00
Sergey Silkin
02fed02c00 Assign spatial_idx in FrameStatistics ctor.
- Add spatial_idx to FrameStatistics ctor.
- Pass FrameStatistics object to AddFrame.

Bug: none
Change-Id: I9d6de449b45a007438f6fd3317176bf45fb23806
Reviewed-on: https://webrtc-review.googlesource.com/101781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24856}
2018-09-27 08:35:29 +00:00
Jonas Olsson
84df1c724e Make fewer copies when using StringBuilder.
Replace calls to .str() which copies with .Release which moves in cases where that's safe.

This CL was generated by this command:
git grep -l 'StringBuilder' |
xargs perl -i -0 -pe "s/(rtc::StringBuilder (\S+);.*?return )\\g2.str\(\)/\$1\$2.Release\(\)/sg"

Bug: webrtc:8982
Change-Id: If4dadbeb039df010aaaa9e58da81c1971a84fe8f
Reviewed-on: https://webrtc-review.googlesource.com/100307
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24790}
2018-09-24 09:39:19 +00:00
Danil Chapovalov
db1285676b Cleanup modules_common_types
Uninline RTPFragmentaion functions
fix RTPFragmentation move constructor and assign operators (was recursive for win)
replace assert with rtc::dchecked_cast
Remove unused includes and dependencies.
Fix other targets that used those includes transitively instead of directly

Bug: None
Change-Id: I647cb1eda107dc7d87d25234095545bc2842fa40
Reviewed-on: https://webrtc-review.googlesource.com/100500
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24759}
2018-09-18 08:08:33 +00:00
Kári Tristan Helgason
640106e1ce Use different thresholds for ARM and x86 in libvpx tests
and audio processing tests.

Bug: webrtc:8757
Change-Id: Ic748fa624ac84af4556cb4b51718106a10fbb787
Reviewed-on: https://webrtc-review.googlesource.com/98540
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24698}
2018-09-12 08:18:33 +00:00
Jonas Olsson
366a50c4ef Remove simple stringstream usages.
This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.

The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.

Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
2018-09-06 12:53:19 +00:00
Niels Möller
d3b8c63b58 Reland "Add spatial index to EncodedImage."
This is a reland of da0898dfae

Original change's description:
> Add spatial index to EncodedImage.
>
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
>
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

Tbr: magjed@webrtc.org
Bug: webrtc:9378
Change-Id: Iff20b656581ef63317e073833d1a326f7118fdfd
Reviewed-on: https://webrtc-review.googlesource.com/96780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24507}
2018-08-31 07:35:52 +00:00
Anders Carlsson
7bca8ca4e2 Obj-C SDK Cleanup
This CL separates the files under sdk/objc into logical directories, replacing
the previous file layout under Framework/.

A long term goal is to have some system set up to generate the files under
sdk/objc/api (the PeerConnection API wrappers) from the C++ code. In the shorter
term the goal is to abstract out shared concepts from these classes in order to
make them as uniform as possible.

The separation into base/, components/, and helpers/ are to differentiate between
the base layer's common protocols, various utilities and the actual platform
specific components.

The old directory layout that resembled a framework's internal layout is not
necessary, since it is generated by the framework target when building it.

Bug: webrtc:9627
Change-Id: Ib084fd83f050ae980649ca99e841f4fb0580bd8f
Reviewed-on: https://webrtc-review.googlesource.com/94142
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24493}
2018-08-30 10:42:41 +00:00
Niels Moller
5a998d7246 Revert "Add spatial index to EncodedImage."
This reverts commit da0898dfae.

Reason for revert: Broke downstream tests.

Original change's description:
> Add spatial index to EncodedImage.
> 
> Replaces the VP8 simulcast index and VP9 spatial index formely part of
> CodecSpecificInfo.
> 
> Bug: webrtc:9378
> Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
> Reviewed-on: https://webrtc-review.googlesource.com/83161
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24485}

TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,philipel@webrtc.org,srte@webrtc.org

Change-Id: Idb4fb9d72e5574d7353c631cb404a1311f3fd148
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9378
Reviewed-on: https://webrtc-review.googlesource.com/96664
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24486}
2018-08-29 14:36:05 +00:00
Niels Möller
da0898dfae Add spatial index to EncodedImage.
Replaces the VP8 simulcast index and VP9 spatial index formely part of
CodecSpecificInfo.

Bug: webrtc:9378
Change-Id: I80eafd63fbdee0a25864338196a690628b4bd3d2
Reviewed-on: https://webrtc-review.googlesource.com/83161
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24485}
2018-08-29 13:50:17 +00:00
Kári Tristan Helgason
f16776280f Add config option to run VideoCodecTest in real time.
It's reasonable to allow clients implementing their own VideoCodecTests
to decide wether they should run in real-time.

Removes the IsAsyncCodec helper, as the assumptions it made are outdated,
and it is no longer useful.

Bug: None
Change-Id: If766935d4947555af54f499a30cfe553bde4c1ab
Reviewed-on: https://webrtc-review.googlesource.com/95722
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24478}
2018-08-29 09:19:25 +00:00
Sergey Silkin
1946a3f0fe Add frame rate parameter to SpatialLayer struct.
This will allow us to configure VP9 encoder to produce spatial layers
with different frame rates.

Bug: webrtc:9650
Change-Id: I3a9c58072003b8a8da681d5291d8f7ede7f52fa4
Reviewed-on: https://webrtc-review.googlesource.com/95427
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24435}
2018-08-26 19:19:36 +00:00
Niels Möller
2377588c82 Add accessor methods for RTP timestamp of EncodedImage.
Intention is to make the member private, but downstream callers
must be updated to use the accessor methods first.

Bug: webrtc:9378
Change-Id: I3495bd8d545b7234fbea10abfd14f082caa420b6
Reviewed-on: https://webrtc-review.googlesource.com/82160
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24352}
2018-08-21 09:15:51 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Niels Möller
5c302c0ec5 Delete obsolete file call/video_config.h.
It was moved to api/video_codecs/video_encoder_config.h in cl
https://webrtc-review.googlesource.com/77683.

Bug: webrtc:8830
Change-Id: I197fd3270d3dea0a5ec98b22cc675c407c388e93
Reviewed-on: https://webrtc-review.googlesource.com/90243
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24092}
2018-07-25 09:11:39 +00:00
Jiawei Ou
4206a0a849 Exposing video bitrate allocator into API
In order to have public video bitrate allocator factory, the video bitrate allocator has be part of
the api.

Bug: webrtc:9513
Change-Id: Ia2e5ab9eb988c710c1ac492afccc470a92544aa2
Reviewed-on: https://webrtc-review.googlesource.com/88083
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#24073}
2018-07-23 21:23:21 +00:00
Emircan Uysaler
0823eecc93 Reland "Reland "Add Profile 2 configuration to VP9 Encoder and Decoder""
This is a reland of cb853c8f90

Original change's description:
> Reland "Add Profile 2 configuration to VP9 Encoder and Decoder"
>
> This is a reland of fc9c4e88b5
>
> Original change's description:
> > Add Profile 2 configuration to VP9 Encoder and Decoder
> >
> > Bug: webrtc:9376
> > Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> > Reviewed-on: https://webrtc-review.googlesource.com/81980
> > Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> > Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Jerome Jiang <jianj@google.com>
> > Cr-Commit-Position: refs/heads/master@{#23917}
>
> Bug: webrtc:9376
> Change-Id: I21fc44865af4e381f99dbc5ae2baf4a53ce834ca
> TBR: niklas.enbom@webrtc.org
> Reviewed-on: https://webrtc-review.googlesource.com/88341
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23974}

TBR: niklas.enbom@webrtc.org
Bug: webrtc:9376
Change-Id: I90d7ebc2110b82901656df7f9331ae82ee010baf
Reviewed-on: https://webrtc-review.googlesource.com/88582
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23977}
2018-07-14 06:51:20 +00:00
Emircan Uysaler
c528c0a07f Revert "Reland "Add Profile 2 configuration to VP9 Encoder and Decoder""
This reverts commit cb853c8f90.

Reason for revert: 
Broke Linux tester on FYI bots, https://ci.chromium.org/buildbot/chromium.webrtc.fyi/Linux%20Tester/46636 .

Original change's description:
> Reland "Add Profile 2 configuration to VP9 Encoder and Decoder"
> 
> This is a reland of fc9c4e88b5
> 
> Original change's description:
> > Add Profile 2 configuration to VP9 Encoder and Decoder
> >
> > Bug: webrtc:9376
> > Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> > Reviewed-on: https://webrtc-review.googlesource.com/81980
> > Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> > Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Jerome Jiang <jianj@google.com>
> > Cr-Commit-Position: refs/heads/master@{#23917}
> 
> Bug: webrtc:9376
> Change-Id: I21fc44865af4e381f99dbc5ae2baf4a53ce834ca
> TBR: niklas.enbom@webrtc.org
> Reviewed-on: https://webrtc-review.googlesource.com/88341
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23974}

TBR=niklase@google.com,jianj@google.com,sprang@webrtc.org,marpan@google.com,niklas.enbom@webrtc.org,emircan@webrtc.org

Change-Id: I23062a0a2e5feafa29fd36e6b1c4a6e2734c4d68
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9376
Reviewed-on: https://webrtc-review.googlesource.com/88600
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23976}
2018-07-13 21:13:27 +00:00
Emircan Uysaler
cb853c8f90 Reland "Add Profile 2 configuration to VP9 Encoder and Decoder"
This is a reland of fc9c4e88b5

Original change's description:
> Add Profile 2 configuration to VP9 Encoder and Decoder
>
> Bug: webrtc:9376
> Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> Reviewed-on: https://webrtc-review.googlesource.com/81980
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Jerome Jiang <jianj@google.com>
> Cr-Commit-Position: refs/heads/master@{#23917}

Bug: webrtc:9376
Change-Id: I21fc44865af4e381f99dbc5ae2baf4a53ce834ca
TBR: niklas.enbom@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/88341
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23974}
2018-07-13 19:30:36 +00:00
Qingsi Wang
2d82adea03 Revert "Add Profile 2 configuration to VP9 Encoder and Decoder"
This reverts commit fc9c4e88b5.

Reason for revert: Speculative revert. I suspect this breaks the internal importing tests. Will reland it if it is not the culprit.

Original change's description:
> Add Profile 2 configuration to VP9 Encoder and Decoder
> 
> Bug: webrtc:9376
> Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
> Reviewed-on: https://webrtc-review.googlesource.com/81980
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Jerome Jiang <jianj@google.com>
> Cr-Commit-Position: refs/heads/master@{#23917}

TBR=niklase@google.com,jianj@google.com,sprang@webrtc.org,marpan@google.com,niklas.enbom@webrtc.org,emircan@webrtc.org

Change-Id: I6a8c851827707eb861776591087e595de7206ae4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9376
Reviewed-on: https://webrtc-review.googlesource.com/88100
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23920}
2018-07-11 06:04:49 +00:00
Emircan Uysaler
fc9c4e88b5 Add Profile 2 configuration to VP9 Encoder and Decoder
Bug: webrtc:9376
Change-Id: I4f627fb2b6c146a90cfcaa815da459b09dc00003
Reviewed-on: https://webrtc-review.googlesource.com/81980
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jerome Jiang <jianj@google.com>
Cr-Commit-Position: refs/heads/master@{#23917}
2018-07-10 22:47:52 +00:00
Sami Kalliomäki
c75a5e8dd6 Change test VideoProcessor kMaxBufferedInputFrames from 10 to 20.
Value 10 seems to be too small for some implementations. Updates the
value to 20. This affects VideoCodecTestFixture.

Bug: None
Change-Id: Ibbeb7cb5ef23f8ac625d37aaa764c9d245f23e9d
Reviewed-on: https://webrtc-review.googlesource.com/87562
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23882}
2018-07-09 11:56:43 +00:00
Erik Språng
5e898d612e Stop using VideoCodec.targetBitrate for vp8 screenshare config
This is a step toward simplifying the VideoCodec struct and removing the
targetBitrate. The hard-coded values now reside in
SimulcastRateAllocator.

A follow-up will do away with the field altogether.

Bug: webrtc:9504
Change-Id: I74d483682309d363048fbbbd31e0607d7242f504
Reviewed-on: https://webrtc-review.googlesource.com/87424
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23876}
2018-07-06 15:13:18 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Rasmus Brandt
7b92ceb0ee Ensure that input_frames_.size() <= kMaxBufferedInputFrames at enqueue time.
Bug: webrtc:9452
Change-Id: I6d415a2cb24461d7359ff30e6499d65d88d2b2f8
Reviewed-on: https://webrtc-review.googlesource.com/85371
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23846}
2018-07-05 07:08:59 +00:00
Sami Kalliomäki
451b29c49c Make a copy of the frame if the processing has to be posted.
Since the frame is processed on the same thread as the decoding happens
on, keeping a reference to the frame may cause deadlocks on some
implementations.

Longer term, we should probably move the frame processing to a separate
thread but this is an easy fix for now.

Bug: b/110246814
Change-Id: I251737e2188e1755d45b35165586d1b0daf14595
Reviewed-on: https://webrtc-review.googlesource.com/87104
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23843}
2018-07-04 14:11:24 +00:00
Rasmus Brandt
58cd385e58 Fix potential division by zero in VP9 VideoCodecTest.
When GetSvcConfig returned fewer spatial layers than the number
statically configured from the test, we would crash on a SIGFPE.

This is not a problem in the production code, since there we
reset the encoder with the correct number of spatial layers
whenever the resolution changes.

Bug: None
Change-Id: I339e4a3c0fa993c7c649533c0eae71e1314194e7
Reviewed-on: https://webrtc-review.googlesource.com/85374
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23741}
2018-06-26 12:58:25 +00:00