When estimating that we can send more than the codec max bitrate (under
the assumption that codec max bitrate is good enough for the quality),
we should use additional bitrate so that we can maintain good quality.
Global bitrate caps should still be enforced through bitrate caps (b=AS)
and not codec max bitrates.
BUG=webrtc:5102
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1428473002
Cr-Commit-Position: refs/heads/master@{#10457}
- "WebRTC.Video.BandwidthLimitedResolutionInPercent"
If the frame is bandwidth limited, the average number of disabled resolutions is logged:
- "WebRTC.Video.BandwidthLimitedResolutionsDisabled"
BUG=
Review URL: https://codereview.webrtc.org/1311533012
Cr-Commit-Position: refs/heads/master@{#10333}
- "WebRTC.Video.QualityLimitedResolutionInPercent"
and if a frame is downscaled, the average number of times the frame is downscaled:
- "WebRTC.Video.QualityLimitedResolutionDownscales"
BUG=
Review URL: https://codereview.webrtc.org/1325153009
Cr-Commit-Position: refs/heads/master@{#10319}
Implements SupportsNativeHandle() in SimulcastEncoderAdapter which works
when there's only a single encoder.
BUG=webrtc:5060
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1397653004
Cr-Commit-Position: refs/heads/master@{#10291}
Encoders need to be externally provided. To use software encoders they
need to be created and registered from the outside.
BUG=webrtc:1695
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1394823002 .
Cr-Commit-Position: refs/heads/master@{#10283}
Reason for revert:
Temporarily reverting as this causes some issues with perf tests. Especially tests with packet loss no longer works.
Original issue's description:
> Adding support for simulcast and spatial layers into VideoQualityTest
>
> The CL includes several changes:
> - Adding flags describing the streams and spatial layers.
> - Reorganizing the order of the flags, to make them easier to maintain.
> - Adding a member .params_ to VideoQualityAnalyzer.
> (instead of passing it to every member function manually)
> - Updating VideoAnalyzer to support simulcast.
> (select appropriate ssrc and fix timestamps which are sometimes increased by 1)
> - VP9EncoderImpl already had code for automatic calculation of bitrate for each layer.
> Changing to first read bitrates and resolution ratios from the flags, if specified.
> If not specified, reverting to the old code are setting the values automatically.
> - Changing the parameters in LayerFilteringTransport, replacing
> xx_discard_thresholds with selected_xx, to make it easier to use for the end user.
>
> Committed: https://crrev.com/87f83a9a27d657731ccb54025bc04ccad0da136e
> Cr-Commit-Position: refs/heads/master@{#10215}
TBR=pbos@webrtc.org,mflodman@webrtc.org,ivica@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.webrtc.org/1397363002
Cr-Commit-Position: refs/heads/master@{#10252}
The CL includes several changes:
- Adding flags describing the streams and spatial layers.
- Reorganizing the order of the flags, to make them easier to maintain.
- Adding a member .params_ to VideoQualityAnalyzer.
(instead of passing it to every member function manually)
- Updating VideoAnalyzer to support simulcast.
(select appropriate ssrc and fix timestamps which are sometimes increased by 1)
- VP9EncoderImpl already had code for automatic calculation of bitrate for each layer.
Changing to first read bitrates and resolution ratios from the flags, if specified.
If not specified, reverting to the old code are setting the values automatically.
- Changing the parameters in LayerFilteringTransport, replacing
xx_discard_thresholds with selected_xx, to make it easier to use for the end user.
Review URL: https://codereview.webrtc.org/1353263005
Cr-Commit-Position: refs/heads/master@{#10215}
In video_sender.cc, properly read the number of temporal layers for VP9 too.
Also, some cleanup in video_loopback.cc and video_quality_test.h.
Review URL: https://codereview.webrtc.org/1351693005
Cr-Commit-Position: refs/heads/master@{#10201}
Since padding is no longer sent on Encoded() callbacks, dummy callbacks
aren't required to generate padding. This skip-frame behavior can then
be removed to get rid of dummy callbacks though nothing was encoded. As
frames don't have to be generated for frames that don't have to be sent
we skip encoding frames that aren't intended to be sent either, reducing
CPU load.
BUG=
R=mflodman@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1369923005 .
Cr-Commit-Position: refs/heads/master@{#10181}
This CL changes the threshold where we consider a block to be static and
of sufficient quality to not spend bits/CPU encoding it.
Perf note: This change may result in a minor degradation of PSNR/SSIM
and available send bitrate. CPU usage and bitrate sent should however
be greately reduced.
BUG=webrtc:5015
Review URL: https://codereview.webrtc.org/1383533002
Cr-Commit-Position: refs/heads/master@{#10134}
Our perf test suite webrtc_perf_tests timed out, which caused most
of the delay landing this (https://crbug.comn/535973 and
https://codereview.chromium.org/1370133004).
Other problems with executing Android tests also needed to be
resolved in order to land this (http://crbug.com/534849).
Libvpx has moved from third_party/libvpx to third_party/libvpx_new
as of https://codereview.chromium.org/1323333002/
Android GN was blocking this roll due to a problem that ended up
being caused by a bug (http://crbug.com/534849).
Relevant changes:
* src/buildtools: f7310ee..8d89c1b
* src/third_party/boringssl/src: 1d128f3..4c60d35
* src/third_party/icu: 6b3ce81..423fc7e
* src/third_party/libjpeg_turbo: 631e2dd..e4e7503
* src/third_party/libvpx: ac1772e..70db223
* src/third_party/libyuv: fcacbfb..62c49dc
* src/tools/gyp: 5d01a8c..01528c7
* src/tools/swarming_client: 77f720b..6e5d2b2
Details: 310ea93..8cf53d6/DEPS
Clang version changed 245965:247874
Details: 310ea93..8cf53d6/tools/clang/scripts/update.sh
BUG=481034, 535973
TBR=marpan@webrtc.org
Review URL: https://codereview.webrtc.org/1355083002
Cr-Commit-Position: refs/heads/master@{#10101}
Fixes code formatting and uses size_t properly. Also makes use of
IsNewerTimestamp instead of a simple > check, which should fix an
edge-case bug.
BUG=
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1358863002
Cr-Commit-Position: refs/heads/master@{#10094}
Android hardware H.264 seems to keep a steady high-QP flow instead of
dropping frames, so framedrops aren't sufficient to detect a bad state
where downscaling would be beneficial.
BUG=webrtc:4968
R=magjed@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1364253002 .
Cr-Commit-Position: refs/heads/master@{#10078}
Starts by removing channel/engine id from ViEChannel which propagates
down to the RTP/RTCP module as well as the transport class.
IncomingVideoStream::RenderFrame() is untouched for now but receives a
fake id instead of the previous channel id. Added a TODO to remove it
later but the RenderFrame call is implemented in a lot of
platform-dependent files and should probably remove the "manager" aspect
of renderers, so preferring to do it separately
BUG=webrtc:1695
R=henrika@webrtc.org, mflodman@webrtc.org
Review URL: https://codereview.webrtc.org/1335353005 .
Cr-Commit-Position: refs/heads/master@{#9978}
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.
Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.
BUG=chromium:468375
NOTRY=true
Review URL: https://codereview.webrtc.org/1335923002
Cr-Commit-Position: refs/heads/master@{#9964}
Part of work removing dependency on Chromium's base.
Only adds "= delete". From https://codereview.chromium.org/1151443003 :
"This will guarantee the error to be at compile time, and not rely on the call visibility (private)."
In consequence of that change, fixed an illegal copy and removed a bunch of unused variables.
Depends on https://codereview.webrtc.org/1345433002/
BUG=chromium:468375
(in particular comment #37)
NOTRY=true
Review URL: https://codereview.webrtc.org/1342543004
Cr-Commit-Position: refs/heads/master@{#9954}
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.
* DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN
* DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN
* DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS
Related CL: https://codereview.webrtc.org/1335923002/
BUG=chromium:468375
NOTRY=true
Review URL: https://codereview.webrtc.org/1345433002
Cr-Commit-Position: refs/heads/master@{#9953}
Part of work removing dependency on Chromium's base.
Only adds "= delete". From https://codereview.chromium.org/1151443003 :
"This will guarantee the error to be at compile time, and not rely on the call visibility (private)."
In consequence of that change, fixed an illegal copy and removed a bunch of unused variables.
BUG=chromium:468375 (in particular comment #37)
NOTRY=true
Review URL: https://codereview.webrtc.org/1316363005
Cr-Commit-Position: refs/heads/master@{#9913}
Handling the case when encoder drops only the higher layer.
Added options to screenshare loopback test to discard high temporal or spatial layers (to view the lower layers).
Review URL: https://codereview.webrtc.org/1287643002
Cr-Commit-Position: refs/heads/master@{#9883}
Telling the encoder to adjust the parameters for the screen content.
Also, telling the encoder to skip the encoding of very flat/low content blocks. For now only for screensharing. (number 8 in VP8E_SET_STATIC_THRESHOLD is correct)
Review URL: https://codereview.webrtc.org/1308753006
Cr-Commit-Position: refs/heads/master@{#9860}
VideoFrameBuffer currently has two overloaded data() functions for pixel access, one for const and one for non-const. Unfortunately, it will default to the non-const version, even when 'const scoped_refptr<VideoFrameBuffer>&' is used. This is a problem, because many subclasses use RTC_NOTREACHED() in the non-const version.
This CL makes the non-const version of data() explicit with a different, longer function name MutableData().
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1304143003 .
Cr-Commit-Position: refs/heads/master@{#9787}
The primary fix in this CL is to remove the dangling |thread_| pointer in AndroidVideoCapturerJni. That thread is not safe to use after Stop() has been called. Even after Stop() has been called, we must still be able to return late frames to Java in order to not leak them, so that path has been made thread safe instead. To make sure that we always return frames, the Java frame should be wrapped in a scoped_refptr as quickly as possible, so this CL moves the wrapping from AndroidVideoCapturer to AndroidVideoCapturerJni. This also removes the need for the interface function AndroidVideoCapturerDelegate::ReturnBuffer().
Some other minor changes are:
* Remove |valid_global_refs_| and all logic related to that. Now that rtc::Bind() captures method objects as scoped_refptr, the destructor of AndroidVideoCapturerJni will not be called before all frames are returned.
* Remove global ref |j_frame_observer_|. No need for this, we don’t call it and it is kept alive with standard Java memory management.
* Add helper function ShallowCenterCrop() for VideoFrameBuffers. This functionality already exists in the constructor of WrappedI420Buffer, but it’s more convenient to have it as a separate function.
BUG=webrtc:4742,webrtc:4909
R=glaznev@webrtc.org, tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1307973002 .
Cr-Commit-Position: refs/heads/master@{#9784}
Especially the VP9 codec currently may overshoot bitrate target at sudden picture changes, resulting in frames over 800 packets.
This limit should be reduced again once the codec behaves.
BUG=webrtc:4889
Review URL: https://codereview.webrtc.org/1266353003
Cr-Commit-Position: refs/heads/master@{#9675}