Commit graph

1118 commits

Author SHA1 Message Date
Tommi
d3807da009 Fork NackModule and RtpVideoStreamReceiver
Bug: webrtc:11595
Change-Id: I4d14c0bf9c32e09d1624099a256f2778afebd4df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175901
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31337}
2020-05-22 17:07:16 +00:00
Jerome Jiang
3cc1a6509b Set av1 speed from resolution.
Use speed 6 for better quality for low resolution, speed 8 for HD for better speed.
This will better balance speed and quality.

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

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

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

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

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

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

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

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

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

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

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

Bug: chromium:1066819
Change-Id: Iad2b5edc5e62822c02e2bb2a53d4318f957be3bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173022
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31172}
2020-05-06 11:36:47 +00:00
Niels Möller
49f574b3b3 Delete EncodedImage methods buffer(), set_buffer() and mutable_data()
Bug: webrtc:9378
Change-Id: Iab21fe537f03a5cd130d8435cd94520952e693a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168494
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31164}
2020-05-05 09:11:40 +00:00
philipel
1b900b1322 Removed unused function EncodedFrame::SetEncodedSize.
Bug: none
Change-Id: I5b4ce351193198c14cf3c336f910eb1d910f034c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174380
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31158}
2020-05-04 16:44:12 +00:00
Mirko Bonadei
a81e9c82fc Wrap WebRTC OBJC API types with RTC_OBJC_TYPE.
This CL introduced 2 new macros that affect the WebRTC OBJC API symbols:

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

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

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

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

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

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

Bug: None
Change-Id: I0d54ca94db764fb3b6cb4365873f79e14cd879b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31153}
2020-05-04 15:01:26 +00:00
Henrik Boström
012aa375b1 Asynchronous QualityScaler: Callback-based CheckQpTask.
This CL breaks up the CheckQp() operation into several steps managed
by the inner helper class CheckQpTask, making responding to high or
low QP an asynchronous operation. Why? Reconfiguring the stream in
response to QP overuse will in the future be handled on a separate
task queue. See Call-Level Adaptation Processing for more details:
https://docs.google.com/document/d/1ZyC26yOCknrrcYa839ZWLxD6o6Gig5A3lVTh4E41074/edit?usp=sharing

Instead of "bool AdaptDown()" when high QP is reported,
synchronously returning true or false depending on the result of
adaptation, this CL introduces
  void QualityScalerQpUsageHandlerInterface::OnReportQpUsageHigh(
      rtc::scoped_refptr<QualityScalerQpUsageHandlerCallback>);
Where
  QualityScalerQpUsageHandlerCallback::OnQpUsageHandled(
      bool clear_qp_samples);
Instructs the QualityScaler whether to clear samples before
checking QP the next time or to increase the frequency of checking
(corresponding to AdaptDown's return value prior to this CL).

QualityScaler no longer using AdaptationObserverInterface, this class
is renamed and moved to overuse_frame_detector.h.

The dependency between CheckQpTasks is made explicit with
CheckQpTask::Result and variables like observed_enough_frames_,
adapt_called_ and adapt_failed_ are moved there and given more
descriptive names.

Bug: webrtc:11521
Change-Id: I7faf795aeee5ded18ce75eb1617f88226e337228
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173760
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31140}
2020-04-28 09:00:15 +00:00
Ilya Nikolaevskiy
1fb4a05e9e Reland "Launch external ref control for vp9 encoder"
This reverts commit 9665b7d101.

Reason for revert: Fixes are in the PS#2

Original change's description:
> Revert "Launch external ref control for vp9 encoder"
> 
> This reverts commit 9427b51d6f.
> 
> Reason for revert: Breaks downstream tests
> 
> Original change's description:
> > Launch external ref control for vp9 encoder
> > 
> > Change field trial condition to killswitch instead.
> > 
> > Finch trial is going to 100% public today.
> > 
> > Bug: chromium:1027108,webrtc:11319
> > Change-Id: I29494a7c8515a454706983dd15ae444d3f85271f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173752
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31122}
> 
> TBR=ilnik@webrtc.org,ssilkin@webrtc.org
> 
> Change-Id: I44436febb2b646cdd350fa9afee1c3a7ea307d04
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:1027108, webrtc:11319
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173761
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31123}

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

Change-Id: I8aed0edca2015297da512aa084515812103c6f48
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1027108, webrtc:11319
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173780
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31125}
2020-04-23 13:21:45 +00:00
Ilya Nikolaevskiy
9665b7d101 Revert "Launch external ref control for vp9 encoder"
This reverts commit 9427b51d6f.

Reason for revert: Breaks downstream tests

Original change's description:
> Launch external ref control for vp9 encoder
> 
> Change field trial condition to killswitch instead.
> 
> Finch trial is going to 100% public today.
> 
> Bug: chromium:1027108,webrtc:11319
> Change-Id: I29494a7c8515a454706983dd15ae444d3f85271f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173752
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31122}

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

Change-Id: I44436febb2b646cdd350fa9afee1c3a7ea307d04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1027108, webrtc:11319
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173761
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31123}
2020-04-23 09:25:19 +00:00
Ilya Nikolaevskiy
9427b51d6f Launch external ref control for vp9 encoder
Change field trial condition to killswitch instead.

Finch trial is going to 100% public today.

Bug: chromium:1027108,webrtc:11319
Change-Id: I29494a7c8515a454706983dd15ae444d3f85271f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173752
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31122}
2020-04-23 09:03:06 +00:00
Ilya Nikolaevskiy
9ce77fda75 Remove redundant Dcheck in vp9 decoder
Bug: chromium:1070146
Change-Id: Ia4a07cfd16c154e2be3478c020c01fbcaf1c5bb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173743
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31119}
2020-04-22 09:06:26 +00:00
philipel
00032698ac Clean up old GoPs when the RTP sequence number jump.
Bug: chromium:1065699
Change-Id: I2ed853559858ef82c6eb03b366cd77e8b3b0e799
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173703
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31102}
2020-04-17 14:33:45 +00:00
Mirko Bonadei
6415dcad7a Remove WebRTC-ExperimentalScreenshareSettings.
This field trial is unused.

Bug: webrtc:11503
Change-Id: Id79b0dc64fed3559b9b63ebcf539e5536ddad589
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173339
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31090}
2020-04-16 18:15:08 +00:00
Evan Shrubsole
ce0a11d5f9 Unify AdaptationReason and AdaptReason enums.
Moves the unified AdaptationReason to the api/ folder.

Bug: webrtc:11392
Change-Id: I28782e82ef6cc3ca3b061f65b0bbdc3766df1f9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172583
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31084}
2020-04-16 13:33:49 +00:00
Ilya Nikolaevskiy
39fb817efd [Video, Svc] Remove inactive spatial layers in codec initializer
This is more logical way to remove inactive lower layers.
Current way is to notify the encoder that the layer is inactive,
then renumber layers at the packatization level.

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

Bug: webrtc:11319
Change-Id: Idf0bb30b729f5ecc97e31454b32934546b681aa2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173182
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31058}
2020-04-14 09:37:44 +00:00
Tommi
eb03d286df Remove seemingly unused timer
Bug: none
Change-Id: I47cb2a22e6d62e0bfd094fc6246a27b48286b33d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172801
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30995}
2020-04-03 11:17:02 +00:00
Danil Chapovalov
5179469f4b Delete deprecated RtpFrameObject constructor
Bug: None
Change-Id: Ifd496d6681004f3afff43628bda2d4b888aef958
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172620
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30974}
2020-04-02 10:50:57 +00:00
Johannes Kron
3e98368ec5 Reland "Distinguish between send and receive codecs"
This reverts commit 8e8b36a94a.

Reason for revert: The CL has been improved with the following changes,
  - Fixed negotiation of send/receive only clients.
  - Handles the implicit assumption that any H264 decoder also can
    decode H264 constraint baseline.

Original change's description:
> Distinguish between send and receive codecs
>
> Even though send and receive codecs may be the same, they might have
> different support in HW. Distinguish between send and receive codecs
> to be able to keep track of which codecs have HW support.
>
> Bug: chromium:1029737
> Change-Id: Id119560becadfe0aaf861c892a6485f1c2eb378d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165763
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30284}

Change-Id: I834ed48ee78d04922c73e2836165e476925e1cc5
Bug: chromium:1029737
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168605
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30932}
2020-03-29 21:03:27 +00:00
Erik Språng
c8fbd899bd Fixes temporal rate allocation issues.
This CL fixes a few issues where the reported fraction of frames
allocated to various temporal layers could be incorrect:
* In LibvpxVp8Encoder, calling GetEncoderInfo() while not initialized,
  or when first configuring with temporal layers and then without,
  could trigger incorrect fps allocations.
* In VP9 when different spatial layers have different max framerates,
  the layer fps should be compared to the layer with the highest
  configured fps, not codec_.maxFramerate which is updated to the
  current input fps on SetRates().
* In EncoderBitrateAdjuster, just warn and ignore if a layer has
  non-zero bps but zero fps, rather than passing down the chain and
  risk weird behavior or divide by zero.

Bug: b/152040235
Change-Id: I548fb3e099b1ec9f536a7b93313fb40c4d32e596
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171516
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30880}
2020-03-25 11:20:47 +00:00
Rasmus Brandt
52dd621a92 libvpx-vp8: Add external configurability of resolution/bitrate limits.
Bug: webrtc:11436
Change-Id: Iae34caf579e0931344c1b8706c7e561a5410c170
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171112
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30870}
2020-03-24 13:32:59 +00:00
Danil Chapovalov
a4c4425748 Restore setting encoder speed for AV1 encoder wrapper
Also add simple unittests for the wrapper.

Bug: webrtc:11404
Change-Id: I41d185da9bce392297d1982194c059bddb7881ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171481
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30867}
2020-03-24 12:34:27 +00:00
Ilya Nikolaevskiy
8d1f72852e [VP9 decoder] react to incorrect pixel format in the bitstream
Bug: chromium:1063490
Change-Id: Ibac3b43b42c1b088b6ac94ae327f23b11d3fd259
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171225
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30855}
2020-03-23 11:29:08 +00:00
Danil Chapovalov
f4306ebfea In PacketBuffer simplify stored buffer.
Bug: None
Change-Id: Iddcde9d2ab25d2fb7091c9ed8104138293fd9dee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168044
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30844}
2020-03-20 13:32:32 +00:00
Danil Chapovalov
976cc1ae19 Add AV1 encoder wrapper
Bug: webrtc:11404
Change-Id: Ibd5ded873c397bb91675a7e29591edab3c41f182
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170360
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30842}
2020-03-20 12:20:06 +00:00
Rasmus Brandt
2e6bd28381 libvpx-vp8: Add settings struct to constructor.
Migrate the injectable Vp8FrameBufferControllerFactory
into a settings struct, allowing for straight-forward
future extensions.

Bug: webrtc:11436
Change-Id: I53e555eb6ef88cf5b10ee8a43abd6ef9c930d100
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170635
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30839}
2020-03-20 11:35:46 +00:00
Rasmus Brandt
9ce14e8c50 libvpx-vp8: Migrate to default member initializations.
Bug: webrtc:11436
Change-Id: I9c7751e63efc51f2bdc3490e014c36e6b35b4b54
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170634
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30835}
2020-03-19 16:43:25 +00:00
philipel
45cb8f65ba Drop duplicate VP8 frames in the RtpFrameReferenceFinder.
Bug: webrtc:11431
Change-Id: Ib74c05e7cf12b9a3f60423a268a5d459407fd00b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171060
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30834}
2020-03-19 16:39:24 +00:00
Danil Chapovalov
810b4ca386 Move AssembleFrame from PacketBuffer to RtpVideoStreamReceiver
this is a step towards resolving own todo: making AssembleFrame part of
the VideoRtpDepacketizer interface and replacing codec check with a
call to a virtual function.
RtpVideoStreamReceiver has access to the VideoRtpDepacketizers,
PacketBuffer - hasn't.

Bug: None
Change-Id: I83df09975c092bdb71bab270ced356d79a50683d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168056
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30833}
2020-03-19 16:35:14 +00:00
Danil Chapovalov
560e87aa81 Reenable libaom decoder by default
Bug: webrtc:11404
Change-Id: I165ce3b88d35b58b3f878246c77ab48c36cc9ddc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170636
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30823}
2020-03-18 18:04:41 +00:00
Danil Chapovalov
95e01a220b Overwrite dti for vp8 screenshare forced key frame
Bug: webrtc:11433
Change-Id: Ie04bdf9d1e3a835a3f9625ae71918bb33b334b07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170629
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30809}
2020-03-17 12:03:03 +00:00
Danil Chapovalov
c46385c346 Add Av1 Decoder wrapper behind a build flag
Bug: webrtc:11404
Change-Id: I090ffd173d667e8845de1b986af462516b7c76e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169452
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30757}
2020-03-11 11:20:56 +00:00
Minyue Li
21bccae341 Add NtpTimeMs as a method in EncodedImage.
Bug: b/151082828
Change-Id: Idaa6848f952f9cc9458899680d19ddf338a3ace1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170044
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30729}
2020-03-09 17:00:09 +00:00
Jerome Jiang
c93abcb341 VP9 test: change threshold to allow resizing for twice
Recent change in libvpx allows a second resize for low resolution.

Bug: None
Change-Id: I45a7ce376b274778b2fa183346de1993ef43bde7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169941
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30719}
2020-03-09 09:56:05 +00:00
Niels Möller
d3da6b05c1 Move EventWrapper class to target video_coding_legacy.
And remove some unneeded logic for WEBRTC_EVENT_INFINITE.

Bug: webrtc:3380
Change-Id: Ibf632493edc6ced1609bd9ced44c2020fe9878cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169846
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30700}
2020-03-06 08:39:35 +00:00
Danil Chapovalov
bb701b7b46 Fix dependency templates for VP8 3 temporal layers
Bug: None
Change-Id: I3c34fb949ba73c32cd36375aa5b96eeb1c11fc42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169730
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30692}
2020-03-05 14:49:05 +00:00
Ilya Nikolaevskiy
24dbb21383 Enable quality scaler for simulcast and SVC if only one stream is active
Also, make sure active flags are not lost in simulcast encoder adapter
which is needed in case of simulcast encoder adapter is used.

VP9 libvpx encoder currently ignores scaling setting for SVC, but libvpx
fix is incoming.

TESTED=On a manually patched chrome with singlecast-simulcast vp8 stream.

Bug: webrtc:11396
Change-Id: Ic81f014bec1bdaaf6d5d173743933e5d77d71ea2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169547
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30681}
2020-03-04 15:22:00 +00:00
Ilya Nikolaevskiy
ae92244054 Clean VP8 header parser
The old implementation has undefined behavior in it (unaligned read of uint32_t)
Now it's closer to the reference implementation:
https://tools.ietf.org/html/rfc6386#section-20.2

Also, added some comments and named some variables to make it more clear, that the
parser actually does.

Bug: chromium:1057551
Change-Id: I84c1912867e2794502e8a63302c938a0cbab2c4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169545
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30661}
2020-03-02 15:05:48 +00:00
Guido Urdaneta
c8958e5a4f Add RTC_EXPORT to VCMEncodedFrame
This is needed to be able to use webrtc::video_coding::EncodedFrame
is unit tests in Chromium.

TBR=tommi@webrtc.org

Bug: webrtc:11380
Change-Id: Idb3b0ab667a548f5a968e02a8efd91f02585c3f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169451
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30651}
2020-02-28 16:59:10 +00:00
Danil Chapovalov
2c35da4c00 In Vp8 temporal layering fix generic info at non-first key frame
Bug: b/149907566
Change-Id: I5df5dea1680e95f15c38240df98f4acc3b5daf8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168954
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30601}
2020-02-25 10:47:49 +00:00
Jerome Jiang
4a06666325 Only set vp9 config when it's changed.
~3-5% speed up on webrtc_perf_tests of vp9 on linux desktop.

Avoid going thru a lot of unnecessary code checks.

Change-Id: I2cb0d794bcf239c5057dfc04cd07a496f89a5016
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167640
Commit-Queue: Jerome Jiang <jianj@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30586}
2020-02-21 20:09:31 +00:00
Ilya Nikolaevskiy
1dea1ea412 [VP9 encoder] Set temporal id also on disabled spatial layers
Bug: chromium:1051476
Change-Id: Iaf2b6ab6640cd314a620dbdf1547d8f1b2f40693
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168921
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30581}
2020-02-21 12:03:09 +00:00