Commit graph

204 commits

Author SHA1 Message Date
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
Niels Möller
96d7f76036 Fix spelling of (internal) method name UpdateChannelParameters.
Bug: none
Change-Id: I17baa343b144d8619ef4389f137dbe6b91cf7b98
Reviewed-on: https://webrtc-review.googlesource.com/46020
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21830}
2018-01-31 14:26:49 +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
Anders Carlsson
dd8c16574e Enable building WebRTC without built-in software codecs
This CL adds a GN build flag to include builtin software codecs
(enabled by default).

When setting the flag to false, libvpx can also be excluded. The
benefit is that the resulting binary is smaller.

Replaces https://webrtc-review.googlesource.com/c/src/+/29203

Bug: webrtc:7925
Change-Id: Id330ea8a43169e449ee139eca18e4557cc932e10
Reviewed-on: https://webrtc-review.googlesource.com/36340
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: 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@{#21818}
2018-01-31 08:33:59 +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
Mirko Bonadei
65ce31158f Removing useless dependencies on //testing/gmock.
If a WebRTC build target requires gmock it has to include
test/gmock.h and just depend on //test:test_support.

Unfortunately //testtest_support was a leaky abstraction because it
wasn't propagating the correct -I compiler flag. To make everything
work, all the targets that use gmock started also to depend on
//testing/gmock (even if they were not including any gmock header
directly).

This CL makes //testtest_support propagate the include path up in the
dependency chain so it is possible to remove unused dependencies.

Note: all_dependent_configs should probably be used in the original
gmock target. There is an ongoing discussion about it. This CL solves
the problem on WebRTC side and it is forward compatible.

TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: If08daf2ce9a6431a6e881a236743b4ec33b59ea7
Reviewed-on: https://webrtc-review.googlesource.com/44340
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21776}
2018-01-26 13:34:12 +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
Ilya Nikolaevskiy
833cdea923 Fix typo in VCMRttFilter
Incorrect length parameter was passed to memset (lenght of array in
elements instead of length in bytes, which is 8 times more since int64
is used).

Bug: none
Change-Id: I9100d1986377a8b3b9e475d1fbc215f4a1dedfb1
Reviewed-on: https://webrtc-review.googlesource.com/44280
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21771}
2018-01-26 10:59:56 +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
b9b07eaf28 Move stats for decoded frames per second from VCMTiming to ReceiveStatisticsProxy.
Bug: none
Change-Id: I631a2b1cb550dded6d1e1daf47ac35583298d30d
Reviewed-on: https://webrtc-review.googlesource.com/36121
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21757}
2018-01-25 09:15:31 +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
Ying Wang
8ed653d1c4 Do not register VideoSendStream to PacketFeedbackObserver when the current FEC controller do not use Loss Vector Mask.
Bug: chromium:804865
Change-Id: Ib197ff05266a20b8358724e7d8bfe2b085a2de23
Reviewed-on: https://webrtc-review.googlesource.com/43123
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21742}
2018-01-24 10:40:22 +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
Ying Wang
3b790f316c Make fec controller plug-able.
Bug: webrtc:8656
Change-Id: I3d42ffc92a7c95266e5d53bab03f388bd0de2592
Reviewed-on: https://webrtc-review.googlesource.com/39760
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21710}
2018-01-22 11:48:16 +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
Patrik Höglund
34924c236c Fix warning 4373.
Looks like all the current warnings were because of a MSVC bug:
https://github.com/google/googletest/blob/master/googlemock/docs/FrequentlyAskedQuestions.md

We can just disable this one for all tests and be done with it.

Bug: webrtc:261
Change-Id: I882a577f832ff71ac61936abebe0ca537088bab8
Reviewed-on: https://webrtc-review.googlesource.com/40840
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21691}
2018-01-19 10:37:44 +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
Åsa Persson
8368d1a031 Remove unused functions in VCMTiming.
Remove VCMTiming::EnoughTimeToDecode, VCMTiming::ResetDecodeTime.

Make VCMTiming::StopDecodeTimer void (always returning zero).

Update ReceiverTiming.WrapAround test to insert timestamp that wraps.

Bug: none
Change-Id: I85a8bfd6be18371810b638284b4af73a46894be7
Reviewed-on: https://webrtc-review.googlesource.com/36060
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21660}
2018-01-17 14:47:10 +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
Ilya Nikolaevskiy
269674f7ad Throttle GenericEncoder warning messages more.
Because they usually happen for all or for no frames in a stream.

Bug: chrome:801327
Change-Id: Ie09b93a0822e821076ff2743cf1223c29fcf44a6
Reviewed-on: https://webrtc-review.googlesource.com/39785
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21644}
2018-01-16 15:26:14 +00:00
Patrik Höglund
a97af1f2f5 Complete moving video_coding headers.
Bug: webrtc:7620
Change-Id: Ic553cd083ef267b19897777340120b1f3e4765f2
Reviewed-on: https://webrtc-review.googlesource.com/39663
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21633}
2018-01-16 10:29:12 +00:00
Dan Minor
9c68613080 Update gn files to support Mozilla build
Bug: webrtc:8670
No-Presubmit: true
Change-Id: I085dc63daa8274b5068540cbf56b6330f40643fa
Reviewed-on: https://webrtc-review.googlesource.com/38920
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21624}
2018-01-16 07:51:23 +00:00
Patrik Höglund
a2ac1b4b22 Make video_codec_interface visible.
These headers contain public defines for the module, so it makes
sense it's visible.

Bug: webrtc:7620
Change-Id: I4c2604dcfb3beb4bfa0803a15d0e1a89c374e4cf
Reviewed-on: https://webrtc-review.googlesource.com/39261
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21616}
2018-01-15 15:59:19 +00:00
Oleh Prypin
2b82ee7a01 Silence deprecation warning for av_lockmgr_register
It should not be used anymore - see
https://webrtc-review.googlesource.com/39503
but it can be removed only after the DEPS roll.

Bug: webrtc:8745
Change-Id: I1ee29948e99be6cb4a700b67d37f72a0747a9fc5
Reviewed-on: https://webrtc-review.googlesource.com/39505
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21612}
2018-01-15 10:59:48 +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
Sebastian Jansson
cabe3838bb Moved ALR experiment settings to new experiments folder.
This replaces most of the existing dependencies on the application
limited region(ALR) detector. This is to achieve a greater separation of
concerns and will make further refactoring regarding the ALR Detector
less invasive on other parts of the code base.

Bug: webrtc:8415
Change-Id: I92912254c6d02285cce6a88f6789f0ac94794c88
Reviewed-on: https://webrtc-review.googlesource.com/37560
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21598}
2018-01-12 12:03:22 +00:00
Mirko Bonadei
75baa498fa Stop using public_deps in media/.
Bug: webrtc:8603
Change-Id: I7a6dad323ac298dc784feb5aa1fdc2ae5876cb5c
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/33180
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21591}
2018-01-12 08:15:01 +00:00
Mirko Bonadei
34814c728f Stop using public_deps in api/.
Bug: webrtc:8603
Change-Id: I12f91365fa9a3ed12be1a9658999b6f6aad7e5e3
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/33220
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21584}
2018-01-11 14:50:11 +00:00