Commit graph

461 commits

Author SHA1 Message Date
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
Erik Språng
d92288f5ba Add experimental shortened 2-temporal-layer setting
Also adjust to base-layer fraction for the shortened 3-tl pattern to be
60%, just like the 2-tl setting.

This CL removes direct use of the allocation matrix and moves it behind
a static getter.

Bug: webrtc:9477
Change-Id: Ifd7d1edffa0555024fd252834357b926997d13b5
Reviewed-on: https://webrtc-review.googlesource.com/86681
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23834}
2018-07-04 09:25:21 +00:00
Emircan Uysaler
98badbcd9f Add VP9 profile negotiation to SDP
This CL adds VP9 profile information in SDP. It adds the necessary fields and
enums to codec containers.

Additional profiles will be followed.

Bug: webrtc:9376
Change-Id: I78574714f06f8087262a71dd64c01f31a229dd54
Reviewed-on: https://webrtc-review.googlesource.com/81960
Reviewed-by: Taylor (left Google) <deadbeef@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23810}
2018-07-02 23:38:41 +00:00
Björn Terelius
425193b4a9 Revert "Unit test for case where the number of active and configured spatial"
This reverts commit 5eb6045ce5.

Reason for revert: Test breaks downstream.

Original change's description:
> Unit test for case where the number of active and configured spatial
> layers differ.
> 
> Bug: webrtc:9472
> Change-Id: I5cf292a12d73777ca0fd5771eb1a4756626f640c
> Reviewed-on: https://webrtc-review.googlesource.com/85644
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23782}

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

Change-Id: Ib97cdb127e79ee969f7cb3f931cb7bd533f13af0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9472
Reviewed-on: https://webrtc-review.googlesource.com/86320
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23785}
2018-06-29 12:01:38 +00:00
“Michael
5eb6045ce5 Unit test for case where the number of active and configured spatial
layers differ.

Bug: webrtc:9472
Change-Id: I5cf292a12d73777ca0fd5771eb1a4756626f640c
Reviewed-on: https://webrtc-review.googlesource.com/85644
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23782}
2018-06-29 10:38:57 +00:00
“Michael
67c8bcf804 Revert two instances of num_active_spatial_layers.
The variable, num_active_spatial_layers, is used to construct ssData.
This CL reverts two instances of num_active_spatial_layers not
related to ssData construction.

Bug: None
Change-Id: I4d90d4578684dfdf8bd5a39c7a2fe778fce4414c
Reviewed-on: https://webrtc-review.googlesource.com/85643
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23756}
2018-06-27 10:49:00 +00:00
Sergey Silkin
fe288eb687 Don't call deprecated FFmpeg API.
This removes call of av_register_all(), which is deprecated, and
related code.

Bug: webrtc:9352
Change-Id: Ib7de5931c900eaf1023ecf3046f560feaaeec8ef
Reviewed-on: https://webrtc-review.googlesource.com/85347
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23743}
2018-06-26 13:57:35 +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
“Michael
23c5a99381 Fix for VP9 K-SVC video freeze frame when send bandwidth is restricted.
Added distinction between number of configured and number of actively
encoded spatial layers and include number of actively encoded spatial
layers in ssData.  Modified layer_filtering_transport.cc test to
parse from the RTP header and use the number of actively encoded
spatial layers for filtering spatial video layers.

Bug: webrtc:9425
Change-Id: Ic9f8895ab08b0626f9bb53a75ec33d8e7eb8706e
Reviewed-on: https://webrtc-review.googlesource.com/84243
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23716}
2018-06-21 17:53:35 +00:00
Sergio Garcia Murillo
43800f95bf Generalize SimulcastEncoderAdapter, use for H264 & VP8.
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
  under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.

TBR=sprang@webrtc.org,stefan@webrtc.org,titovartem@webrtc.org

Bug: webrtc:5840
Change-Id: I2d3b130622dd7ceec5528f3ab6c46f109e6bafb8
Reviewed-on: https://webrtc-review.googlesource.com/84743
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23715}
2018-06-21 15:57:43 +00:00
Mirko Bonadei
6f440ed5b5 Revert "Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8."
This reverts commit 07efe436c9.

Reason for revert: Breaks downstream project.

cricket::GetSimulcastConfig method signature has been updated.
I think you can get away with a default value for temporal_layers_supported (and then you can remove it after a few days when projects will be updated).


Original change's description:
> Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
> 
> * Move SimulcastEncoderAdapter out under modules/video_coding
> * Move SimulcastRateAllocator back out to modules/video_coding/utility
> * Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
> * Move any VP8 specific code - such as temporal layer bitrate budgeting -
>   under codec type dependent conditionals.
> * Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
> 
> Bug: webrtc:5840
> Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
> Reviewed-on: https://webrtc-review.googlesource.com/64100
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23705}

TBR=sprang@webrtc.org,stefan@webrtc.org,mflodman@webrtc.org,hta@webrtc.org,sergio.garcia.murillo@gmail.com,titovartem@webrtc.org,agouaillard@gmail.com

Change-Id: Ic9d3b1eeaf195bb5ec2063954421f5e77866d663
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5840
Reviewed-on: https://webrtc-review.googlesource.com/84760
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23710}
2018-06-21 13:41:14 +00:00
Sergio Garcia Murillo
07efe436c9 Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
  under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.

Bug: webrtc:5840
Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
Reviewed-on: https://webrtc-review.googlesource.com/64100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23705}
2018-06-21 12:23:03 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
0040b66ad3 Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
2018-06-18 10:24:48 +00:00
Niels Möller
e3cf3d0496 Use enum class for VideoCodecMode and VideoCodecComplexity.
Bug: webrtc:7660
Change-Id: I6a8ef01f8abcc25c8efaf0af387408343a7c8ba3
Reviewed-on: https://webrtc-review.googlesource.com/81240
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23595}
2018-06-13 12:26:09 +00:00
Niels Möller
a46bd4b9c7 Reland "Move class VideoCodec from common_types.h to its own api header file."
This is a reland of efc71e565e

Differs from the original cl by not widening the type of
VideoCodec::width and VideoCodec::height.

Original change's description:
> Move class VideoCodec from common_types.h to its own api header file.
>
> Bug: webrtc:7660
> Change-Id: I91f19bfc2565461328f30081f8383e136419aefb
> Reviewed-on: https://webrtc-review.googlesource.com/79881
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23544}

Bug: webrtc:7660
Change-Id: I7cf74a85a61ea2b831e6f32b3b3e17514ebefec8
Reviewed-on: https://webrtc-review.googlesource.com/82140
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23569}
2018-06-11 19:23:20 +00:00
Niels Möller
2ac64467c4 Document that preferred VideoFrame constructor takes no RTP timestamp.
And update most internal calls to use it.

Bug: webrtc:5740, webrtc:9372
Change-Id: Ib57d4ebfa7b0729af6d22981a792f0fdadf8a13f
Reviewed-on: https://webrtc-review.googlesource.com/81743
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23567}
2018-06-11 18:42:40 +00:00
Patrik Höglund
443e71f528 Revert "Disabling VeryLowBitrateVP9 to unblock roll."
This reverts commit 16e28d143a.

Reason for revert: Fix has supposedly landed upstream.

Original change's description:
> Disabling VeryLowBitrateVP9 to unblock roll.
> 
> This should be re-enabled very soon since the libvpx thinks this
> is fixed upstream and is only waiting for merge.
> 
> TBR=marpan@google.com
> 
> Bug: webrtc:9292
> Change-Id: Ib78ea1462059c333b7168a52756329dc9a385b54
> Reviewed-on: https://webrtc-review.googlesource.com/81660
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23525}

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

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

Bug: webrtc:9292
Change-Id: I995953070536e8ee3540e7c30bc11dc1200e0463
Reviewed-on: https://webrtc-review.googlesource.com/82200
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23552}
2018-06-08 13:55:25 +00:00
Danil Chapovalov
350531e2a3 Revert "Move class VideoCodec from common_types.h to its own api header file."
This reverts commit efc71e565e.

Reason for revert: probably breaks downstream test

Original change's description:
> Move class VideoCodec from common_types.h to its own api header file.
> 
> Bug: webrtc:7660
> Change-Id: I91f19bfc2565461328f30081f8383e136419aefb
> Reviewed-on: https://webrtc-review.googlesource.com/79881
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23544}

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

Change-Id: Id8bd37c79c2f8d09a4d88368765230103f1db2c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7660
Reviewed-on: https://webrtc-review.googlesource.com/82101
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23547}
2018-06-08 11:04:23 +00:00
Niels Möller
efc71e565e Move class VideoCodec from common_types.h to its own api header file.
Bug: webrtc:7660
Change-Id: I91f19bfc2565461328f30081f8383e136419aefb
Reviewed-on: https://webrtc-review.googlesource.com/79881
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23544}
2018-06-08 07:55:04 +00:00
Rasmus Brandt
5e8fd8ad49 Add simulcastStream output from VideoCodecTestFixture::Config::ToString.
Bug: None
Change-Id: I06c6ac077bb31608b4776e90d548a6e71ca1c252
Reviewed-on: https://webrtc-review.googlesource.com/81186
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23541}
2018-06-08 07:37:50 +00:00
Rasmus Brandt
086de82f51 Add bitrate_priority to GetSimulcastConfig call.
Bug: webrtc:9368
Change-Id: I72317493db02835362c0e6127e6e4c25a5709d63
Reviewed-on: https://webrtc-review.googlesource.com/81661
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23540}
2018-06-08 07:04:44 +00:00
Niels Möller
97e04884bd Delete unused stats for preferred_bitrate.
Bug: webrtc:8830
Change-Id: Iaa30488255f2e09e269274136d370740cd030902
Reviewed-on: https://webrtc-review.googlesource.com/78880
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23529}
2018-06-07 08:11:07 +00:00
Patrik Höglund
16e28d143a Disabling VeryLowBitrateVP9 to unblock roll.
This should be re-enabled very soon since the libvpx thinks this
is fixed upstream and is only waiting for merge.

TBR=marpan@google.com

Bug: webrtc:9292
Change-Id: Ib78ea1462059c333b7168a52756329dc9a385b54
Reviewed-on: https://webrtc-review.googlesource.com/81660
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23525}
2018-06-07 07:34:27 +00:00
Ilya Nikolaevskiy
b6c462d4e4 Cleanup webrtc:: namespace from leaked TimingFrameFlags
Bug: webrtc:9351
Change-Id: Ifbc0a522bf13ab62a2e490b9f129eacfabe7796f
Reviewed-on: https://webrtc-review.googlesource.com/80961
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23520}
2018-06-05 13:52:04 +00:00
Erik Språng
27300c3546 Allow 3 encoder threads in libvpx for HD on > 6 core cpus
Bug: webrtc:4172
Change-Id: I50446779403eff0fe2e840afc6cfab9f8a310b1a
Reviewed-on: https://webrtc-review.googlesource.com/77981
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23511}
2018-06-04 16:48:09 +00:00
Mirko Bonadei
adb4841173 Remove explicit locking using av_lockmgr_register
av_lockmgr_register is deprecated and no-op since
a04c2c707d

Bug: webrtc:8745
Change-Id: I284c9a6edf88a584c3a5cb5dfae4ccf1be1f8851
Reviewed-on: https://webrtc-review.googlesource.com/39503
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23508}
2018-06-04 12:17:07 +00:00
“Michael
277a656263 Unstable BWE due to improper bit rate padding for VP9.
Bug: webrtc:9345
Change-Id: I5b1e0b4ed7a8c1d0b942b09433017cac6d53c64b
Reviewed-on: https://webrtc-review.googlesource.com/79000
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23496}
2018-06-01 20:07:06 +00:00
Taylor Brandstetter
28deb90728 Reland "Start supporting H264 packetization mode 0."
This is a reland of 3409cfa378

Needed to change RtpVideoStreamReceiver to stop deregistering a payload
type if two payload types refer to the same codec (which now happens,
with the packetization mode 0/1 payload types). It's not clear why this
was being done in the first place.

Original change's description:
> Start supporting H264 packetization mode 0.
>
> The work was already done to support it, but it wasn't being negotiated
> in SDP.
>
> This means we'll now see 8 H264 payload types instead of 4; one for each
> combination of BP/CBP profiles, packetization modes 0/1, and RTX/non-RTX.
> This could be problematic in the future, since we're starting to run
> out of dynamic payload types (using 25 of 32).
>
> Bug: chromium:600254
> Change-Id: Ief2340db77c796f12980445b547b87e939170fae
> Reviewed-on: https://webrtc-review.googlesource.com/77264
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23372}

Bug: chromium:600254
Change-Id: Ice1acc05acd1543d9b46e918de2bba0694d86259
Reviewed-on: https://webrtc-review.googlesource.com/78399
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23494}
2018-06-01 18:03:06 +00:00
Sergey Silkin
d45b345700 Set max_consec_drop to INT_MAX.
Set recently added max_consec_drop parameter to INT_MAX to keep behavior
of frame dropping logic unchanged.

Bug: none
Change-Id: Ie1d4b428cabc7182ed325c7de4ba8a42cdc826b1
Reviewed-on: https://webrtc-review.googlesource.com/79148
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/master@{#23482}
2018-06-01 08:30:02 +00:00
Rasmus Brandt
0cedc054a2 Refactor SimulcastTestUtility into SimulcastTestFixture{,Impl}
This will allow exposing the interface to downstream users that
want to test VP8 simulcast. No functional changes to the tests
themselves are expected.

Bug: webrtc:9281
Change-Id: I4128b8f35a4412c5b330cf55c8dc0e173d4570da
Reviewed-on: https://webrtc-review.googlesource.com/77361
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23469}
2018-05-31 11:48:17 +00:00
Sergey Silkin
ee20336f6e Drop entire superframe if any layer is overshooting.
Use new frame dropping mode - FULL_SUPERFRAME_DROP - in VP9 encoder and
configure it to drop entire superframe if any layer is overshooting.

Bug: none
Change-Id: Ie22ed5c175e530bcce365d40cba0d10cb608ad4f
Reviewed-on: https://webrtc-review.googlesource.com/79622
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23447}
2018-05-30 11:23:15 +00:00
Rasmus Brandt
2aae2733a7 Remove adapter bools from VideoCodecTestFixture::Config.
It should be the responsibility of the fixture user to provide the exact
codecs that should be tested instead. This reduces the coupling between
the test fixture and the codec instantiation.

Bug: webrtc:9317
Change-Id: I60d8f5c4b516ba33e2293d574ba17602c39f992b
Reviewed-on: https://webrtc-review.googlesource.com/79147
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23425}
2018-05-29 08:02:13 +00:00
Rasmus Brandt
7c1ccfa881 Move VisualizationParams to VideoCodecTestFixture::Config.
Bug: None
Change-Id: I0a725535c840dda2704dfff33f5e5d3bef3fc0a7
Reviewed-on: https://webrtc-review.googlesource.com/78882
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23422}
2018-05-29 07:18:04 +00:00
Ilya Nikolaevskiy
97b4ee5b4c Wire up VAAPI VP8 experimental support in WebRTC.
Experiment flag added to PeerConnectionInterface::RtcConfiguration and
propagated down to VideoStreamEncoder.

Artificial Sdp parameter is added to the sdp format if the flag is set.

Additionally, sdp format is propagated in vp8 simulcast adapters.

Bug: chromium:794608
Change-Id: I2dec54d19ae7bfbd5f2777ec682da5a84194da94
Reviewed-on: https://webrtc-review.googlesource.com/78500
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23412}
2018-05-28 12:30:19 +00:00
Sergey Silkin
4e6cd5eaeb Get actual list of references from encoder in flexible mode.
In flexible mode, use VP9E_GET_SVC_REF_FRAME_CONFIG to get indices of
reference frame buffers and buffers update by encoded frame.

Set inter_pic_predicted to true only if encoder actually used temporal
prediction.

Bug: webrtc:9244, webrtc:9270
Change-Id: I4e439abeab9e063d50abdcefc59bf58d6596ea6c
Reviewed-on: https://webrtc-review.googlesource.com/74780
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Cr-Commit-Position: refs/heads/master@{#23410}
2018-05-28 11:35:49 +00:00
Jerome Jiang
0c2e8ce212 Initialize svc_drop_frame in vp9 wrapper.
Thus we don't need to initialize new members added to the structure
in the future.

Bug: None
Change-Id: Id9f5b127c224660f3016973261045b4231a617c1
Reviewed-on: https://webrtc-review.googlesource.com/79080
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23404}
2018-05-28 08:23:19 +00:00
Rasmus Brandt
bc84685497 Remove VideoCodecTestFixtureImpl dependency on Android specifics.
This is needed for downstream users of the impl, as we currently pull
in Chromium specifics in the android_codec_factory_helper. Further,
the downstream users should explicitly supply their own factories
if they do not want to use the internal ones.

Bug: None
Change-Id: Ia7b01a66aadaba3d5accf44e5ca38e1a319e4e34
Reviewed-on: https://webrtc-review.googlesource.com/78420
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23390}
2018-05-24 16:20:11 +00:00
Taylor Brandstetter
223cc4b0e7 Revert "Start supporting H264 packetization mode 0."
This reverts commit 3409cfa378.

Reason for revert: Broke WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsH264 on Windows 7/10 bots

Original change's description:
> Start supporting H264 packetization mode 0.
> 
> The work was already done to support it, but it wasn't being negotiated
> in SDP.
> 
> This means we'll now see 8 H264 payload types instead of 4; one for each
> combination of BP/CBP profiles, packetization modes 0/1, and RTX/non-RTX.
> This could be problematic in the future, since we're starting to run
> out of dynamic payload types (using 25 of 32).
> 
> Bug: chromium:600254
> Change-Id: Ief2340db77c796f12980445b547b87e939170fae
> Reviewed-on: https://webrtc-review.googlesource.com/77264
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23372}

TBR=deadbeef@webrtc.org,magjed@webrtc.org,sprang@webrtc.org

Change-Id: I2f2a2b4ca20ba883764cd5265911e1453d3df66e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:600254
Reviewed-on: https://webrtc-review.googlesource.com/78398
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23374}
2018-05-23 18:17:25 +00:00
Erik Språng
c8caaec92b Directly include VideoBitrateAllocation in common_video/ targets
Bug: webrtc:9271
Change-Id: Id31459c4ccdee1b5a65499423af5c575d5317231
Reviewed-on: https://webrtc-review.googlesource.com/76942
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23373}
2018-05-23 17:57:14 +00:00
Taylor Brandstetter
3409cfa378 Start supporting H264 packetization mode 0.
The work was already done to support it, but it wasn't being negotiated
in SDP.

This means we'll now see 8 H264 payload types instead of 4; one for each
combination of BP/CBP profiles, packetization modes 0/1, and RTX/non-RTX.
This could be problematic in the future, since we're starting to run
out of dynamic payload types (using 25 of 32).

Bug: chromium:600254
Change-Id: Ief2340db77c796f12980445b547b87e939170fae
Reviewed-on: https://webrtc-review.googlesource.com/77264
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23372}
2018-05-23 17:18:14 +00:00
Kári Tristan Helgason
169005d8c1 Move VideoCodecTest configuration classes to api/test.
These files are required when implementing tests based on the test fixture,
and should be exposed as part of the test api.

This CL also removes a usage of stringstream and fixes some chromium-style
lint issues.

Bug: webrtc:8982, webrtc:163
Change-Id: I132aea0da79a79587887f21897236fc9802b7574
Reviewed-on: https://webrtc-review.googlesource.com/74586
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23346}
2018-05-22 12:14:38 +00:00
Niels Möller
401d07690b Delete deprecated VideoDecoder::Decode method
Follow up to https://webrtc-review.googlesource.com/c/src/+/39511,
which introduced a new Decode method, without the
RTPFragmentationHeader argument, and deprecated the old method.

Bug: webrtc:6471
Change-Id: Icd3c536ebedd4e3c2d57fdb4d6e078d6ff1de5b6
Reviewed-on: https://webrtc-review.googlesource.com/75180
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23339}
2018-05-22 08:17:03 +00:00
Niels Möller
65ec0fc81e Delete unneeded includes of basictypes.h.
This is a kitchen-sink header, some pieces should be moved to
byteorder.h, the rest likely deleted.

Delete most includes of basictypes.h. In leaf headers,
include stddef.h and stdint.h explicitly where needed.

Bug: webrtc:6853
Change-Id: Ibc809936a8f94d418e4eb650da1e89c1b9142073
Reviewed-on: https://webrtc-review.googlesource.com/77721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23333}
2018-05-21 19:35:08 +00:00
Sergey Silkin
d902d58b0a Framerate controller for VP9 screen sharing.
- Limit framerate by dropping frames before encoding.
- The max framerate at screen sharing is set to 5fps.

Bug: webrtc:9261
Change-Id: Icfbbecce33fdce2d746291708db0108e0ba10760
Reviewed-on: https://webrtc-review.googlesource.com/76921
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23316}
2018-05-19 07:14:48 +00:00
Sergey Silkin
be71a1ee08 Replace VP9 screen sharing.
- Remove referencing control from encoder wrapper. Use fixed temporal
prediction structure.
- Remove flexible mode from encoder wrapper. It only worked with
referencing control which this CL removes.
- Remove external framerate/bitrate controller. Keep codec's internal
frame dropping enabled at screen sharing.
- Use GetSvcConfig() to configure layering.

Bug: webrtc:9261
Change-Id: I355baa6aab7b98ac5028b3851d1f8ccc82a308e0
Reviewed-on: https://webrtc-review.googlesource.com/76801
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23311}
2018-05-18 15:11:46 +00:00
Kári Tristan Helgason
8eeda499f7 Enable more VideoCodecTests on iOS.
Bug: webrtc:4755
Change-Id: I403834dbe04cc3899847eb10e5595a24e6001507
Reviewed-on: https://webrtc-review.googlesource.com/76602
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23273}
2018-05-17 09:13:31 +00:00
Rasmus Brandt
8dd4db49e2 Create/destroying codecs on task queue + switch to TaskQueueForTest.
After https://webrtc-review.googlesource.com/c/src/+/70740, we are
creating/destroying the codecs on a task queue in the VideoStreamEncoder. This
CL updates the VideoCodecTest to do the same.

Also, this CL switches from manually Wait()'ing on the task queue to using
TaskQueueForTest::SendTask.

Bug: None
Change-Id: Ia0398b24e32e9cc5361ba5ee4c08441116def18e
Reviewed-on: https://webrtc-review.googlesource.com/76800
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23257}
2018-05-16 08:15:23 +00:00
Rasmus Brandt
8694f29b30 Rename VideoProcessorIntegrationTest -> VideoCodecTest.
This CL simply renames the test cases that were not renamed in
prior CLs.

Bug: None
Change-Id: If616eb823e1453bc92ba037722b77a219d54409c
Reviewed-on: https://webrtc-review.googlesource.com/76780
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23240}
2018-05-15 11:28:21 +00:00
Rasmus Brandt
a7e4844298 Move H.264 codec test activation directly behind build flag.
Bug: None
Change-Id: I5dd366aba16b440a8e99826e116db0d6b68bf844
Reviewed-on: https://webrtc-review.googlesource.com/76621
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23231}
2018-05-15 08:00:00 +00:00
Sergey Silkin
dfe8ca0d43 Layering and rate allocation for VP9 screen sharing.
- Two quality layers (same resolution, different bitrate).
- Max bitrate of low layer is limited to 200kbps. The choice of the
limit is driven by VP8 screen sharing which limits max bitrate of low
temporal layer to 200kbps. Using the same value for VP9 guarantees
that there will be no regressions for participants with limited
bandwidth.
- Max bitrate of high layer is limited to 500kbps. According to test
results this value is enough to get up to +5dB higher PSNR than VP8
SS provides on 1.2Mbps (max total bitrate for VP8 SS) link.
- Max total sent bitrate is limited to 700kbps. It is 500kbps lower
than that in VP8 SS (1200kbps).

Bug: webrtc:9261
Change-Id: I7919cc3933064664567c39e380a44cad0c65f1e8
Reviewed-on: https://webrtc-review.googlesource.com/76380
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23226}
2018-05-15 07:06:10 +00:00
“Michael
b54500ec32 VP9 SVC minimum bit rate thresholds too low for 720p
Changed minimum bit rate threshold formula to raise the minimum bit rate
at which 720p video is presented in VP9 SVC to ensure that the video
quality for VP9 SVC is the same or better than VP8 SIM.  The minimum bit
rate threshold values for lower resolutions remain largely unchanged.
Also changed maximum bit rate threshold formula to lower the maximum
bit rate for low resolutions (e.g., 180p) in order to ensure higher
frame rates when downlink bit rates are very low (e.g., < 100 kbps).

Bug: webrtc:9242
Change-Id: I8f9c76c9188b98f3fd40a608551b576b0c3b8f34
Reviewed-on: https://webrtc-review.googlesource.com/75244
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23218}
2018-05-14 15:48:29 +00:00
Sergey Silkin
377ef24a8f Remove extra reference from GOF.
This removes second reference for frame 3 in GOF predefined for 3
temporal layers since encoder never use that reference.

Bug: webrtc:9245
Change-Id: I6fbdbe7d3c753dda7fbcfcbd05f3530f70f80728
Reviewed-on: https://webrtc-review.googlesource.com/74705
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23193}
2018-05-09 18:18:43 +00:00
Sami Kalliomäki
ee98be7811 Fix handling non-tightly packed ByteBuffers in HardwareVideoDecoder.
Before this CL, there would be an out-of-bounds write in the ByteBuffer
copying when a decoded frame had height != sliceHeight.

Bug: webrtc:9194
Change-Id: Ibb80e5555e8f00d9e1fd4cb8a73f5e4ccd5a0b81
Tested: 640x360 loopback with eglContext == null in AppRTCMobile on Pixel.
Reviewed-on: https://webrtc-review.googlesource.com/74120
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23184}
2018-05-09 09:15:46 +00:00
Niels Möller
8df3a388a3 Deprecate RTPFragmentationHeader argument to VideoDecoder::Decode
Intend to delete in a later cl.

Bug: webrtc:6471
Change-Id: Icf0fcd40e0d3287dc59b684fae6552b40b47204a
Reviewed-on: https://webrtc-review.googlesource.com/39511
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23162}
2018-05-08 08:09:35 +00:00
“Michael
e8492fee6b Mitigate RTP pic ID errors in VP9 SVC non-flexible mode
The code changes in this CL configure VP9 SVC to drop a superframe when
the spatial base layer is dropped and to not drop upper spatial layers
when the spatial base layer is not dropped. The changes are effective in
non-flexible mode when codec_.mode == kRealtimeVideo and
number of spatial layers > 1.

Bug: none
Change-Id: I27481b78f733cfc6c007d1ad9f45d69263853149
Reviewed-on: https://webrtc-review.googlesource.com/74261
Commit-Queue: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23127}
2018-05-04 16:25:54 +00:00
Kári Tristan Helgason
9d96e92316 Rewrite videoprocessor integrationtest to use public fixture.
This CL creates a test fixture for the videoprocessor integration tests
and exposes it as part of the public API. It also rewrites the current
versions of the tests to build on this new paradigm. The motivation for
this is to easily allow projects that build on top of webrtc to add
integration-level tests for their own custom codec implementations in a
way that does not link them too tightly to the internal implementations
of said tests.

Bug: None
Change-Id: I7cf9f29322a6934b3cfc32da02ea7dfa5858c2b2
Reviewed-on: https://webrtc-review.googlesource.com/72481
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23118}
2018-05-04 12:02:44 +00:00
Sergey Silkin
bd0954e83f Encode key frame when enabling upper layer.
Request key frame when upper spatial layer is enabled dynamically
and inter-layer prediction is disabled or limited to key pictures.

This is needed to force encoder to produce RTP compatible bitstream
where temporal prediction is limited to the same spatial layer.

Bug: webrtc:9217
Change-Id: I4fc1e3f067689ba7b5c6bd1f5af922a0637f03d7
Reviewed-on: https://webrtc-review.googlesource.com/73580
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23102}
2018-05-03 13:22:01 +00:00
Jonas Olsson
3e18c82820 Reland "Reland "Remove our stream << overloads from non-test build targets.""
This is a reland of d7ee72041f

Original change's description:
> Reland "Remove our stream << overloads from non-test build targets."
>
> This is a reland of c841d18d25
>
> Original change's description:
> > Remove our stream << overloads from non-test build targets.
> >
> > Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and
> > SocketAddress are kept behind gtest's #ifdef UNIT_TEST.
> >
> > Bug: webrtc:8982
> > Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70
> > Reviewed-on: https://webrtc-review.googlesource.com/64143
> > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> > Reviewed-by: Benjamin Wright <benwright@webrtc.org>
> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22916}
>
>
> Bug: webrtc:8982
> Change-Id: Ibe08c6270e5e693eb661a6ce9e8f074b34ef8123
> Reviewed-on: https://webrtc-review.googlesource.com/71161
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22949}

TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org

Bug: webrtc:8982
Change-Id: I29247d1c28e99af36ef228d8c75b4adecbd7b199
Reviewed-on: https://webrtc-review.googlesource.com/72681
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23092}
2018-05-03 10:41:41 +00:00
Kári Tristan Helgason
cad94449dd Remove H264 CHP field trial code.
Bug: webrtc:8317
Change-Id: I2da3cc6578dd8ff6e88052bc33cd38cb92af46dc
Reviewed-on: https://webrtc-review.googlesource.com/73242
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23077}
2018-05-02 13:42:37 +00:00
Sergey Silkin
5613879b7b Fill drops with last decoded frame.
Fill drops with last decoded frame to make them look like freeze at
playback and to keep decoded spatial layers in sync.

Bug: none
Change-Id: I65f7c21100985c22932a1edd441b6c724833c11e
Reviewed-on: https://webrtc-review.googlesource.com/73685
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23076}
2018-05-02 10:46:06 +00:00
Sergey Silkin
3c30c9cb9f Decode base reference frame if current layer was dropped.
If frame of current layer was dropped, pass base frame to decoder if
non_ref_for_inter_layer_pred is set to true.

Bug: none
Change-Id: If7bf5220b74f424106edf74867c9afa8cc2b1ec5
Reviewed-on: https://webrtc-review.googlesource.com/73440
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23074}
2018-05-02 10:17:01 +00:00
Sergey Silkin
6a8f30e5a3 Add control for inter-layer prediction mode.
This allows to control inter-layer prediction at encoding VP9 SVC.
There are three options:
1. Disabled.
2. Enabled for all pictures.
3. Enabled for key pictures, disabled for others.

Inter-layer prediction is enabled for all pictures by default.

Bug: none
Change-Id: I49fe43d8744c92bec349d815100ba158519f0664
Reviewed-on: https://webrtc-review.googlesource.com/71500
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23049}
2018-04-27 06:20:15 +00:00
Sergey Silkin
bc0f0d3ded Rename end_of_superframe to end_of_picture.
For consistency with the VP9 RTP spec which uses term "picture" for set
of frames which belong to the same time instance.

Bug: none
Change-Id: I30e92d5debb008feb58f770b63fe10c2e0029267
Reviewed-on: https://webrtc-review.googlesource.com/72180
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23040}
2018-04-26 15:47:17 +00:00
Niels Möller
65fb4049c1 Don't expose resilience mode in VP8 and VP9 configuration.
This deletes the resilienceOn flag in VideoCodecVP8 and VideoCodecVP9.
Instead, the implementations of VP8 and VP9 set resilience mode
internally, based on the configuration of temporal and spatial layers.

The nack_enabled argument to VideoCodecInitializer::SetupCodec becomes
unused with this cl. In a followup, it will be deleted, together with
the corresponding argument to VideoStreamEncoder methods.

An applications which really wants to configure resilience differently
can do that by injecting an EncoderFactory with encoders behaving
as desired.

Bug: webrtc:8830
Change-Id: I9990faf07d3e95c0fb4a56fcc9a56c2005b4a6fa
Reviewed-on: https://webrtc-review.googlesource.com/71380
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23025}
2018-04-25 13:54:33 +00:00
Rasmus Brandt
cd7da92012 Add MediaCodec VP tests for uncommon resolutions.
Bug: None
Change-Id: Ibfc35af3635c3b3a50027c4cd828f78e7a438dcd
Reviewed-on: https://webrtc-review.googlesource.com/72342
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23020}
2018-04-25 11:31:13 +00:00
Rasmus Brandt
abc821cd31 Allow multiple calls to ProcessFramesAndMaybeVerify with frame writers enabled.
Bug: None
Change-Id: Ic6e52401ec2db3d0bcaca3605c28763123a4eeb8
Reviewed-on: https://webrtc-review.googlesource.com/72343
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23016}
2018-04-25 09:46:13 +00:00
Sergey Silkin
c5a131a5fb Add non_ref_for_inter_layer_pred to VP9 RTP.
This converts the reserved bit in VP9 RTP payload descriptor into the
flag which indicates whether current frame can be used for prediction
of next spatial layer or not.

VP9 encoder wrapper sets non_ref_for_inter_layer_pred=false for all
frames for now.

Bug: none
Change-Id: I32f68868686475905fb09173cffd2b6e1bedcb7c
Reviewed-on: https://webrtc-review.googlesource.com/71080
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23010}
2018-04-24 19:20:30 +00:00
Erik Språng
566124a6df Move BitrateAllocation to api/ and rename it VideoBitrateAllocation
Since the webrtc_common build target does not have visibility set, we
cannot easily use BitrateAllocation in other parts of Chromium.
This is currently blocking parts of chromium:794608, and I know of other
usage outside webrtc already, so moving it to api/ should be warranted.

Also, since there's some naming confusion and this class is video
specific rename it VideoBitrateAllocation. This also fits with the
standard interface for producing these: VideoBitrateAllocator.

Bug: chromium:794608
Change-Id: I4c0fae40f9365e860c605a76a4f67ecc9b9cf9fe
Reviewed-on: https://webrtc-review.googlesource.com/70783
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22986}
2018-04-23 15:31:27 +00:00
Niels Möller
e8a9c45cc1 Delete enum VP8ResilienceMode.
We only support on (formely kResilientStream) and off (formely
kResilienceOff). The third mode, kResilientFrames, was not
implemented.

Bug: None
Change-Id: Ida82f6a33eda9d943ea70bc8ae4e6bddb720b0e8
Reviewed-on: https://webrtc-review.googlesource.com/71481
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22984}
2018-04-23 15:10:26 +00:00
Sergey Silkin
1322dbc81a Fix calculation of target bitrate of VP9 spatial layer.
This fixes misprint in the code which calculates target bitrate of a
VP9 spatial layer where "-" was used instead of "+".

Bug: none
Change-Id: I17d76a84d00e453c055c068968d7b276e9c23f51
Reviewed-on: https://webrtc-review.googlesource.com/71663
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22974}
2018-04-23 11:31:47 +00:00
Taylor Brandstetter
bd7392829a Revert "Reland "Remove our stream << overloads from non-test build targets.""
This reverts commit d7ee72041f.

Reason for revert: Broke downstream build which was using SdpAudioFormat operator<<

Original change's description:
> Reland "Remove our stream << overloads from non-test build targets."
> 
> This is a reland of c841d18d25
> 
> Original change's description:
> > Remove our stream << overloads from non-test build targets.
> >
> > Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and
> > SocketAddress are kept behind gtest's #ifdef UNIT_TEST.
> >
> > Bug: webrtc:8982
> > Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70
> > Reviewed-on: https://webrtc-review.googlesource.com/64143
> > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> > Reviewed-by: Benjamin Wright <benwright@webrtc.org>
> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22916}
> 
> TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org
> 
> Bug: webrtc:8982
> Change-Id: Ibe08c6270e5e693eb661a6ce9e8f074b34ef8123
> Reviewed-on: https://webrtc-review.googlesource.com/71161
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22949}

TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org

Change-Id: I3c2b18ec2877d68a522ecbae7a2955c4eecf36df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8982
Reviewed-on: https://webrtc-review.googlesource.com/71446
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22963}
2018-04-20 15:58:25 +00:00
Jonas Olsson
d7ee72041f Reland "Remove our stream << overloads from non-test build targets."
This is a reland of c841d18d25

Original change's description:
> Remove our stream << overloads from non-test build targets.
>
> Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and
> SocketAddress are kept behind gtest's #ifdef UNIT_TEST.
>
> Bug: webrtc:8982
> Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70
> Reviewed-on: https://webrtc-review.googlesource.com/64143
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Benjamin Wright <benwright@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22916}

TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org

Bug: webrtc:8982
Change-Id: Ibe08c6270e5e693eb661a6ce9e8f074b34ef8123
Reviewed-on: https://webrtc-review.googlesource.com/71161
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22949}
2018-04-20 09:09:30 +00:00
Jonas Olsson
31ef5f0d1b Revert "Remove our stream << overloads from non-test build targets."
This reverts commit c841d18d25.

Reason for revert: Breaks internal tests

Original change's description:
> Remove our stream << overloads from non-test build targets.
> 
> Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and
> SocketAddress are kept behind gtest's #ifdef UNIT_TEST.
> 
> Bug: webrtc:8982
> Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70
> Reviewed-on: https://webrtc-review.googlesource.com/64143
> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
> Reviewed-by: Benjamin Wright <benwright@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22916}

TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org

Change-Id: Ia3a36cdbdb2a9648a2bce23c314e539124dc9e0d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8982
Reviewed-on: https://webrtc-review.googlesource.com/70640
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22920}
2018-04-18 10:51:28 +00:00
Jonas Olsson
c841d18d25 Remove our stream << overloads from non-test build targets.
Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and
SocketAddress are kept behind gtest's #ifdef UNIT_TEST.

Bug: webrtc:8982
Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70
Reviewed-on: https://webrtc-review.googlesource.com/64143
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22916}
2018-04-18 08:57:24 +00:00
Sergey Silkin
bfd54ef5cb Round down when converting layer bitrate from bits to kilobits.
This aligns rounding in videoprocessor with rounding in encoder wrappers.

Bug: none
Change-Id: I8bdab7c02628b433d35d63c4bf4c841ffb1c2d1b
Reviewed-on: https://webrtc-review.googlesource.com/69983
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22880}
2018-04-16 14:00:18 +00:00
Sergey Silkin
098f8d2c1c Round down when converting allocated bitrate from bits to kilobits.
With rounding to the nearest the result can exceed the allocated
bitrate.

Bug: none
Change-Id: I0260a1640a1454951ca8e48fd447e047ef0271ee
Reviewed-on: https://webrtc-review.googlesource.com/69982
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22879}
2018-04-16 13:40:03 +00:00
Sergey Silkin
bc20fe1221 Rename spatial/temporal index variables and fields in videoprocessor.
This fixes inconsistency in names of variables and fields which
represent spatial/temporal index of layer:
simulcast_svc_idx -> spatial_idx
spatial_layer_idx -> spatial_idx
temporal_layer_idx -> temporal_idx

Also, this adds printing of spatial/temporal index and target bitrate
to RD report.

Bug: none
Change-Id: Ic4dfdadc57a1577bb3d35d1782a152a9dbef0280
Reviewed-on: https://webrtc-review.googlesource.com/69981
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22869}
2018-04-16 08:09:27 +00:00
Sergey Silkin
fafeac3517 Use codec's bitrate limits if SVC is off.
Adding SVC rate allocator and layering configurator caused regression
for VP9 non-SVC senders. SVC bitrate limits, which were supposed to
be used only when spatial layering is enabled, are applied when
encoding single spatial layer. E.g. for VP9 360p sender maximum bitrate
is limited to 500kbps.

This fixes the regression. If sender is configured to send VP9 single
layer then codec's bitrate limits are applied to this layer.

Bug: webrtc:9151, chromium:831093
Change-Id: Ia1ae4087155ad7917a3443304a21532f1e68ea65
Reviewed-on: https://webrtc-review.googlesource.com/69813
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22862}
2018-04-13 16:11:18 +00:00
Kári Tristan Helgason
8cbb1c9162 Make Videoprocessor integration test stringly typed.
This allows use of arbitrarily-named codecs.

Bug: None
Change-Id: If7ecbfe3ae8f08f8ebfb224219ef9192a4a0b884
Reviewed-on: https://webrtc-review.googlesource.com/69681
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22860}
2018-04-13 13:17:48 +00:00
Kári Tristan Helgason
c3f8c759c4 Add ability for inject custom codec factories in VP integration test.
This makes it easier to add new test cases without modifying the actual test class.

Bug: None
Change-Id: I48e4f14e26cd6610678ffb07ce9fd56e6bc1ac4e
Reviewed-on: https://webrtc-review.googlesource.com/69600
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22840}
2018-04-12 15:45:36 +00:00
Erik Språng
e624d078bc Always update libvpx configuration if bitrate has changed.
OnRatesUpdated() is called every time the bitrate estimate, or once per
second. However, since we don't want to reconfigure libvpx too often,
just in case it interferes with the rate controller, so
ScreenshareLayers contains a boolean |bitrate_update_| which indicate
if the configuration should be updated on a call to
UpdateConfiguration().

However, it two rate updates happened between two frames, the first of
which changes the rates and second one does not, |bitrate_update_| will
be reset to false and the encoder won't get the desired config.

This CL makes sure we update the configuration iff the rate has changed
at any time since the last call to UpdateConfiguration().

Bug: webrtc:9012
Change-Id: I62af36cffe20ecb7d3f403b3eb11f23a9692d719
Reviewed-on: https://webrtc-review.googlesource.com/69040
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22826}
2018-04-11 15:27:56 +00:00
Sergey Silkin
07f80cc393 Set first_frame_in_picture on first encoded frame of picture.
Set the flag based on coded length of buffered frame which is reset
after picture is encoded and, thus, is equal to zero when encoder
delivers first frame of next picture.

Before this change first_frame_in_picture was set based on index of
spatial layer of encoded frame. This is not right anymore since encoder
can drop base layer but deliver upper layers.

Bug: chromium:828350
Change-Id: I12c7534240de8bc4905f04ff368cc3704720a70b
Reviewed-on: https://webrtc-review.googlesource.com/68561
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22805}
2018-04-10 12:09:55 +00:00
Niels Möller
24697ab200 Delete obsolete tl_factory member and all mention thereof.
Bug: webrtc:9012
Change-Id: Ib67d139114aa03b9362cd05d12be5673a02c3e08
Reviewed-on: https://webrtc-review.googlesource.com/67160
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22792}
2018-04-09 11:02:38 +00:00
Sergey Silkin
e3b5b6e50b Exclude first frames from RD perf analysis.
It takes some time for rate controller to adapt to content. Quality of first
frames is usually worse than quality of following frames. It makes sense to
exclude first frames from analysis and, thus, avoid negative affect of this
interval on overall results.

Bug: none
Change-Id: Ib0a258889750cf794c7d6fdff26af958f7bbe48a
Reviewed-on: https://webrtc-review.googlesource.com/66100
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22782}
2018-04-08 19:07:14 +00:00
Sergey Silkin
645e2e0a29 Handle per-layer frame drops.
Pass base layer frame to upper layer decoder if inter-layer prediction
is enabled and encoder dropped upper layer.

Bug: none
Change-Id: I4d13790caabd6469fc0260d8c0ddcb3dabbfb86e
Reviewed-on: https://webrtc-review.googlesource.com/65980
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22762}
2018-04-06 08:40:22 +00:00
Paulina Hensman
a680a6a4af Enable and fix chromium clang warnings in sdk/android targets.
Targets:
base_jni, internal_jni, video_jni, vp8_jni and vp9_jni

Bug: webrtc:163
Change-Id: I4aa68c81e6e7cbe5fdf78c90e464b46c55633252
Reviewed-on: https://webrtc-review.googlesource.com/66820
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22744}
2018-04-05 11:22:03 +00:00
philipel
98ee49d5fb Don't use the |codec_settings| parameter in I420Decoder::InitDecode.
Bug: webrtc:9106
Change-Id: I05e69c0272f782d3811b4f294ac4669215112768
Reviewed-on: https://webrtc-review.googlesource.com/66721
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22729}
2018-04-04 12:00:10 +00:00
philipel
9d7d75b0fd Don't use the |codec_settings| parameter in VP9DecoderImpl::InitDecode.
Bug: webrtc:9106
Change-Id: I3d3f38faa0269a01bfb254a9f24839fbcf959463
Reviewed-on: https://webrtc-review.googlesource.com/66741
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22728}
2018-04-04 11:56:30 +00:00
Sergey Silkin
571e6c9105 Fix rate allocation between temporal layers in SVC.
Bitrate of three temporal layers as fraction of total bitrate
after fix:  0.54, 0.16, 0.30
before fix: 0.54, 0.30, 0.16

Bug: none
Change-Id: I8134abc19d5d6723b7a959196ca9c1635026eadc
Reviewed-on: https://webrtc-review.googlesource.com/66060
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22726}
2018-04-04 11:35:40 +00:00
Sergey Silkin
57e216e62e Revert "Turn off per-layer frame dropping."
This reverts commit e803dbe210.

Reason for revert: breaks downstream projects

Original change's description:
> Turn off per-layer frame dropping.
> 
> Per-layer frame dropping was recently implemented in VP9 SVC encoder
> and set as default mode.
> 
> This disables per-layer frame dropping in WebRTC VP9 encoder wrapper
> since receiver (jitter buffer) can't handle such drops yet.
> 
> Bug: none
> Change-Id: Iad5491abf1e3fc1bccfe44eb7276ff6363176029
> Reviewed-on: https://webrtc-review.googlesource.com/66460
> Reviewed-by: Marco Paniconi <marpan@google.com>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22721}

TBR=brandtr@webrtc.org,marpan@google.com,ssilkin@webrtc.org

Change-Id: I558cae51cf109b64717865f26dc12cf4bb12ff12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/66760
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22724}
2018-04-04 11:23:11 +00:00
Sergey Silkin
a31018090e Disable H264 videotoolbox unit tests on iOS builds.
The tests fail when running on internal test bots.

Bug: webrtc:9099
Change-Id: I89a537fe46ac56891f90e9722055218fd9e87ecf
Reviewed-on: https://webrtc-review.googlesource.com/66400
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22723}
2018-04-04 10:54:59 +00:00
Sergey Silkin
2a1f183e99 Set marker bit on last encoded spatial layer.
In order to handle per-layer frame dropping both VP9 encoder wrapper
and RTP packetizer were modified.

- Encoder wrapper buffers last encoded frame and passes it to
packetizer after frame of next layer is encoded or encoding of
superframe is finished.
- Encoder wrapper sets end_of_superframe flag on last encoded frame of
superframe before passing it to packetizer.
- If end_of_superframe is True then packetizer sets marker bit on last
packet of frame.

Bug: webrtc:9066
Change-Id: I1d45319fbe6bc63d01721ea67bfb7440d4c29275
Reviewed-on: https://webrtc-review.googlesource.com/65540
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22722}
2018-04-04 10:40:19 +00:00
Sergey Silkin
e803dbe210 Turn off per-layer frame dropping.
Per-layer frame dropping was recently implemented in VP9 SVC encoder
and set as default mode.

This disables per-layer frame dropping in WebRTC VP9 encoder wrapper
since receiver (jitter buffer) can't handle such drops yet.

Bug: none
Change-Id: Iad5491abf1e3fc1bccfe44eb7276ff6363176029
Reviewed-on: https://webrtc-review.googlesource.com/66460
Reviewed-by: Marco Paniconi <marpan@google.com>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22721}
2018-04-04 10:11:09 +00:00
Sergey Silkin
c89eed92ad Get pure encode time.
Measure time spent in frame encode callback, accumulate it for layers
and subtract it from measured encode time of next layer frame.

Bug: none
Change-Id: Ifc3baae2f9a49913a55a7de2de9507102edd0295
Reviewed-on: https://webrtc-review.googlesource.com/65981
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22720}
2018-04-04 09:32:39 +00:00
Jonas Olsson
74395345e8 Add ToString() methods to classes with << operators, preparing for deprecations.
Bug: webrtc:8982
Change-Id: I9b8792a229539dd9848f4d9936fe343f4bf9ad49
Reviewed-on: https://webrtc-review.googlesource.com/63200
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22705}
2018-04-03 11:21:30 +00:00
Sergey Silkin
bace350feb Print more frame statistic.
- Print per-plane PSNR.
- Print inter_layer_predicted flag.

Bug: none
Change-Id: I6bc899602252ccca37440eb455dc860d51d87f2f
Reviewed-on: https://webrtc-review.googlesource.com/66080
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22701}
2018-04-03 08:44:39 +00:00
Sergey Silkin
86684960b3 Adding layering configurator and rate allocator for VP9 SVC.
The configurator decides number of spatial layers, their resolution
and bitrate thresholds based on given input resolution and maximum
number of spatial layers.

The allocator distributes available bitrate across spatial and
temporal layers. If there is not enough bitrate to provide acceptable
quality for all spatial layers allocator disables enhancement layers
one by one until the condition is met or number of layers is reduced
to one.

VP9 SVC related unit tests have been updated. Input resolution and
bitrate in these tests have been increased to the level enough to
provide desirable number of spatial layers.

Bug: webrtc:8518
Change-Id: I9df790920227c7f7dd4d42a50a856c22f0f4389b
Reviewed-on: https://webrtc-review.googlesource.com/60340
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22672}
2018-03-29 10:16:47 +00:00
Sergey Silkin
1d2b627438 Use frame generator in video codec unit tests.
There is no need to use real video as input for encoder in unit tests.
Using generator simplifies testing on mobile devices (no need to upload
files to device).

Bug: none
Change-Id: Ic48609cc6f8eecf90d9956edfdd33135be949398
Reviewed-on: https://webrtc-review.googlesource.com/64526
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22648}
2018-03-28 13:07:16 +00:00
Sergey Silkin
122ba6c050 Handle per-layer frame drops.
Build superframe out of the nearest non-dropped base layer and current layer.

Bug: none
Change-Id: I26720ea6de44f27046208b220d03942cd2a3d6c7
Reviewed-on: https://webrtc-review.googlesource.com/64921
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22631}
2018-03-27 16:07:41 +00:00
Niels Möller
150dcb0a9a Delete logic to set picture id and tl0 pic idx in encoders.
It would be nice to also delete the fields from CodecSpecificInfo,
but those fields are used on the receive side.

Bug: webrtc:8830
Change-Id: I1a3f13ea2c024cbd73b33fd9dd58e531d3576a55
Reviewed-on: https://webrtc-review.googlesource.com/64780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22625}
2018-03-27 13:11:16 +00:00
Rasmus Brandt
6e09160552 Loosen |max_avg_buffer_level_sec| for SimulcastVP8.
Have not figured out why this metric regressed, but submitting
this CL now to unblock Chromium roll into WebRTC.

Bug: webrtc:9057
Change-Id: I808ad194e1c9107d644a25502a55a7c6fddca7aa
Reviewed-on: https://webrtc-review.googlesource.com/64527
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22600}
2018-03-26 11:14:11 +00:00
Erik Språng
82fad3d513 Remove TemporalLayersFactory and associated classes
As the rate allocation has been moved into entirely into
SimulcastRateAllocator, and the listeners are thus no longer needed,
this class doesn't fill any other purpose than to determine if
ScreenshareLayers or TemporalLayers should be created for a given
simulcast stream. This can however be done just from looking at the
VideoCodec instance, so changing this into a static factory method.

Due to dependencies from upstream projects, keep the class name and
field in VideoCodec around for now.

Bug: webrtc:9012
Change-Id: I028fe6b2a19e0d16b35956cc2df01dcf5bfa7979
Reviewed-on: https://webrtc-review.googlesource.com/63264
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22529}
2018-03-21 10:20:48 +00:00
Erik Språng
bb60a3a5fa Refactor VP8 TemporalLayers
This CL moves all temporal layer rate allocation from
DefaultTemporalLayers and ScreenshareLayers into SimulcastRateAllocator.
This means we don't need an extra call-out to the TemporalLayers
interface to get the last allocation, which simplifies the code path a
lot.

It also paves the wave for removing the TemporalLayersFactory interface
(in a separate cl), which will further simplify the ownership model.

Bug: webrtc:9012
Change-Id: I6540b1848efa1a136dce449f13902ad479d5ee37
Reviewed-on: https://webrtc-review.googlesource.com/62420
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22502}
2018-03-19 18:14:21 +00:00
Ilya Nikolaevskiy
1d037ae704 Don't crash in SingleNalu packetization for h264 if no space in packet
Also, pass correct max payload data size to encoders: now accounting for
rtp headers.

Bug: chromium:819259
Change-Id: I586924e9246218fab6072e05eca894925cfe556e
Reviewed-on: https://webrtc-review.googlesource.com/61425
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22460}
2018-03-15 15:42:57 +00:00
Niels Möller
bb894ffcb4 Make PayloadRouter own the picture id and tl0 pic idx sequences.
It previously owned only the picture id and only in the
WebRTC-VP8-Forced-Fallback-Encoder-v2 experiment.

Moving responsibility to PayloadRouter ensures that  both
picture id and tl0 idx are continuous over codec changes,
as required by the specs for VP8 and VP9 over RTP.

Bug: webrtc:8830
Change-Id: Ie77356dfec6d1e372b6970189e4c3888451920e6
Reviewed-on: https://webrtc-review.googlesource.com/61640
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22448}
2018-03-15 12:22:07 +00:00
Erik Språng
cc681ccf6b Split vp8_impl into webm_vp8_encoder and webm_vp8_decoder
This work is in preparation for refactoring the TemporalLayers api.

Bug: webrtc:9012
Change-Id: I01908ee034fb79996e687ff72d10178acf102321
Reviewed-on: https://webrtc-review.googlesource.com/61781
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22445}
2018-03-15 11:57:07 +00:00
Åsa Persson
bbeb2d5130 Make TestVp8Impl use VideoCodecUnitTest.
Removes EncodedImageCallbackTestImpl and DecodedImageCallbackTestImpl in vp8_impl_unittest.cc.

Bug: none
Change-Id: If4a8d7ed5eb5834614e5c66f1b14f5c586c09b68
Reviewed-on: https://webrtc-review.googlesource.com/55640
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22435}
2018-03-15 09:00:56 +00:00
Rasmus Brandt
d00c8951cd Add ability to disable decode in VideoProcessor.
Bug: webrtc:8448
Change-Id: Iabbf2fa0238b868c5f3869eb0ca542ffa9df7386
Reviewed-on: https://webrtc-review.googlesource.com/61660
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22429}
2018-03-14 14:36:35 +00:00
Sergey Silkin
8d3758e610 Calculate and report PSNR for Y, U, V planes separately.
Bug: webrtc:8448
Change-Id: Ia5b2b2f3ebac9ea7d1efbb3079b0bc3438a54a09
Reviewed-on: https://webrtc-review.googlesource.com/61324
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22420}
2018-03-14 10:57:50 +00:00
Rasmus Brandt
0f1c0bd326 Add async simulcast support to VideoProcessor.
For the buffering of |input_frames_|, we assume that frames
are ordered per simulcast layer but we make no assumptions
between layers.

For SVC, we still assume ordering of encode callbacks for
the spatial layers. If we ever add async codecs that support SVC,
they should still obey this assumption.

Bug: webrtc:8448
Change-Id: I4ebb0c1e1d0eef41d850ed5b92aacc79d0a11137
Reviewed-on: https://webrtc-review.googlesource.com/60801
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22380}
2018-03-12 09:36:39 +00:00
Sergey Silkin
d4bc01b7dd Added printing of frame level statistics.
Bug: none
Change-Id: I0fa607c4f26ccf2bceac116c7869698c9d16cfa3
Reviewed-on: https://webrtc-review.googlesource.com/61000
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22364}
2018-03-09 14:20:54 +00:00
Rasmus Brandt
d062a3c626 Prepare VideoProcessor for async simulcast support.
* Add support for SimulcastEncoderAdapter wrapping of encoder.
* Store input frame timestamps out-of-band, so we don't need to keep
  a raw VideoFrame around just for it's timestamp.
* Store current frame rate in |framerate_fps_|, instead of in
  codec settings struct.
* Add some comments and reorder some data members.
* Explicitly include VideoBitrateAllocator.
* Change type of |input_frames_|, to avoid one layer of indirection.
* Move VideoProcessor::CalculateFrameQuality to anonymous namespace.

This change should have no functional implications.

Bug: webrtc:8448
Change-Id: I10c140eeda750d9bd37bfb6cb1e8acb401fb91d3
Reviewed-on: https://webrtc-review.googlesource.com/60520
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22346}
2018-03-08 17:41:13 +00:00
Rasmus Brandt
bbf146587a Delete dead code for video quality calculation.
Previously, the only user of this code was the
VideoProcessorIntegrationTest. We have now changed that
test to directly calculate image quality metrics using libyuv,
similar to how the full stack tests and browser tests work.

Bug: webrtc:8448
Change-Id: Ia7a607d7ddc37741fba76d56aa7297851ffa1c6b
Reviewed-on: https://webrtc-review.googlesource.com/43760
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22341}
2018-03-08 14:05:03 +00:00
Emircan Uysaler
fdd5eae9f4 Fix incorrect explicit marks
Bug: webrtc:7671
Change-Id: I0905b759833ed7c3511bd65d38c2d9b0e984152f
Reviewed-on: https://webrtc-review.googlesource.com/60580
Reviewed-by: Qiang Chen <qiangchen@chromium.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22333}
2018-03-07 21:56:50 +00:00
Niels Möller
2e1d784956 Delete the VideoCodec::plName string.
It holds the same information as codecType, but in different format.

Bug: webrtc:8830
Change-Id: Ia83e2dff4fd9a5ddb489501b7a1fe80759fa4218
Reviewed-on: https://webrtc-review.googlesource.com/56100
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22307}
2018-03-06 11:17:41 +00:00
Rasmus Brandt
e90636adc2 Codec instantiation tests for testing device capabilities in batch.
Change-Id: I465fb165bec9d6501015ec57d13fb556c4cb532b
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/58643
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22284}
2018-03-05 10:01:02 +00:00
Kári Tristan Helgason
6375ef7dfb Enable VideoProcessorIntegrationTest on devices.
These tests cannot run on simulators but should be enabled on real device
bots in order to catch regressions or crashes in the iOS codecs.

Bug: webrtc:8950
Change-Id: I8e877aa4368683073fdb4586cd6f4add4a1284ad
Reviewed-on: https://webrtc-review.googlesource.com/59040
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22283}
2018-03-05 09:52:32 +00:00
Niels Möller
3f693b9e75 Delete unused method SetPeriodicKeyFrames.
Keyframe interval is configurable in codec settings, with no need for
a setter method to toggle it on or off.

Bug: webrtc:8830
Change-Id: Ic20d8829884ed22588f8f8c0cceddd76144a9858
Reviewed-on: https://webrtc-review.googlesource.com/56040
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22280}
2018-03-05 08:54:32 +00:00
Sergey Silkin
13e743419d Merge SimulcastStream and SpatialLayer structures.
Both simulcast stream and spatial layer can be described with the same
set of parameters. There is no need in two separate definitions.

1. Original definition of SpatialLayer is removed.
2. SimulcastStream is renamed to SpatialLayer.
3. SimulcastStream is equated to SpatialLayer using typedef.

Bug: webrtc:8518
Change-Id: I90761952b032a1b71fc4bba11f74a6daaf58880a
Reviewed-on: https://webrtc-review.googlesource.com/57102
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22272}
2018-03-02 16:30:19 +00:00
Sergey Silkin
9039969de2 Call vpx_codec_destroy() only if vpx_codec_init() call preceded.
This fixes the issue when Init() with correct codec settings fails
because preceding Init() was called with wrong settings.

Bug: webrtc:8969
Change-Id: I50e618af6266ef593942fda27839c7c01e8717ae
Reviewed-on: https://webrtc-review.googlesource.com/59382
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22271}
2018-03-02 15:43:29 +00:00
Sergey Silkin
3e871ea047 Single exit point in VPx wrapper Release().
This fixes potential memory leak caused by early exit in Release() methods.

Bug: webrtc:8967
Change-Id: I932ec4a451d30b3145a6133a9562e73248a8c203
Reviewed-on: https://webrtc-review.googlesource.com/59380
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22268}
2018-03-02 13:19:49 +00:00
Qiang Chen
6d30631f01 Bug Fix: Multiplex Codec Crash
This CL adds a lock to stashed_images_ in MultiplexEncoderAdapter.
Without lock, it is possible that different threads acts on
stashed_images_ simultaneously and leads to crash.

Bug: webrtc:8965
Change-Id: I887861092d185c3bd6047eb529d8c1cf57fa4648
Reviewed-on: https://webrtc-review.googlesource.com/59260
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Qiang Chen <qiangchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#22261}
2018-03-02 00:14:48 +00:00
Sergey Silkin
a796a7ee85 Reland "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
This reverts commit e27e0aca94.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
> 
> This reverts commit d2ed0a4c9e.
> 
> Reason for revert: Breaks downstream projects.
> 
> Original change's description:
> > Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
> > 
> > temporal_layer_thresholds_bps served only one purpose: its size was used
> > to infer number of temporal layers. I replaced it with num_temporal_layers,
> > which does what is says.
> > 
> > The practical reason for this change is the need to have possibility to
> > distinguish between cases when VP9 SVC temporal layering was/not set
> > through field trial. That was not possible with
> > temporal_layer_thresholds_bps[] because empty vector means 1 temporal
> > layer.
> > 
> > Bug: webrtc:8518
> > Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
> > Reviewed-on: https://webrtc-review.googlesource.com/58084
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22230}
> 
> TBR=sprang@webrtc.org,stefan@webrtc.org,ssilkin@webrtc.org
> 
> Change-Id: Ic2940f7f78a74312170940d51ad8967cde8ad42f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8518
> Reviewed-on: https://webrtc-review.googlesource.com/58902
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22234}

TBR=sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,ssilkin@webrtc.org

Change-Id: I1900c6b845b9baa9430fb72c3f4e7f2a44b3a8b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8518
Reviewed-on: https://webrtc-review.googlesource.com/59160
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22256}
2018-03-01 18:07:29 +00:00
Rasmus Brandt
5f7a891257 Minor improvements to TestConfig and VideoProcessor.
* Do not simulate freeze in decoded output file when frames have been dropped.
* Add more DCHECKs and consts.
* Remove unused members |num_encoded_frames_| and |num_decoded_frames_|.
* Move SdpVideoFormat conversion to TestConfig.

Bug: webrtc:8448
Change-Id: Ia879141f36dc23427cd1abcaa66716656fbaac2a
Reviewed-on: https://webrtc-review.googlesource.com/56802
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22239}
2018-03-01 08:42:43 +00:00
Philip Eliasson
e27e0aca94 Revert "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
This reverts commit d2ed0a4c9e.

Reason for revert: Breaks downstream projects.

Original change's description:
> Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
> 
> temporal_layer_thresholds_bps served only one purpose: its size was used
> to infer number of temporal layers. I replaced it with num_temporal_layers,
> which does what is says.
> 
> The practical reason for this change is the need to have possibility to
> distinguish between cases when VP9 SVC temporal layering was/not set
> through field trial. That was not possible with
> temporal_layer_thresholds_bps[] because empty vector means 1 temporal
> layer.
> 
> Bug: webrtc:8518
> Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
> Reviewed-on: https://webrtc-review.googlesource.com/58084
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22230}

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

Change-Id: Ic2940f7f78a74312170940d51ad8967cde8ad42f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8518
Reviewed-on: https://webrtc-review.googlesource.com/58902
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22234}
2018-02-28 16:01:32 +00:00
Sergey Silkin
d2ed0a4c9e Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
temporal_layer_thresholds_bps served only one purpose: its size was used
to infer number of temporal layers. I replaced it with num_temporal_layers,
which does what is says.

The practical reason for this change is the need to have possibility to
distinguish between cases when VP9 SVC temporal layering was/not set
through field trial. That was not possible with
temporal_layer_thresholds_bps[] because empty vector means 1 temporal
layer.

Bug: webrtc:8518
Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
Reviewed-on: https://webrtc-review.googlesource.com/58084
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22230}
2018-02-28 14:46:03 +00:00
Sergey Silkin
556270c4d9 Remove FourPeople_1280x720_30.yuv from resources for mobile builds.
Uploading of the file to device causes timeouts. I removed it from
resources for iOS and Android builds and disabled the test that used
the file since we don't really need to run it on test bots.

Bug: webrtc:8936
Change-Id: Ia5e04c4630544eca8e56826c9e89c9c9f4dcb600
Reviewed-on: https://webrtc-review.googlesource.com/58090
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22222}
2018-02-28 09:55:20 +00:00
Qiang Chen
88f6decad7 Multiplex Codec Bug Fix: Padding Needed For H264
This CL fixes the bug that we must have some padding for H264 codec
when used in Multiplex encoder/decoder, otherwise H264 decoder will
crash.

And this CL fixes a bug that potential infinite loop exists in
MultiplexEncoderAdapter

Bug: webrtc:8921
Change-Id: I4124579c31ee69f72e29d118378aa1f8b3f05eb4
Reviewed-on: https://webrtc-review.googlesource.com/56960
Commit-Queue: Qiang Chen <qiangchen@chromium.org>
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22175}
2018-02-23 18:15:46 +00:00
Niels Möller
225c787c6e Move default thresholds from QualityScaler to encoders.
Overriding implementations of VideoEncoder::GetScalingSettings that
want to enable quality scaling must now provide the thresholds.

Bug: webrtc:8830
Change-Id: I75c47cb56ac1b9cf77401684980b3167e485f51c
Reviewed-on: https://webrtc-review.googlesource.com/46622
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22172}
2018-02-23 13:12:36 +00:00
Rasmus Brandt
3f06c3bf04 Change text output from VideoProcessor slightly.
Changes:
* Prefix sections with "==>" and "-->" headers.
* Add some more newlines.

Motivation: Make output more quickly parsed by humans.

BUG=webrtc:8448

Change-Id: I02118e2c25eeae3534285cfe756d8b4818997659
Reviewed-on: https://webrtc-review.googlesource.com/56120
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22153}
2018-02-22 14:32:58 +00:00
Rasmus Brandt
defad847b1 Add batch script for running multiple VideoProcessor tests in parallel.
This script is for running on device tests in parallel.

BUG=webrtc:8448
NOTRY=TRUE

Change-Id: I6b13f76223653ddb6ec999613ef66ac4f82d8567
Reviewed-on: https://webrtc-review.googlesource.com/55561
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22117}
2018-02-21 08:00:06 +00:00
Sergey Silkin
06a8f304ef Moved analysis to Stats.
Slicing, aggregation and analysis has been moved to Stats class.
Data of all spatial layers is stored in single Stats object.

Bug: webrtc:8524
Change-Id: Ic9a64859a36a1ccda661942a201cdeeed470686a
Reviewed-on: https://webrtc-review.googlesource.com/50301
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22094}
2018-02-20 09:48:41 +00:00
Niels Möller
c9fcedbab7 Delete unused deprecated headers under modules/video_coding/
Apparently left over since 2015 refactorings, see cl
https://codereview.webrtc.org/1417283007

Bug: webrtc:5095
Change-Id: I899f2c018d1906b4336b2e80b511f7398bac4947
Reviewed-on: https://webrtc-review.googlesource.com/53200
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22055}
2018-02-16 14:07:38 +00:00
Rasmus Brandt
75e38d2dc3 Remove unused fields from VideoCodecVP8.
Bug: None
Change-Id: I6f29ad5ce04582003e9be7292d04ea18f9335372
Reviewed-on: https://webrtc-review.googlesource.com/47660
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21973}
2018-02-09 15:55:59 +00:00
Sergey Silkin
597472ebc3 Removing kNoVisualizationParams. Use nullptr directly.
Bug: none
Change-Id: Ifcffdf37d0dc4b9caa47b1117fc14e21bffe2cd9
Reviewed-on: https://webrtc-review.googlesource.com/49942
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21965}
2018-02-09 07:52:54 +00:00
Rasmus Brandt
2018823a68 Remove unused field |output_filename| from TestConfig.
Bug: webrtc:8448
Change-Id: I8bb35f6d66112c6590564815e10cb4ec7b516268
Reviewed-on: https://webrtc-review.googlesource.com/49820
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21960}
2018-02-08 15:23:19 +00:00
Rasmus Brandt
4b381afd8e Enforce that VideoProcessor is only run on a TaskQueue.
Prior to this change, the VideoProcessor was run on the main thread
in the unit tests. Using a TaskQueue there instead, we can be
stricter in the thread checks.

Bug: webrtc:8524
Change-Id: Ice7b68f7344fc52801dff7a98cbc219b7231bfbc
Reviewed-on: https://webrtc-review.googlesource.com/48921
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21942}
2018-02-07 15:42:21 +00:00
Rasmus Brandt
17cdcbb57b Access ImplementationName() from task queue.
Accessing this method from the test thread is illegal,
but doesn't always fail.

Bug: webrtc:8524
Change-Id: Ie0e84cc2fb63268fb6d7cbf0c3a58cb35312c16b
Reviewed-on: https://webrtc-review.googlesource.com/49061
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21930}
2018-02-07 12:38:48 +00:00
Seth Hampson
e2f69cfeef Reland "Updates tests for turning simulcast streams on/off."
This is a reland of 8fb22e71ee.

Original change's description:
> Updates tests for turning simulcast streams on/off.
>
> Due to libvpx we were restricted to always turning the low simulcast
> stream on, or else the encoder would always label the active streams'
> encoded frames as key frames. Now that libvpx has been updated and
> rolled in, this change updates tests to reflect that it is working.
>
> Bug: webrtc:8653
> Change-Id: I065ef817ace2292605e27e135802cf4a3e90647e
> Reviewed-on: https://webrtc-review.googlesource.com/46340
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Seth Hampson <shampson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21831}

TBR=sprang@webrtc.org

Bug: webrtc:8653
Change-Id: I32fa92649f3ff40b1e364f880040e52ae698f74d
Reviewed-on: https://webrtc-review.googlesource.com/46860
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21918}
2018-02-06 17:18:24 +00:00
Rasmus Brandt
f105325a55 Move all Android specific stuff to android_codec_factory_helper.
This helps separate concerns, so that the VideoProcessorIntegrationTest
is almost oblivious to the fact that it needs to connect to the JVM
to get the Android HW codecs.

Bug: webrtc:8448
Change-Id: I4359b31f84be48eaf99d83525bcce6e593e874f8
Reviewed-on: https://webrtc-review.googlesource.com/47384
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21890}
2018-02-05 13:08:26 +00:00
Rasmus Brandt
98a867ccd2 Rename VideoCodecTest to VideoCodecUnitTest.
The VideoCodecTest class is a fixture base class for the
libvpx-VP8, libvpx-VP9, and OpenH264 unit tests. It is unrelated
to the VideoProcessor tests, which we colloquially refer to as
the "codec test".

This rename is thus to reduce this confusion. It should have no
functional impact.

Bug: webrtc:8448
Change-Id: If73443bda5df0f29a71ce6ce069ac128795ff0ad
Reviewed-on: https://webrtc-review.googlesource.com/47160
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21867}
2018-02-02 10:27:33 +00:00
Anders Carlsson
3ff50fba59 Create experimental Obj-C++ API.
This can be used to wrap Objective-C components in C++ classes, so users
can use the WebRTC C++ API directly together with the iOS specific
components provided by our SDK.

Bug: webrtc:8832
Change-Id: I6d34f7ec62d51df8d3a5340a2e17d30ae73e13e8
Reviewed-on: https://webrtc-review.googlesource.com/46162
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21850}
2018-02-01 16:36:24 +00:00
Sergey Silkin
10d9d59db1 Adding simulcast/spatial layering support to VideoProcessor.
Encoded frames are preserved and decoded after all layers are
encoded.
Each spatial layer is decoded with separate decoder.
For quality evaluation of lowres layers original input frame is
downscaled with bilinear interpolation.
Encoded and decoded frames are dumped into separate files.

For async codecs encoded frames are passed to decoder in encode
callback, as before.

Bug: webrtc:8524
Change-Id: Idb0c92c7274c1915cff9a011a2794f1cf4bc8cb1
Reviewed-on: https://webrtc-review.googlesource.com/43381
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21844}
2018-02-01 13:28:46 +00:00
Sergey Silkin
956b3068ba Reland "Set actual resolution for coded frame in VP9 enc wrapper."
This is a reland of 4e53a0f384.

Original change's description:
> Set actual resolution for coded frame in VP9 enc wrapper.
>
> This fix the mismatch of resolution VP9 wrapper set for coded frame with
> its actual resolution.
>
> Bug: webm:1485, webrtc:5749
> Change-Id: Ie1225d8f3a3d00e66229a1a79858d0a89b3d5fae
> Reviewed-on: https://webrtc-review.googlesource.com/46040
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21819}

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

Bug: webm:1485, webrtc:5749
Change-Id: I63124b45af678dc66f693fda96e1f347fdbc0ef1
Reviewed-on: https://webrtc-review.googlesource.com/46621
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21838}
2018-02-01 10:40:01 +00:00
Oleh Prypin
6ade76d69d Revert "Updates tests for turning simulcast streams on/off."
This reverts commit 8fb22e71ee.

Reason for revert: breaks downstream projects

Original change's description:
> Updates tests for turning simulcast streams on/off.
> 
> Due to libvpx we were restricted to always turning the low simulcast
> stream on, or else the encoder would always label the active streams'
> encoded frames as key frames. Now that libvpx has been updated and
> rolled in, this change updates tests to reflect that it is working.
> 
> Bug: webrtc:8653
> Change-Id: I065ef817ace2292605e27e135802cf4a3e90647e
> Reviewed-on: https://webrtc-review.googlesource.com/46340
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Seth Hampson <shampson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21831}

TBR=deadbeef@webrtc.org,sprang@webrtc.org,shampson@webrtc.org

Change-Id: If14074a7fc56c83b75584d8e9a6a913a40514bad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8653
Reviewed-on: https://webrtc-review.googlesource.com/46840
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21832}
2018-01-31 22:11:17 +00:00
Seth Hampson
8fb22e71ee Updates tests for turning simulcast streams on/off.
Due to libvpx we were restricted to always turning the low simulcast
stream on, or else the encoder would always label the active streams'
encoded frames as key frames. Now that libvpx has been updated and
rolled in, this change updates tests to reflect that it is working.

Bug: webrtc:8653
Change-Id: I065ef817ace2292605e27e135802cf4a3e90647e
Reviewed-on: https://webrtc-review.googlesource.com/46340
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21831}
2018-01-31 17:32:21 +00:00
Oleh Prypin
bbf46c2753 Revert "Set actual resolution for coded frame in VP9 enc wrapper."
This reverts commit 4e53a0f384.

Reason for revert: breaks downstream projects

Original change's description:
> Set actual resolution for coded frame in VP9 enc wrapper.
> 
> This fix the mismatch of resolution VP9 wrapper set for coded frame with
> its actual resolution.
> 
> Bug: webm:1485, webrtc:5749
> Change-Id: Ie1225d8f3a3d00e66229a1a79858d0a89b3d5fae
> Reviewed-on: https://webrtc-review.googlesource.com/46040
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21819}

TBR=brandtr@webrtc.org,asapersson@webrtc.org,ssilkin@webrtc.org

Change-Id: I122ce66ebf709125b3f927dd75fec25be7e1d525
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webm:1485, webrtc:5749
Reviewed-on: https://webrtc-review.googlesource.com/46620
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21824}
2018-01-31 10:54:20 +00:00
Sergey Silkin
4e53a0f384 Set actual resolution for coded frame in VP9 enc wrapper.
This fix the mismatch of resolution VP9 wrapper set for coded frame with
its actual resolution.

Bug: webm:1485, webrtc:5749
Change-Id: Ie1225d8f3a3d00e66229a1a79858d0a89b3d5fae
Reviewed-on: https://webrtc-review.googlesource.com/46040
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21819}
2018-01-31 08:39:19 +00:00
Emircan Uysaler
98bf720f97 Reland "Add unit tests covering MultiplexImageComponent"
This is a reland of 4dc891f5e3.

Original change's description:
> Add unit tests covering MultiplexImageComponent
>
> This CL changes some types in MultiplexImage and MultiplexImageComponent. Also,
> adds unit test coverage in TestMultiplexAdapter for these structs.
>
> Bug: webrtc:7671
> Change-Id: I832d0466dc67d3b6b7fa0d3fb76f02c0190e474f
> Reviewed-on: https://webrtc-review.googlesource.com/44081
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Qiang Chen <qiangchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#21770}

TBR=qiangchen@chromium.org

Bug: webrtc:7671
Change-Id: Ibc5e6fd0bf3db22838ca45c39f17c72bd5ca2a12
Reviewed-on: https://webrtc-review.googlesource.com/45880
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21810}
2018-01-30 17:29:56 +00:00
Sami Kalliomäki
82f96e6a56 Create an experimental Android NDK.
Following files were split:
sdk/android/native_api/jni_helpers.h
  -> sdk/android/native_api/jni/java_types.h
sdk/android/native_api/jni_helpers.cc
  -> sdk/android/native_api/jni/java_types.cc

Skipping presubmit to avoid changing moved code.

Bug: webrtc:8769

Change-Id: I0ef0f6b297b5002322915660d26cca33e91ff05b
No-Presubmit: true
Reviewed-on: https://webrtc-review.googlesource.com/40800
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21799}
2018-01-30 09:33:42 +00:00
Emircan Uysaler
d7ae3c34e5 Reland "Rename stereo video codec to multiplex"
This is a reland of bbdabe50db.

Original change's description:
> Rename stereo video codec to multiplex
>
> This CL only does the rename from"stereo" to multiplex". With this we have a
> better name that doesn't clash with audio's usage of stereo.
>
> Bug: webrtc:7671
> Change-Id: Iebc3fc20839025f1bc8bcf0e16141bf9744ef652
> Reviewed-on: https://webrtc-review.googlesource.com/43242
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21769}

TBR=niklas.enbom@webrtc.org

Bug: webrtc:7671
Change-Id: I6f38dc46126f279f334d52b56339b40acdc30511
Reviewed-on: https://webrtc-review.googlesource.com/45820
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21794}
2018-01-29 20:37:59 +00:00
Taylor Brandstetter
1204448a68 Revert "Reland "Rename stereo video codec to multiplex""
This reverts commit 4954a77cf8.

Reason for revert: Breaks downstream build which was depending on the name "kVideoCodecStereo". Will need to do some sort of trickery to make this change without breaking the relevant code. Sorry. :(

Original change's description:
> Reland "Rename stereo video codec to multiplex"
> 
> This is a reland of bbdabe50db.
> This was reverted because of breaking internal build. I contacted sheriff
> and looked at logs but cannot find anything related to this CL. This was landed
> with #3850 build which caused exception, but 3847-3855 seem to all have failed.
> I am relanding to see if it will work this time or it will give some related
> error message that can guide me.
> 
> Original change's description:
> > Rename stereo video codec to multiplex
> >
> > This CL only does the rename from"stereo" to multiplex". With this we have a
> > better name that doesn't clash with audio's usage of stereo.
> >
> > Bug: webrtc:7671
> > Change-Id: Iebc3fc20839025f1bc8bcf0e16141bf9744ef652
> > Reviewed-on: https://webrtc-review.googlesource.com/43242
> > Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> > Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21769}
> 
> TBR=niklas.enbom@webrtc.org
> 
> Bug: webrtc:7671
> Change-Id: I5934abad1ce28acf02842ea8ee2af7768a826eb8
> Reviewed-on: https://webrtc-review.googlesource.com/44520
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21780}

TBR=sprang@webrtc.org,niklas.enbom@webrtc.org,qiangchen@chromium.org,emircan@webrtc.org

Change-Id: I0a71327c2ddfdd030b1e058cd6a41b1689836719
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7671
Reviewed-on: https://webrtc-review.googlesource.com/44621
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21783}
2018-01-27 00:45:20 +00:00
Emircan Uysaler
4954a77cf8 Reland "Rename stereo video codec to multiplex"
This is a reland of bbdabe50db.
This was reverted because of breaking internal build. I contacted sheriff
and looked at logs but cannot find anything related to this CL. This was landed
with #3850 build which caused exception, but 3847-3855 seem to all have failed.
I am relanding to see if it will work this time or it will give some related
error message that can guide me.

Original change's description:
> Rename stereo video codec to multiplex
>
> This CL only does the rename from"stereo" to multiplex". With this we have a
> better name that doesn't clash with audio's usage of stereo.
>
> Bug: webrtc:7671
> Change-Id: Iebc3fc20839025f1bc8bcf0e16141bf9744ef652
> Reviewed-on: https://webrtc-review.googlesource.com/43242
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21769}

TBR=niklas.enbom@webrtc.org

Bug: webrtc:7671
Change-Id: I5934abad1ce28acf02842ea8ee2af7768a826eb8
Reviewed-on: https://webrtc-review.googlesource.com/44520
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21780}
2018-01-26 21:11:54 +00:00
Ivo Creusen
6bc7bb659e Revert "Rename stereo video codec to multiplex"
This reverts commit bbdabe50db.

Reason for revert: This breaks the internal build.

Original change's description:
> Rename stereo video codec to multiplex
> 
> This CL only does the rename from"stereo" to multiplex". With this we have a
> better name that doesn't clash with audio's usage of stereo.
> 
> Bug: webrtc:7671
> Change-Id: Iebc3fc20839025f1bc8bcf0e16141bf9744ef652
> Reviewed-on: https://webrtc-review.googlesource.com/43242
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21769}

TBR=sprang@webrtc.org,niklas.enbom@webrtc.org,qiangchen@chromium.org,emircan@webrtc.org

Change-Id: Icf019cb09e07de45821d31d7d8ea7707d01346ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7671
Reviewed-on: https://webrtc-review.googlesource.com/44360
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21774}
2018-01-26 12:44:54 +00:00
Ivo Creusen
15eeef4189 Revert "Add unit tests covering MultiplexImageComponent"
This reverts commit 4dc891f5e3.

Reason for revert: Reverting this CL to make it possible to revert https://webrtc-review.googlesource.com/c/src/+/43242

Original change's description:
> Add unit tests covering MultiplexImageComponent
> 
> This CL changes some types in MultiplexImage and MultiplexImageComponent. Also,
> adds unit test coverage in TestMultiplexAdapter for these structs.
> 
> Bug: webrtc:7671
> Change-Id: I832d0466dc67d3b6b7fa0d3fb76f02c0190e474f
> Reviewed-on: https://webrtc-review.googlesource.com/44081
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Qiang Chen <qiangchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#21770}

TBR=qiangchen@chromium.org,emircan@webrtc.org

Change-Id: I9cce6ed5f2990a2f443e04a9e5913cbd296242e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7671
Reviewed-on: https://webrtc-review.googlesource.com/44341
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21773}
2018-01-26 12:43:33 +00:00
Emircan Uysaler
4dc891f5e3 Add unit tests covering MultiplexImageComponent
This CL changes some types in MultiplexImage and MultiplexImageComponent. Also,
adds unit test coverage in TestMultiplexAdapter for these structs.

Bug: webrtc:7671
Change-Id: I832d0466dc67d3b6b7fa0d3fb76f02c0190e474f
Reviewed-on: https://webrtc-review.googlesource.com/44081
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Qiang Chen <qiangchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#21770}
2018-01-26 01:55:34 +00:00
Emircan Uysaler
bbdabe50db Rename stereo video codec to multiplex
This CL only does the rename from"stereo" to multiplex". With this we have a
better name that doesn't clash with audio's usage of stereo.

Bug: webrtc:7671
Change-Id: Iebc3fc20839025f1bc8bcf0e16141bf9744ef652
Reviewed-on: https://webrtc-review.googlesource.com/43242
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21769}
2018-01-25 23:16:04 +00:00
Anders Carlsson
beabdcb498 Break VP8 temporal_layers dependency on libvpx.
This is in preparation for
https://webrtc-review.googlesource.com/c/src/+/36340

With these changes we can avoid some strange #ifdefs in the code
that uses temporal layers.

Bug: webrtc:7925
Change-Id: I472210738ccc9f73812b8863951befeabec56f15
Reviewed-on: https://webrtc-review.googlesource.com/41280
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21759}
2018-01-25 10:37:21 +00:00
Åsa Persson
91af24a74b Fix backward jump in timestamp if framerate increases in video processor tests.
Bug: none
Change-Id: Id905eb5ea546d5cf8a2fee70f3e262155e293f4e
Reviewed-on: https://webrtc-review.googlesource.com/43360
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21756}
2018-01-25 08:39:01 +00:00
Emircan Uysaler
9bb8f0553d Cleanup of unused RTP structs and packetizer for stereo codec
This CL is a followup to https://webrtc-review.googlesource.com/c/src/+/38481.
With the new approach we can just use the generic RTP packetizer to pass frames
over the wire as the specific info is contained within the bitstream. This makes
the new codec more modular and reduces its footprint.

Bug: webrtc:7671
Change-Id: Ib07f72a9d338e3cbfdbf39cba9891a959b5f7552
Reviewed-on: https://webrtc-review.googlesource.com/43220
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21753}
2018-01-25 01:25:56 +00:00
Qiang Chen
a7c7a19cce Reland "Wrap Alpha and YUV frame into one EncodedImage for transmission"
This reverts commit d756fd06fe.

Original change's description:
> Revert "Wrap Alpha and YUV frame into one EncodedImage for transmission"
>
> This reverts commit 5670c86aec.
>
> Reason for revert: Breaks downstream build. Need to add "#include <cstring>" to stereo_encoder_adapter.cc to use std::memcpy.
>
> Original change's description:
> > Wrap Alpha and YUV frame into one EncodedImage for transmission
> >
> > With alpha channel, we observe the artifacts on the receiver side, and
> > the reason is that when YUV channel has a key frame, it gives frame_buffer2
> > a chance to drop some previous frames. Then it is possible that some alpha
> > frames got dropped, which break the alpha frame dependence chain.
> >
> > In this CL, we pack the YUV frame and alpha encoded frame together as one
> > entity to solve the issue.
> >
> > Bug: webrtc:8773
> > Change-Id: Ibe746a46cb41fd92b399a7069e1d89f02f292af7
> > Reviewed-on: https://webrtc-review.googlesource.com/38481
> > Commit-Queue: Qiang Chen <qiangchen@chromium.org>
> > Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21737}
>
> TBR=qiangchen@chromium.org,emircan@webrtc.org
>
> Change-Id: I11eff814ce093bf6db327ebcd21b1b71a1929849
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8773
> Reviewed-on: https://webrtc-review.googlesource.com/43260
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21739}

TBR=deadbeef@webrtc.org,qiangchen@chromium.org,emircan@webrtc.org

Change-Id: I0d64b7e7a62e4f35aa012270d3826a23b3fb2337
Bug: webrtc:8773
Reviewed-on: https://webrtc-review.googlesource.com/43440
Commit-Queue: Qiang Chen <qiangchen@chromium.org>
Reviewed-by: Qiang Chen <qiangchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#21749}
2018-01-24 23:23:07 +00:00
Sergey Silkin
53a2d8a6c7 One decoder/writer per simulcast/spatial layer.
Each simulcast stream requires dedicated decoder for decoding. SVC
can be decoded by single decoder. But in prod each receiver has its
decoder. We want to replicate this and also use one decoder per
spatial layer.

Also we create one frame writer per simulcast/spatial layer to dump
encoded/decoded frames of different layers to separate files.

Note that videoprocessor is still initialized with single
decoder/writer. It will be updated in next CL and start using
separate decoder/writer per layer.

Bug: webrtc:8524
Change-Id: I3bb3de77f97d51138b8b7675dd01bc281a078b2f
Reviewed-on: https://webrtc-review.googlesource.com/43280
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21744}
2018-01-24 13:45:58 +00:00
Sergey Silkin
b7d7301d7e Added number of simulcast/spatial layers to TestConfig.
These parameters allow to configure number of simulcast/spatial layers
in video codec tests.

Bug: webrtc:8524
Change-Id: Iad1332732758a8297abcf740c24c483e5fccec9a
Reviewed-on: https://webrtc-review.googlesource.com/43020
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21741}
2018-01-24 07:31:51 +00:00
Taylor Brandstetter
d756fd06fe Revert "Wrap Alpha and YUV frame into one EncodedImage for transmission"
This reverts commit 5670c86aec.

Reason for revert: Breaks downstream build. Need to add "#include <cstring>" to stereo_encoder_adapter.cc to use std::memcpy.

Original change's description:
> Wrap Alpha and YUV frame into one EncodedImage for transmission
> 
> With alpha channel, we observe the artifacts on the receiver side, and
> the reason is that when YUV channel has a key frame, it gives frame_buffer2
> a chance to drop some previous frames. Then it is possible that some alpha
> frames got dropped, which break the alpha frame dependence chain.
> 
> In this CL, we pack the YUV frame and alpha encoded frame together as one
> entity to solve the issue.
> 
> Bug: webrtc:8773
> Change-Id: Ibe746a46cb41fd92b399a7069e1d89f02f292af7
> Reviewed-on: https://webrtc-review.googlesource.com/38481
> Commit-Queue: Qiang Chen <qiangchen@chromium.org>
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21737}

TBR=qiangchen@chromium.org,emircan@webrtc.org

Change-Id: I11eff814ce093bf6db327ebcd21b1b71a1929849
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8773
Reviewed-on: https://webrtc-review.googlesource.com/43260
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21739}
2018-01-24 01:07:42 +00:00
Qiang Chen
5670c86aec Wrap Alpha and YUV frame into one EncodedImage for transmission
With alpha channel, we observe the artifacts on the receiver side, and
the reason is that when YUV channel has a key frame, it gives frame_buffer2
a chance to drop some previous frames. Then it is possible that some alpha
frames got dropped, which break the alpha frame dependence chain.

In this CL, we pack the YUV frame and alpha encoded frame together as one
entity to solve the issue.

Bug: webrtc:8773
Change-Id: Ibe746a46cb41fd92b399a7069e1d89f02f292af7
Reviewed-on: https://webrtc-review.googlesource.com/38481
Commit-Queue: Qiang Chen <qiangchen@chromium.org>
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21737}
2018-01-23 23:18:01 +00:00
Erik Språng
db9e9d5486 Make screenshare_layers frame dropper less aggressive
Try to use frame timestamps first if they look reasonable, otherwise
use realtime clock.
Also, lower limit from 90% of target to 85%.

Bug: webrtc:4172, chromium:802290
Change-Id: Iad489be7c7cf637345be4795e5089936ab9fab07
Reviewed-on: https://webrtc-review.googlesource.com/41041
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21729}
2018-01-22 21:15:29 +00:00
Sergey Silkin
1723cf9fa2 Get rid of packet loss related stuff from videoprocessor.
This feature is not needed in video codec testing framework. In WebRTC
video codecs never deal with packet loss. Packet loss is handled by
jitter buffer which prevents passing of incomplete frames to decoder.

Bug: webrtc:8768
Change-Id: I211cf51d913bec6a1f935e30691661d428ebd3b6
Reviewed-on: https://webrtc-review.googlesource.com/40740
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21722}
2018-01-22 15:45:58 +00:00
Åsa Persson
a6e7b88198 Move rtp_timestamp_to_frame_num_ map from VideoProcessor to Stats class.
Let Stats class handle rtp timestamp to frame number mapping.

Bug: none
Change-Id: I2a29c89a25c75c4bbd6c6368a5d10514f90b3c42
Reviewed-on: https://webrtc-review.googlesource.com/41220
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21709}
2018-01-22 09:02:56 +00:00
Åsa Persson
9e539f0959 Remove min/max/avg parsing of stats.
No stats is logged in this format any longer.

Bug: none
Change-Id: I5f91e93636b6d03ebd91c3b2518857275fb94de7
Reviewed-on: https://webrtc-review.googlesource.com/40700
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21690}
2018-01-19 08:21:39 +00:00
Seth Hampson
46e31ba5b5 Reland "Enables/disables simulcast streams by allocating a bitrate of 0 to the spatial layer."
This is a reland of 18c4261339
Original change's description:
> Enables/disables simulcast streams by allocating a bitrate of 0 to the spatial layer.
>
> Creates VideoStreams & VideoCodec.simulcastStreams with an active field, and then allocates 0 bitrate to simulcast streams that are inactive. This turns off the encoder for specific simulcast streams.
>
> Bug: webrtc:8653
> Change-Id: Id93b03dcd8d1191a7d3300bd77882c8af96ee469
> Reviewed-on: https://webrtc-review.googlesource.com/37740
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Seth Hampson <shampson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21646}

TBR=sprang@webrtc.org,stefan@webrtc.org,deadbeef@webrtc.org

Bug: webrtc:8630
Change-Id: Ib3df6f9b7158bff362a7ec66fc57e368682c5846
Reviewed-on: https://webrtc-review.googlesource.com/40980
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21688}
2018-01-18 22:42:23 +00:00
Sergey Silkin
3be2a55e7f Reland "Updated analysis in videoprocessor."
This is a reland of 1880c7162b
Original change's description:
> Updated analysis in videoprocessor.
>
> - Run analysis after all frames are processed. Before part of it was
> done at bitrate change points;
> - Analysis is done for whole stream as well as for each rate update
> interval;
> - Changed units from number of frames to time units for some metrics
> and thresholds. E.g. 'num frames to hit tagret bitrate' is changed to
> 'time to reach target bitrate, sec';
> - Changed data type of FrameStatistic::max_nalu_length (renamed to
> max_nalu_size_bytes) from rtc::Optional to size_t. There it no need to
> use such advanced data type in such low level data structure.
>
> Bug: webrtc:8524
> Change-Id: Ic9f6eab5b15ee12a80324b1f9c101de1bf3c702f
> Reviewed-on: https://webrtc-review.googlesource.com/31901
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21653}

TBR=brandtr@webrtc.org, stefan@webrtc.org

Bug: webrtc:8524
Change-Id: Ie0ad7790689422ffa61da294967fc492a13b75ae
Reviewed-on: https://webrtc-review.googlesource.com/40202
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21668}
2018-01-18 08:37:27 +00:00
Sergey Silkin
18bc3e19c4 Revert "Updated analysis in videoprocessor."
This reverts commit 1880c7162b.

Reason for revert: breaks internal tests

Original change's description:
> Updated analysis in videoprocessor.
> 
> - Run analysis after all frames are processed. Before part of it was
> done at bitrate change points;
> - Analysis is done for whole stream as well as for each rate update
> interval;
> - Changed units from number of frames to time units for some metrics
> and thresholds. E.g. 'num frames to hit tagret bitrate' is changed to
> 'time to reach target bitrate, sec';
> - Changed data type of FrameStatistic::max_nalu_length (renamed to
> max_nalu_size_bytes) from rtc::Optional to size_t. There it no need to
> use such advanced data type in such low level data structure.
> 
> Bug: webrtc:8524
> Change-Id: Ic9f6eab5b15ee12a80324b1f9c101de1bf3c702f
> Reviewed-on: https://webrtc-review.googlesource.com/31901
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21653}

TBR=brandtr@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,ssilkin@webrtc.org

Change-Id: Id0b7d387bbba02e71637b229aeed6f6cf012af46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8524
Reviewed-on: https://webrtc-review.googlesource.com/40220
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21656}
2018-01-17 13:16:07 +00:00
Sergey Silkin
53d877c0f8 Revert "Set encodedWidth/encodedHeight to actual coded resolution."
This reverts commit 16beea7c90.

Reason for revert: breaks internal tests.

Original change's description:
> Set encodedWidth/encodedHeight to actual coded resolution.
> 
> This fixes mismatch between resolution of coded frame indicated by VP9
> encoder wrapper and actual coded resolution. If internal resize is
> enabled VP9 encoder might downscale input frame when bitrate is too low
> to keep good spatial quality. Before this fix VP9 wrapper always set
> coded resolution equal to input resolution. Now it sets it to actual
> coded resolution which it reads from frame pkt.
> 
> Bug: webrtc:5749
> Change-Id: I7dc8ba89947e99213a3b4c3cd4d974b662f090c4
> Reviewed-on: https://webrtc-review.googlesource.com/39661
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21651}

TBR=brandtr@webrtc.org,asapersson@webrtc.org,ssilkin@webrtc.org

Change-Id: I32cb1271c863cf435f3fc3b465e11232cbd6a888
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5749
Reviewed-on: https://webrtc-review.googlesource.com/40161
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21655}
2018-01-17 13:12:17 +00:00
Sergey Silkin
1880c7162b Updated analysis in videoprocessor.
- Run analysis after all frames are processed. Before part of it was
done at bitrate change points;
- Analysis is done for whole stream as well as for each rate update
interval;
- Changed units from number of frames to time units for some metrics
and thresholds. E.g. 'num frames to hit tagret bitrate' is changed to
'time to reach target bitrate, sec';
- Changed data type of FrameStatistic::max_nalu_length (renamed to
max_nalu_size_bytes) from rtc::Optional to size_t. There it no need to
use such advanced data type in such low level data structure.

Bug: webrtc:8524
Change-Id: Ic9f6eab5b15ee12a80324b1f9c101de1bf3c702f
Reviewed-on: https://webrtc-review.googlesource.com/31901
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21653}
2018-01-17 12:44:06 +00:00
Sergey Silkin
16beea7c90 Set encodedWidth/encodedHeight to actual coded resolution.
This fixes mismatch between resolution of coded frame indicated by VP9
encoder wrapper and actual coded resolution. If internal resize is
enabled VP9 encoder might downscale input frame when bitrate is too low
to keep good spatial quality. Before this fix VP9 wrapper always set
coded resolution equal to input resolution. Now it sets it to actual
coded resolution which it reads from frame pkt.

Bug: webrtc:5749
Change-Id: I7dc8ba89947e99213a3b4c3cd4d974b662f090c4
Reviewed-on: https://webrtc-review.googlesource.com/39661
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21651}
2018-01-17 10:50:35 +00:00
Lu Liu
0f17f9ce28 Revert "Enables/disables simulcast streams by allocating a bitrate of 0 to the spatial layer."
This reverts commit 18c4261339.

Reason for revert: Broke internal tests

Original change's description:
> Enables/disables simulcast streams by allocating a bitrate of 0 to the spatial layer.
> 
> Creates VideoStreams & VideoCodec.simulcastStreams with an active field, and then allocates 0 bitrate to simulcast streams that are inactive. This turns off the encoder for specific simulcast streams.
> 
> Bug: webrtc:8653
> Change-Id: Id93b03dcd8d1191a7d3300bd77882c8af96ee469
> Reviewed-on: https://webrtc-review.googlesource.com/37740
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Seth Hampson <shampson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21646}

TBR=deadbeef@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,shampson@webrtc.org

Change-Id: I0aeb743cbd2e8d564aa732c937587c25a4c49b09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8653
Reviewed-on: https://webrtc-review.googlesource.com/39883
Reviewed-by: Lu Liu <lliuu@webrtc.org>
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21647}
2018-01-17 00:28:27 +00:00
Seth Hampson
18c4261339 Enables/disables simulcast streams by allocating a bitrate of 0 to the spatial layer.
Creates VideoStreams & VideoCodec.simulcastStreams with an active field, and then allocates 0 bitrate to simulcast streams that are inactive. This turns off the encoder for specific simulcast streams.

Bug: webrtc:8653
Change-Id: Id93b03dcd8d1191a7d3300bd77882c8af96ee469
Reviewed-on: https://webrtc-review.googlesource.com/37740
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21646}
2018-01-16 19:36:14 +00:00
Erik Språng
27a457d172 Smoother frame dropping when screenshare_layers limits fps
This is a reland of https://webrtc-review.googlesource.com/34380

The main problem with that CL was that we used frame timestamps as basis
for frame dropping, but those might not be continuous or even populated
in some circumstances.

Additionally, I found that the bitrate was off since the encoder does
not not take the dropped frames into account, so if we drop every other
frame continiusoly, the bitrate sent will be around half of the target.

Patch set 1 is the original CL, subsequent patch sets cotains fixes.

Bug: webrtc:4172
Change-Id: I8ec8dddcebf4ce44f28dd9055cf9c46bbd68e4a6
Reviewed-on: https://webrtc-review.googlesource.com/39201
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21601}
2018-01-12 14:40:40 +00:00
Magnus Jedvert
84d8ae5df7 Android: Use scoped java refs
We currently use raw jobject in our code mixed with sporadic
ScopedLocalRefFrame. This CL moves every jobject into a scoped object,
either local, global, or a parameter. Also, this CL uses the JNI
generation script to generate declaration stubs for the Java->C++
functions so that it no longer becomes possible to mistype them
without getting compilation errors.

TBR=brandt@webrtc.org

Bug: webrtc:8278,webrtc:6969
Change-Id: Ic7bac74a89c11180177d65041086d7db1cdfb516
Reviewed-on: https://webrtc-review.googlesource.com/34655
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21387}
2017-12-20 15:46:06 +00:00
Erik Språng
afb3fc3558 Revert "Smoother frame dropping when screenshare_layers limits fps"
This reverts commit 28a06b16cc.

Reason for revert: Causes some unexpected perf changes.

Original change's description:
> Smoother frame dropping when screenshare_layers limits fps
> 
> Currently, when input fps is higher than the configured target fps in
> screenshare_layers, we drop frames with the help of a rate tracker using
> a one second sliding window. This is not optimal.
> For instance, given a 5fps limit and a 30fps capturer, the window will
> not be saturated until we have added the first 5 frames. Then we will
> drop all frames until the oldest one drops out, at which point we can
> immediately fill it's place. This results in quick 5 frame bursts every
> second.
> 
> In addition to rate tracker, also set a limit on minimum interval
> required between input frames, based on target frame rate.
> 
> Bug: webrtc:4172
> Change-Id: I49f0abf4d549673cc6b3fafe580b529ea3feaf57
> Reviewed-on: https://webrtc-review.googlesource.com/34380
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21325}

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

Change-Id: I7ca5b0c847310dbb11dce28773082eac946c0ba4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:4172
Reviewed-on: https://webrtc-review.googlesource.com/34780
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21354}
2017-12-19 11:21:11 +00:00
Erik Språng
28a06b16cc Smoother frame dropping when screenshare_layers limits fps
Currently, when input fps is higher than the configured target fps in
screenshare_layers, we drop frames with the help of a rate tracker using
a one second sliding window. This is not optimal.
For instance, given a 5fps limit and a 30fps capturer, the window will
not be saturated until we have added the first 5 frames. Then we will
drop all frames until the oldest one drops out, at which point we can
immediately fill it's place. This results in quick 5 frame bursts every
second.

In addition to rate tracker, also set a limit on minimum interval
required between input frames, based on target frame rate.

Bug: webrtc:4172
Change-Id: I49f0abf4d549673cc6b3fafe580b529ea3feaf57
Reviewed-on: https://webrtc-review.googlesource.com/34380
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21325}
2017-12-18 15:28:39 +00:00
Åsa Persson
aa329e7cc3 Reland: googBandwidthLimitedResolution stat is not always set depending on configuration.
TBR=brandtr@webrtc.org,stefan@webrtc.org

Currently |bw_resolutions_disabled| is set per VP8EncoderImpl instance and reported via
OnEncodedImage callback.

Instead move logic to SendStatisticsProxy to determine if resolution is bw limited or not based
on info that is reported to SendStatisticsProxy::OnEncodedImage.

Bug: webrtc:8643
Change-Id: I553cea30dcda34b753b5224f15094a1b7b70a750
Reviewed-on: https://webrtc-review.googlesource.com/31460
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#21249}
Reviewed-on: https://webrtc-review.googlesource.com/33360
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21319}
2017-12-18 11:20:13 +00:00
Guido Urdaneta
62e9ebe589 Revert "googBandwidthLimitedResolution stat is not always set depending on configuration."
This reverts commit 59283e4c66.

Reason for revert: This CL is preventing rolls into Chromium because it fails to compile with MSVC.

Sample error log:

[13258/43857] CXX obj/third_party/webrtc/video/video/send_statistics_proxy.obj
FAILED: obj/third_party/webrtc/video/video/send_statistics_proxy.obj 
ninja -t msvc -e environment.x64 -- E:\b\c\goma_client/gomacc.exe "e:\b\c\win_toolchain\vs_files\a9e1098bba66d2acccc377d5ee81265910f29272\vc\tools\msvc\14.11.25503\bin\hostx64\x64/cl.exe" /nologo /showIncludes  @obj/third_party/webrtc/video/video/send_statistics_proxy.obj.rsp /c ../../third_party/webrtc/video/send_statistics_proxy.cc /Foobj/third_party/webrtc/video/video/send_statistics_proxy.obj /Fd"obj/third_party/webrtc/video/video_cc.pdb"
../../third_party/webrtc/video/send_statistics_proxy.cc(217): error C2220: warning treated as error - no 'object' file generated
../../third_party/webrtc/video/send_statistics_proxy.cc(217): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
../../third_party/webrtc/video/send_statistics_proxy.cc(632): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data


Original change's description:
> googBandwidthLimitedResolution stat is not always set depending on configuration.
> 
> Currently |bw_resolutions_disabled| is set per VP8EncoderImpl instance and reported via
> OnEncodedImage callback.
> 
> Instead move logic to SendStatisticsProxy to determine if resolution is bw limited or not based
> on info that is reported to SendStatisticsProxy::OnEncodedImage.
> 
> Bug: webrtc:8643
> Change-Id: I6c148e3507a0f04a793775b9f84ce54028b64d0f
> Reviewed-on: https://webrtc-review.googlesource.com/31460
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21249}

TBR=brandtr@webrtc.org,asapersson@webrtc.org,stefan@webrtc.org

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

Bug: webrtc:8643
Change-Id: Ib9ef55b8894ea72236a5dc1e9a839adecd401afb
Reviewed-on: https://webrtc-review.googlesource.com/33100
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21284}
2017-12-14 17:35:53 +00:00
Åsa Persson
59283e4c66 googBandwidthLimitedResolution stat is not always set depending on configuration.
Currently |bw_resolutions_disabled| is set per VP8EncoderImpl instance and reported via
OnEncodedImage callback.

Instead move logic to SendStatisticsProxy to determine if resolution is bw limited or not based
on info that is reported to SendStatisticsProxy::OnEncodedImage.

Bug: webrtc:8643
Change-Id: I6c148e3507a0f04a793775b9f84ce54028b64d0f
Reviewed-on: https://webrtc-review.googlesource.com/31460
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21249}
2017-12-13 14:32:21 +00:00
Sergey Silkin
fd731cb7d9 Allow YUVJ420 format.
FFMpeg H264 decoder uses YUVJ420 when video_full_range_flag=1 in
bitstream.

Information about color range might be useful for color converter
and renderer. But currently there is no way to extract it from
the wrapper.

Bug: webrtc:8185
Change-Id: Ifd1113f0eee3d7b5906d0cefbc29b4a1061262f6
Reviewed-on: https://webrtc-review.googlesource.com/32000
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21246}
2017-12-13 14:08:01 +00:00
Sami Kalliomäki
20b294c28e Android: Re-enable videoprocessor integration tests.
The problem was that the encoder was feeded with frames that had 0 as
a timestamp. This confused the encoder. H264 high profile support
clause was also wrong and is corrected.

Bug: webrtc:8601
Change-Id: Ic5a893b4b7573e694f865b63620843b2c9aa489f
Reviewed-on: https://webrtc-review.googlesource.com/32300
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21234}
2017-12-13 08:59:30 +00:00
Sergey Silkin
db3d1c611e Remove tests with non-zero packet loss.
Concealment is never used in WebRTC since we never feed decoders with
broken bitstream. If so, there is no need to evaluate concealment
quality.
But if we still want to evaluate it then the tests should be
redesigned: recovery frames should be generated with reasonable
interval and quality thresholds should be set to acceptable level.

Bug: webrtc:8524
Change-Id: Ie7197e0a5a88aafcb3b2698185edcb43b71fae3b
Reviewed-on: https://webrtc-review.googlesource.com/32303
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21230}
2017-12-12 15:03:27 +00:00
Emircan Uysaler
0a37547033 Add optional stereo codec to SDP negotiation
- Defines stereo codec case, similar to RTX, that adds stereo codec to the SDP
negotiation. The underlying codec's payload type is similarly defined by "apt".
- If this negotiation is successful, codec name is included in sdp line via
"acn".
- Adds codec setting initializers for these specific stereo cases.
- Introduces new Stereo*Factory classes as optional convenience wrappers that
inserts stereo codec to the existing set of supported codecs on demand.

This CL is the step 5 for adding alpha channel support over the wire in webrtc.
Design Doc: https://goo.gl/sFeSUT

Bug: webrtc:7671
Change-Id: Ie12c56c8fcf7934e216135d73af33adec5248f76
Reviewed-on: https://webrtc-review.googlesource.com/22901
Commit-Queue: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21210}
2017-12-11 16:30:06 +00:00
Mirko Bonadei
654320666d Including libyuv headers using fully qualified paths.
Using fully qualified paths to include libyuv headers allows WebRTC to
avoid to rely on the //third_party/libyuv:libyuv_config target to
set the -I compiler flag.

Today some WebRTC targets depend on //third_party/libyuv only to
include //third_party/libyuv:libyuv_config but with fully qualified
paths this should not be needed anymore.

A follow-up CL will remove //third_party/libyuv from some targets that
don't need it because they are not including libyuv headers.

Bug: webrtc:8605
Change-Id: Icec707ca761aaf2ea8088e7f7a05ddde0de2619a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/28220
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21209}
2017-12-11 15:51:26 +00:00
Jerome Jiang
831af370fe VP9: Use 2 threads on low res on ARM.
WebRTC standalone tests show 24% speed up on foreman_cif, 16% speed up
on a 240p clip and 11% speed up on Bridge_r180.

Bug: None
Change-Id: I433b7a8841bd9df2402575f72dd1984cc5e011a9
Reviewed-on: https://webrtc-review.googlesource.com/29260
Commit-Queue: Jerome Jiang <jianj@google.com>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21096}
2017-12-05 23:06:42 +00:00
Magnus Jedvert
e4a9e923e4 Update videoprocessor tool to use new video factory interface
This will also cause us to use the new Android HardwareVideoEncoder,
instead of the deprecated MediaCodecVideoEncoderFactory. Unfortunately,
the new HW encoder does not seem to work as good as the old (or the new
encoder is more strict with return values or something). I don't think
it adds much value to continue testing the deprecated encoder, so I
filed a bug for fixing the new encoder, and in this CL I disabled the
tests on Android. I want to remove as many places as possible where we
use the old WebRtcVideoEncoderFactory interface, because it makes it
more difficult to migrate to the new interface.

Bug: webrtc:7925
Change-Id: If8e34752148a5e5139944d2dfbe7e231fe58aeb9
Reviewed-on: https://webrtc-review.googlesource.com/27540
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21037}
2017-12-04 13:44:59 +00:00
Oskar Sundbom
3808709afd Optional: Use nullopt and implicit construction in /modules/video_coding/codecs/h264
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

R=sprang@webrtc.org

Bug: None
Change-Id: Ic429f28a8610ca798e29c45ec1f64604d6f9687f
Reviewed-on: https://webrtc-review.googlesource.com/23603
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20955}
2017-11-30 15:49:20 +00:00
Emircan Uysaler
90612a681b Reland "Add stereo codec header and pass it through RTP"
This is a reland of 20f2133d5d
Original change's description:
> Add stereo codec header and pass it through RTP
>
> - Defines CodecSpecificInfoStereo that carries stereo specific header info from
> encoded image.
> - Defines RTPVideoHeaderStereo that carries the above info to packetizer,
> see module_common_types.h.
> - Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo
> header.
> - Uses new data containers in StereoAdapter classes.
>
> This CL is the step 3 for adding alpha channel support over the wire in webrtc.
> See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
> CL that gives an idea about how it will come together.
> Design Doc: https://goo.gl/sFeSUT
>
> Bug: webrtc:7671
> Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab
> Reviewed-on: https://webrtc-review.googlesource.com/22900
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20920}

TBR=danilchap@webrtc.org, sprang@webrtc.org, niklas.enbom@webrtc.org

Bug: webrtc:7671
Change-Id: If8f0c7e6e3a2a704f19161f0e8bf1880906e7fe0
Reviewed-on: https://webrtc-review.googlesource.com/27160
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20946}
2017-11-30 01:44:19 +00:00
Philip Eliasson
deb866360a Revert "Add stereo codec header and pass it through RTP"
This reverts commit 20f2133d5d.

Reason for revert: Breaks downstream project.

Original change's description:
> Add stereo codec header and pass it through RTP
> 
> - Defines CodecSpecificInfoStereo that carries stereo specific header info from
> encoded image.
> - Defines RTPVideoHeaderStereo that carries the above info to packetizer,
> see module_common_types.h.
> - Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo
> header.
> - Uses new data containers in StereoAdapter classes.
> 
> This CL is the step 3 for adding alpha channel support over the wire in webrtc.
> See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
> CL that gives an idea about how it will come together.
> Design Doc: https://goo.gl/sFeSUT
> 
> Bug: webrtc:7671
> Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab
> Reviewed-on: https://webrtc-review.googlesource.com/22900
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20920}

TBR=danilchap@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,niklas.enbom@webrtc.org,emircan@webrtc.org

Change-Id: I57f3172ca3c60a84537d577a574dc8018e12d634
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7671
Reviewed-on: https://webrtc-review.googlesource.com/26940
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20931}
2017-11-29 11:39:41 +00:00
Emircan Uysaler
20f2133d5d Add stereo codec header and pass it through RTP
- Defines CodecSpecificInfoStereo that carries stereo specific header info from
encoded image.
- Defines RTPVideoHeaderStereo that carries the above info to packetizer,
see module_common_types.h.
- Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo
header.
- Uses new data containers in StereoAdapter classes.

This CL is the step 3 for adding alpha channel support over the wire in webrtc.
See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
CL that gives an idea about how it will come together.
Design Doc: https://goo.gl/sFeSUT

Bug: webrtc:7671
Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab
Reviewed-on: https://webrtc-review.googlesource.com/22900
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20920}
2017-11-28 18:43:43 +00:00
Oskar Sundbom
6bd39025ec Optional: Use nullopt and implicit construction in /modules/video_coding
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

Bug: None
Change-Id: Iedebf4dc56a973306e7d7e7649525879808dc72b
Reviewed-on: https://webrtc-review.googlesource.com/23578
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20878}
2017-11-24 18:36:09 +00:00
Sergey Silkin
64eaa99cfc On-fly calculation of quality metrics.
Calculation of quality metrics required writing of decoded video
to file. There were two drawbacks with that approach. First, frame
drops significantly affected metrics because comparison was done
against the last decoded frame. Second, simulcast/SVC required
writing of multiple files. This might be too much data to dump.

On-fly metrics calculation is done in frame decoded callback.
Calculation time is excluded from encoding/decoding time. If CPU
usage measurement is enabled metrics calculation is disabled since
it affects CPU usage. The results are reported in Stats::PrintSummary.

Bug: webrtc:8524
Change-Id: Id54fb21f2f95deeb93757afaf46bde7d7ae18dac
Reviewed-on: https://webrtc-review.googlesource.com/22560
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20798}
2017-11-20 16:13:59 +00:00
Magnus Jedvert
df4883dbf0 Reland "Update internal encoder factory to new interface"
This is a reland of 2c8c8e26fc
Original change's description:
> Update internal encoder factory to new interface
>
> TBR=stefan@webrtc.org
>
> Bug: webrtc:7925
> Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
> Reviewed-on: https://webrtc-review.googlesource.com/21162
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20717}

TBR=andersc@webrtc.org,brandt@webrtc.org,stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I0d269b3edb029e372a36c3b461a577bca2b6d0cb
Reviewed-on: https://webrtc-review.googlesource.com/24000
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20747}
2017-11-18 10:48:28 +00:00
Zhi Huang
aea84f5519 Revert "Update internal encoder factory to new interface"
This reverts commit 2c8c8e26fc.

Reason for revert: Broke the internal projects.

Original change's description:
> Update internal encoder factory to new interface
> 
> TBR=stefan@webrtc.org
> 
> Bug: webrtc:7925
> Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
> Reviewed-on: https://webrtc-review.googlesource.com/21162
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20717}

TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org,stefan@webrtc.org

Change-Id: I989070277885ee70fe6b38272d0001cff890f3ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/23780
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20720}
2017-11-16 18:46:35 +00:00
Magnus Jedvert
2c8c8e26fc Update internal encoder factory to new interface
TBR=stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I0bb97acdf0d58a9ce531ecdd672bb17ef96360df
Reviewed-on: https://webrtc-review.googlesource.com/21162
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20717}
2017-11-16 17:55:24 +00:00
Oleh Prypin
6581f21f0e Fix some missed stdlib includes
Ran into these when trying a newer libstdc++

Bug: None
Change-Id: Ie3ce0ae1ae1e6da1a15476fbf942b48b37adc9fa
Reviewed-on: https://webrtc-review.googlesource.com/23501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20701}
2017-11-16 08:50:44 +00:00
mallikarjun82
12e555b715 Delete wrapper API ConvertToI420 for YUV conversion to I420
Directly use the libyuv API for YUV conversion to I420

Bug: None
Change-Id: Iea6e8fa8f7179c800ea850305170002398cb00dc
Reviewed-on: https://webrtc-review.googlesource.com/17260
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20681}
2017-11-15 11:10:20 +00:00
Magnus Jedvert
ee92d626bd Update VideoEncoderSoftwareFallbackWrapper to take VideoEncoder as arg
VideoEncoderSoftwareFallbackWrapper is updated to take a VideoEncoder as
argument instead relying on built-in SW codecs. The purpose is to make
VideoEncoderSoftwareFallbackWrapper more modular and not depend on
built-in SW encoders.

Bug: webrtc:7925
Change-Id: I99896f0751cfb77e01efd29c97d3bd07bdb2c7c0
Reviewed-on: https://webrtc-review.googlesource.com/22320
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20671}
2017-11-14 10:47:46 +00:00
Magnus Jedvert
46a2765c56 Reland "Update internal SW codecs to return unique_ptrs"
This reverts commit 34c8e6bce8.

Reason for revert: Fix Android compilation

Original change's description:
> Revert "Update internal SW codecs to return unique_ptrs"
>
> This reverts commit 4fe6adc06a.
>
> Reason for revert: Breaks android compile.
>
> Original change's description:
> > Update internal SW codecs to return unique_ptrs
> >
> > TBR=stefan@webrtc.org
> >
> > Bug: webrtc:7925
> > Change-Id: I84239b071a2608d928f09b06809090eec5eafb14
> > Reviewed-on: https://webrtc-review.googlesource.com/21165
> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20650}
>
> TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org
>
> Change-Id: If33c3a0ee0dfce63d105558a2897a472f0633306
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7925
> Reviewed-on: https://webrtc-review.googlesource.com/22540
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20652}

TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org

Change-Id: Ic8551af4687e927c9b605060155abdd5bc6208b2
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/22541
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20655}
2017-11-13 14:23:58 +00:00
Magnus Jedvert
34c8e6bce8 Revert "Update internal SW codecs to return unique_ptrs"
This reverts commit 4fe6adc06a.

Reason for revert: Breaks android compile.

Original change's description:
> Update internal SW codecs to return unique_ptrs
> 
> TBR=stefan@webrtc.org
> 
> Bug: webrtc:7925
> Change-Id: I84239b071a2608d928f09b06809090eec5eafb14
> Reviewed-on: https://webrtc-review.googlesource.com/21165
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20650}

TBR=magjed@webrtc.org,sprang@webrtc.org,stefan@webrtc.org

Change-Id: If33c3a0ee0dfce63d105558a2897a472f0633306
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/22540
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20652}
2017-11-13 13:02:30 +00:00
Åsa Persson
eb4500701b Remove use of SetEncodingDataInternal in MediaOptimization.
Add method FilenameWithParams to TestConfig.

Bug: none
Change-Id: I9f683e661537148dc01bee25f7510938fa656dc5
Reviewed-on: https://webrtc-review.googlesource.com/21382
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20651}
2017-11-13 12:39:48 +00:00
Magnus Jedvert
4fe6adc06a Update internal SW codecs to return unique_ptrs
TBR=stefan@webrtc.org

Bug: webrtc:7925
Change-Id: I84239b071a2608d928f09b06809090eec5eafb14
Reviewed-on: https://webrtc-review.googlesource.com/21165
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20650}
2017-11-13 12:31:18 +00:00
Åsa Persson
45bbc8ac19 Change forced software encoder fallback for VP8 to be only based on resolution and not bitrate.
Switches from VP8 HW to VP8 SW for resolutions <= max_pixels. 

|<- min_pixels  VP8 SW  max_pixels ->|  VP8 HW  |

Bug: webrtc:6634
Change-Id: Ib324df2b8418659c29d999259c0ed47448310696
Reviewed-on: https://webrtc-review.googlesource.com/7362
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20646}
2017-11-13 10:58:42 +00:00
Emircan Uysaler
574eaa4cda Add alpha channel to VideoFrameBuffer containers
- Add alpha accessors to PlanarYuvBuffer interface, null by defualt.
- Add WrapI420ABuffer() that creates a container which implements these
accessors.
- Show the use via StereoDecoderAdapter.

This CL is the step 2 for adding alpha channel support over the wire in webrtc.
See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
CL that gives an idea about how it will come together.
Design Doc: https://goo.gl/sFeSUT

Bug: webrtc:7671
Change-Id: Id5691cde00088ec811b63d89080d33ad2d6e3939
Reviewed-on: https://webrtc-review.googlesource.com/21130
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20635}
2017-11-10 17:13:25 +00:00
Magnus Jedvert
7501b1c3d1 Reland "Update internal video decoder factory to new interface"
This reverts commit 267d84baf0.

Reason for reland: Fix the bug; decoder is not allowed to ever be null and we need to use a
NullVideoDecoder that ignores calls instead.

Original change's description:
> Revert "Update internal video decoder factory to new interface"
>
> This reverts commit b2fc9b1b10.
>
> Reason for revert: Suspected to cause failures on Android bots on webrtc.fyi, see https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28K%20Nexus5%29/builds/21051
>
> Original change's description:
> > Update internal video decoder factory to new interface
> >
> > We want to move away from cricket::WebRtcVideoDecoderFactory and this CL
> > updates the internal factory. Also, VideoDecoderSoftwareFallbackWrapper
> > is updated to take a VideoDecoder as argument instead of a factory so it
> > can be used with external SW decoders.
> >
> > Bug: webrtc:7925
> > Change-Id: Ie6dc6c24f8610a2129620c6e2b42e3cebb2ddef7
> > Reviewed-on: https://webrtc-review.googlesource.com/7301
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20597}
>
> TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org
>
> Change-Id: I0a12c98fdc30f00d58c85ee7e088f50160d39724
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7925
> Reviewed-on: https://webrtc-review.googlesource.com/21420
> Reviewed-by: Christian Fremerey <chfremer@webrtc.org>
> Commit-Queue: Christian Fremerey <chfremer@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20605}

TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org,chfremer@webrtc.org,chfremer@google.com

Change-Id: I6cf5794dc3fadfa86809a94da80b69dbb4c56f52
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/21541
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20623}
2017-11-09 14:29:12 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Christian Fremerey
267d84baf0 Revert "Update internal video decoder factory to new interface"
This reverts commit b2fc9b1b10.

Reason for revert: Suspected to cause failures on Android bots on webrtc.fyi, see https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28K%20Nexus5%29/builds/21051

Original change's description:
> Update internal video decoder factory to new interface
> 
> We want to move away from cricket::WebRtcVideoDecoderFactory and this CL
> updates the internal factory. Also, VideoDecoderSoftwareFallbackWrapper
> is updated to take a VideoDecoder as argument instead of a factory so it
> can be used with external SW decoders.
> 
> Bug: webrtc:7925
> Change-Id: Ie6dc6c24f8610a2129620c6e2b42e3cebb2ddef7
> Reviewed-on: https://webrtc-review.googlesource.com/7301
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20597}

TBR=brandtr@webrtc.org,magjed@webrtc.org,andersc@webrtc.org

Change-Id: I0a12c98fdc30f00d58c85ee7e088f50160d39724
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7925
Reviewed-on: https://webrtc-review.googlesource.com/21420
Reviewed-by: Christian Fremerey <chfremer@webrtc.org>
Commit-Queue: Christian Fremerey <chfremer@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20605}
2017-11-08 23:59:21 +00:00
Sergey Silkin
8c37b618b1 Switch to new FFmpeg API.
Deprecated avcodec_decode_video2 is replaced with
avcodec_send_packet and avcodec_receive_frame.
https://www.ffmpeg.org/doxygen/3.1/group__lavc__encdec.html

Setting av_context_->refcounted_frames=1 is removed. This
is automatically enabled if avcodec_receive_frame us used.

Bug: webrtc:8493
Change-Id: Id1d2b1315717f4553fb7fc182197f9429bd31daf
Reviewed-on: https://webrtc-review.googlesource.com/18462
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20601}
2017-11-08 15:06:09 +00:00
Magnus Jedvert
b2fc9b1b10 Update internal video decoder factory to new interface
We want to move away from cricket::WebRtcVideoDecoderFactory and this CL
updates the internal factory. Also, VideoDecoderSoftwareFallbackWrapper
is updated to take a VideoDecoder as argument instead of a factory so it
can be used with external SW decoders.

Bug: webrtc:7925
Change-Id: Ie6dc6c24f8610a2129620c6e2b42e3cebb2ddef7
Reviewed-on: https://webrtc-review.googlesource.com/7301
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20597}
2017-11-08 12:05:10 +00:00
Magnus Jedvert
a750333372 Remove support for SW H264 High profile decoding
Also put Baseline profile in front of Constrained Baseline profile. The
reason is that the HW encoders are mostly BP, and we want this to be the
first codec in the list so that HW is preferred by default.

The H264 tests in chromium needs to be updated again with this change,
which was changed here: https://codereview.chromium.org/2985263002/.

Bug: webrtc:8317
Change-Id: Ief75683962b79b6664143d73b9259729c66ce082
Reviewed-on: https://webrtc-review.googlesource.com/17780
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20554}
2017-11-02 21:22:49 +00:00
Max Morin
96acb43b2a Fix Chromium compile of StereoEncoderAdapter.
WebRTC rolls into Chromium are failing, we should fix it ASAP.

Log:
FAILED:
obj/third_party/webrtc/modules/video_coding/webrtc_stereo/stereo_encoder_adapter.obj
ninja -t msvc -e environment.x64 -- E:\b\c\goma_client/gomacc.exe
"e:\b\c\win_toolchain\vs_files\88c3b62e1eb0893b8cd57e3f4859c3af27907f64\vc\tools\msvc\14.11.25503\bin\hostx64\x64/cl.exe"
/nologo /showIncludes
@obj/third_party/webrtc/modules/video_coding/webrtc_stereo/stereo_encoder_adapter.obj.rsp
/c
../../third_party/webrtc/modules/video_coding/codecs/stereo/stereo_encoder_adapter.cc
/Foobj/third_party/webrtc/modules/video_coding/webrtc_stereo/stereo_encoder_adapter.obj
/Fd"obj/third_party/webrtc/modules/video_coding/webrtc_stereo_cc.pdb"
../../third_party/webrtc/modules/video_coding/codecs/stereo/stereo_encoder_adapter.cc(134):
error C2220: warning treated as error - no 'object' file generated
../../third_party/webrtc/modules/video_coding/codecs/stereo/stereo_encoder_adapter.cc(134):
warning C4267: 'argument': conversion from 'size_t' to 'uint32_t',
possible loss of data

Bug: chromium:780411
Change-Id: Ia80f4551d0efeebc6d084e951f5c25e8b9401250
Reviewed-on: https://webrtc-review.googlesource.com/17781
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Max Morin <maxmorin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20522}
2017-11-01 09:53:16 +00:00
Emircan Uysaler
dbcac7fefe Add StereoCodecAdapter classes
This CL is the step 1 for adding alpha channel support over the wire in webrtc.
- Add the footprint for adapter classes that wraps actual codecs.
- This CL does not add a webrtc::VideoFrame container that can carry alpha to 
make the CL shorter for an easier review. Therefore, it exercises a code path
for when we receive no alpha input, just regular I420 frames.
- Unittest sends a video frame for encode/decode through these adapters and 
checks the output PSNR.
- See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental 
CL that gives an idea about how it will come together.
Design Doc: https://goo.gl/sFeSUT

Bug: webrtc:7671
Change-Id: I9d3be13647a0a958feceb8d7a9aa93852fc6a1fa
Reviewed-on: https://webrtc-review.googlesource.com/11841
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20490}
2017-10-31 06:39:52 +00:00
Rasmus Brandt
fb1a8661db Add support for H.264 constrained high profile in VideoProcessor.
BUG=webrtc:8448

Change-Id: I968d6cd78dd4f3c19a7944ae4cc73c5eddb9a949
Reviewed-on: https://webrtc-review.googlesource.com/16160
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20466}
2017-10-27 13:30:34 +00:00
Rasmus Brandt
e4c6915b87 Remove verbose setting and reorder some print statements in VideoProcessor.
Always enabling verbose mode means about 100% more text is printed,
but this should not be a problem as the only time that we explicitly
look at the logs is when the bots are failing, or when we want to save
all output for plotting.

BUG=webrtc:8448

Change-Id: Ia5feab5220d047440d15cddb7d3fbca1c5a4aaf5
Reviewed-on: https://webrtc-review.googlesource.com/16140
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20461}
2017-10-27 10:52:14 +00:00
Åsa Persson
e87cfe2315 Remove unused method PacketLossModeToStr.
Add method FrameType for frame to TestConfig.

Bug: none
Change-Id: Icfeb12fcb961559c9b36a3aedb081a840b9d8556
Reviewed-on: https://webrtc-review.googlesource.com/16120
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20458}
2017-10-27 08:51:27 +00:00
Rasmus Brandt
fb6d32602c Delete unused PredictivePacketManipulator.
BUG=webrtc:8448

Change-Id: I07ff9db5cb49f84d98b6076e748a990aa560b5b5
Reviewed-on: https://webrtc-review.googlesource.com/15400
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20437}
2017-10-26 07:17:24 +00:00
Jerome Jiang
f7eea2a6bc Change key frame mismatch threshold for VP9 in unit test.
Change the threshold in ProcessNoLossChangeBitRateVP9.

Bug: webrtc:8442
Change-Id: Ic924a60f60c57cc2c990430cb6c70fdbefec97f4
Reviewed-on: https://webrtc-review.googlesource.com/15840
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20436}
2017-10-26 07:01:15 +00:00
Åsa Persson
f0c44672df Make VideoProcessor::Init/Release methods private and call from constructor/destructor.
TestConfig: Replace Print method with ToString and add test.

Bug: none
Change-Id: I9853cb16875199a51c5731d1cec326159751d001
Reviewed-on: https://webrtc-review.googlesource.com/14320
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20420}
2017-10-25 09:31:12 +00:00
Ilya Nikolaevskiy
c22a3a6a7d Refactor VP8 encoder creation logic
Now decision between using SimulcastEncoderAdapter and using VP8 encoder
is postponed before codec is initialized for VP8 internal codecs. This is done
be new VP8EncoderProxy class. New error code for codec initialization is used
to signal that simulcast parameters are not supported.

Bug: webrtc:7925
Change-Id: I3a82c21bf5dfaaa7fa25350986830523f02c39d8
Reviewed-on: https://webrtc-review.googlesource.com/13980
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20419}
2017-10-25 09:30:07 +00:00
Rasmus Brandt
f7a3558f3e Add VideoProcessor tests verifying that H.264 keyframes contain SPS/PPS/IDR.
This CL adds an EncodedFrameChecker interface which can be used by users
of the VideoProcessor to inject customized per-frame checks to the
encoding/decoding pipeline. This currently has two uses:
- Verifying that the QP parser works correctly for VP8 and VP9, by comparing the
  parsed QP to that produced by libvpx.
- Verifying that our H.264 encoders always produce SPS/PPS/IDR in tandem.

TESTED=Galaxy S8, Pixel 2 XL, iPhone 7.
BUG=webrtc:8423

Change-Id: Ic3e401546e239a9ffaf2ed2907689cebb1127805
Reviewed-on: https://webrtc-review.googlesource.com/14559
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20409}
2017-10-24 13:58:38 +00:00
Åsa Persson
2d27fb5a33 Move TestConfig to separate file.
Move functions Set/PrintCodecSettings, NumberOfTemporalLayers to TestConfig.
Add function NumberOfCores.

Bug: none
Change-Id: Ic33d79681d59d62bf34d9c9ff056a751ed3f8da8
Reviewed-on: https://webrtc-review.googlesource.com/13120
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20358}
2017-10-19 13:56:31 +00:00
Åsa Persson
7173cf20cc Add cpu measurements to VideoProcessorIntegrationTest.
Remove unused method ExcludeFrameTypesToStr.

Bug: webrtc:6634
Change-Id: I2816466ed428b8ce13f3073ca496c2891d5d6368
Reviewed-on: https://webrtc-review.googlesource.com/9400
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20350}
2017-10-19 11:37:51 +00:00
Mirko Bonadei
c8c71b9d76 Stop using ANDROID macro in favour of WEBRTC_ANDROID.
Since WEBRTC_ANDROID is defined by WebRTC while ANDROID is defined by
Chromium we should stop using ANDROID in WebRTC source code.

Bug: webrtc:8400
Change-Id: I1d59caaabd8af2423e86476b72e0e9185e6c7a3a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/10805
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20306}
2017-10-16 11:37:08 +00:00
Åsa Persson
dc182a486a VideoProcessorIntegrationTest: remove arrays in RateProfile and use vector of RateProfiles instead.
Move num_frames from RateProfile to TestConfig struct.

Remove methods: SetRateProfile, AddRateControlThresholds.

Bug: none
Change-Id: I14bcafb8c5b3c1d3b6119417dde038fd82381e3f
Reviewed-on: https://webrtc-review.googlesource.com/8540
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20265}
2017-10-13 07:19:56 +00:00
Magnus Jedvert
8deb818086 Support more H264 profiles for internal software codec
Care should be taken when landing this, because it will affect users of
WebRTC. I'm thinking primarily of Chromium. Chromium will start to
support High profile and Baseline profile using SW codecs with this CL.
Clients who do SDP munging without looking at the H264 profile might
switch from Constrained Baseline to High profile with this change.

Bug: webrtc:8317
Change-Id: Idca3a6b761a66d9e521b913b850c6ae14381f1f4
Reviewed-on: https://webrtc-review.googlesource.com/6341
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20190}
2017-10-06 14:28:44 +00:00
Niels Möller
84255bbe3b Add explicit includes of refcountedobject.h where it is used.
This is in preparation for deleting the include in rtc_base/refcount.h,
but that change has to wait for some downstream applications to 
not rely in the indirect include.

Partial reland of "Make rtc_base/refcount.h self contained, not including refcountedobject.h."

This is a reland of b7239a9dc8
Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

Bug: webrtc:8270
Change-Id: I63a42712f6c1ec83823c629d1a954fd1a04d4a6c
Reviewed-on: https://webrtc-review.googlesource.com/7281
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20185}
2017-10-06 13:00:14 +00:00
Niels Moller
fb26f85b79 Revert "Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h.""
This reverts commit bf6937a8e9.

Reason for revert: Broke internal projects.

Original change's description:
> Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
> 
> This is a reland of b7239a9dc8
> Original change's description:
> > Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> > 
> > The refcount.h file doesn't depend on anything from
> > refcountedobject.h. The motivation of this change to make it possible
> > to add additional declarations to refcount.h, and include it from
> > refcountedobject.h.
> > 
> > Bug: webrtc:8270
> > Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> > Reviewed-on: https://webrtc-review.googlesource.com/5760
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20106}
> 
> Bug: webrtc:8270
> Change-Id: I9738f6680ab52d0f43639a1a39175fdba5957681
> Reviewed-on: https://webrtc-review.googlesource.com/5840
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20180}

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

Change-Id: I342b241f5bb707b59ccf2d15a1a5befecb53a52e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8270
Reviewed-on: https://webrtc-review.googlesource.com/7280
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20181}
2017-10-06 11:05:55 +00:00
Niels Möller
bf6937a8e9 Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
This is a reland of b7239a9dc8
Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

Bug: webrtc:8270
Change-Id: I9738f6680ab52d0f43639a1a39175fdba5957681
Reviewed-on: https://webrtc-review.googlesource.com/5840
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20180}
2017-10-06 10:20:48 +00:00
Erik Språng
13044c1b53 Reduce time between sync frames for temporal layers vp8 screensharing.
This is expected to result in a slight loss of overall quality, but
should offset by quicker switching between temporal layers with flaky
connections.

Bug: webrtc:7694
Change-Id: Ib605802bb59f12773652324ac66cdf4774ae6bb6
Reviewed-on: https://webrtc-review.googlesource.com/6881
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20160}
2017-10-05 11:10:38 +00:00
Ilya Nikolaevskiy
586629155c Implement ScreenshareTemporalLayersChecker
Bug: none
Change-Id: Ic95156d0f47d186e2289264aa9a916511a8e4510
Reviewed-on: https://webrtc-review.googlesource.com/4960
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20143}
2017-10-04 14:18:04 +00:00
Niels Moller
d25fa78daf Revert "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
This reverts commit b7239a9dc8.

Reason for revert: Broke chromium mac build, compilation failures on content/renderer/media/webrtc/webrtc_video_frame_adapter.h.

Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

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

Change-Id: I7334597cc8979ba9cfaff526967084349ef27f3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8270
Reviewed-on: https://webrtc-review.googlesource.com/5800
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20107}
2017-10-03 09:49:04 +00:00
Niels Möller
b7239a9dc8 Make rtc_base/refcount.h self contained, not including refcountedobject.h.
The refcount.h file doesn't depend on anything from
refcountedobject.h. The motivation of this change to make it possible
to add additional declarations to refcount.h, and include it from
refcountedobject.h.

Bug: webrtc:8270
Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
Reviewed-on: https://webrtc-review.googlesource.com/5760
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20106}
2017-10-03 09:37:30 +00:00
Magnus Jedvert
849b3aeb71 Move list of supported H264 codecs from InternalEncoderFactory to h264.h
This CL is a clean-up to prepare for adding more supported codecs for the internal H264 SW codec.

Bug: webrtc:8317
Change-Id: If483d05c01c40bbc81cbd1a6aad89961689714ef
Reviewed-on: https://webrtc-review.googlesource.com/4940
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20105}
2017-10-03 09:01:31 +00:00
Ilya Nikolaevskiy
bf35298996 Implement temporal layers checkers for vp8
All frames are checked against hard-coded dependency graph 
using new helper class. It's invoked in RTC_DCHECK(). Only 
DefaultTemporalLayers are fully implemented in this CL, checker 
for ScreenshareLayers is not doing anything for now.

Bug: none
Change-Id: I3ec017176d8c25f7572c8f161e52f2ebfac8220f
Reviewed-on: https://webrtc-review.googlesource.com/3740
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20066}
2017-10-02 09:14:59 +00:00
ssilkin
612f858ba0 Adding test for SingleNalUnit mode
Test enables single-nalu mode, sets limit for nalu lenght and verifies
that encoder follows that limit.
I found that QP jumps significantly when the mode is enabled. In result
encoder might produce 4kbyte and 0.4kbyte frames back-to-back. But it
seems that happens only to couple of frames in the beginning. This
caused test to fail with default RC thresholds. To bypass this I
increased frame size mismatch threshold from 20 to 30%. This should be
Ok considering single-nalu mode is rare.

BUG=webrtc:8070

Review-Url: https://codereview.webrtc.org/3014623002
Cr-Commit-Position: refs/heads/master@{#20023}
2017-09-28 16:23:17 +00:00
Rasmus Brandt
638200e1eb Add support for SW fallback decoder in VideoProcessor.
BUG=none

Change-Id: Ib144b377115a48d26ff053e3b4b43f5260aa9f84
Reviewed-on: https://webrtc-review.googlesource.com/3760
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19999}
2017-09-27 12:51:26 +00:00
asapersson
e19d8bfd5b Modify some rate control and quality thresholds due to flakiness.
BUG=webrtc:8280

Review-Url: https://codereview.webrtc.org/3015683002
Cr-Commit-Position: refs/heads/master@{#19968}
2017-09-26 10:29:49 +00:00
Alex Loiko
dec82abab5 Disable flaky test VideoProcessorIntegrationTestMediaCodec.ForemanCif500kbpsVp8.
Test was Android-only, so it was disabled completely.

TBR=brandtr@webrtc.org

Bug: webrtc:8280
Change-Id: Id45eedac90fb892f5a380e5c2614037e01ee8c76
Reviewed-on: https://webrtc-review.googlesource.com/3460
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19954}
2017-09-25 16:25:03 +00:00
asapersson
55c7eded94 VideoProcessorIntegrationTest: Group member variables into two structs containing target/actual rates.
- Group member variables into two structs: target rates/actual rates.
- Split verify and print of rate control metrics into separate functions.
- Rename member variables.

BUG=webrtc:6634

Review-Url: https://codereview.webrtc.org/3009423002
Cr-Commit-Position: refs/heads/master@{#19925}
2017-09-22 10:45:15 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
niklase@google.com
5adc73aad3 git-svn-id: http://webrtc.googlecode.com/svn/trunk@166 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-07-07 08:46:41 +00:00
hlundin@google.com
f0a476bf76 Add PictureID and NonReference to codec information
The PictureID and NonReference information is now routed from the
encoder to the RTP packetizer through CodecSpecificInfo and 
RTPVideoHeaderVP8.
Review URL: http://webrtc-codereview.appspot.com/51003

git-svn-id: http://webrtc.googlecode.com/svn/trunk@155 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-07-07 08:04:23 +00:00