Commit Graph

513 Commits

Author SHA1 Message Date
7367463acc Utilize bitrate above codec max to protect video.
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}
2015-10-29 22:45:04 +00:00
315dce7ac1 Enable VP9 internal resize by default.
R=stefan@webrtc.org
TBR=stefan@webrtc.org
BUG=

Review URL: https://codereview.webrtc.org/1425733003 .

Cr-Commit-Position: refs/heads/master@{#10456}
2015-10-29 18:16:06 +00:00
4f5db11e45 Make VCMEncodedFrameCallback const.
Skips nullptr check.

BUG=
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1424843002 .

Cr-Commit-Position: refs/heads/master@{#10454}
2015-10-29 15:54:08 +00:00
69ccb33131 Remove redudant encoder rate calls.
Moves EncoderParameters update checks into GenericEncoder before calling
SetRates/SetChannelParameters as applicable.

Also removes CodecConfigParameters as a bonus.

BUG=
R=stefan@webrtc.org
TBR=mflodman@webrtc.org

Review URL: https://codereview.webrtc.org/1426953003 .

Cr-Commit-Position: refs/heads/master@{#10452}
2015-10-29 15:30:29 +00:00
98f53510b2 system_wrappers: rename interface -> include
BUG=webrtc:5095
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1413333002 .

Cr-Commit-Position: refs/heads/master@{#10438}
2015-10-28 17:17:50 +00:00
09b38f3ca0 Re-enable VP9 resize test.
TBR=stefan@webrtc.org
BUG=webrtc:5097

Review URL: https://codereview.webrtc.org/1409143005 .

Cr-Commit-Position: refs/heads/master@{#10409}
2015-10-26 15:22:41 +00:00
49e196af40 Remove VideoFrameType aliases for FrameType.
No longer used in Chromium, so these can now be removed.

BUG=webrtc:5042
R=mflodman@webrtc.org
TBR=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/1415693002 .

Cr-Commit-Position: refs/heads/master@{#10390}
2015-10-23 13:58:27 +00:00
9a4cd87640 Add support for handling reordered SS data on the receive-side for VP9.
BUG=chromium:500602

Review URL: https://codereview.webrtc.org/1386903002

Cr-Commit-Position: refs/heads/master@{#10383}
2015-10-23 07:27:22 +00:00
a74c08dced Move i420 files to the right location
There's also a presubmit check that disallows .. references
in GYP files, which this solves.

BUG=webrtc:5095
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1418753002 .

Cr-Commit-Position: refs/heads/master@{#10371}
2015-10-22 10:23:21 +00:00
86b016027d Add stats for average QP per frame for VP8 (for received video streams):
"WebRTC.Video.Decoded.VP8.Qp"

BUG=chromium:512752

Review URL: https://codereview.webrtc.org/1340623002

Cr-Commit-Position: refs/heads/master@{#10349}
2015-10-21 06:55:32 +00:00
fcab1cdcac Disable VP9 resize test for now.
Will re-enable after libvpx roll,
needs to be updated.

TBR=stefan@webrtc.org
BUG=webrtc:5097

Review URL: https://codereview.webrtc.org/1417873002 .

Cr-Commit-Position: refs/heads/master@{#10347}
2015-10-21 06:10:21 +00:00
e4f96501fc Remove system_wrappers/interface/trace_event.h
BUG=

Review URL: https://codereview.webrtc.org/1417773002

Cr-Commit-Position: refs/heads/master@{#10346}
2015-10-21 06:00:57 +00:00
3cf20ed676 Will re-enable after libvpx roll,
needs to be updated.

BUG=

TBR=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1410013005 .

Cr-Commit-Position: refs/heads/master@{#10345}
2015-10-21 03:27:47 +00:00
da535c4055 Add histogram for percentage of sent frames that are limited in resolution due to bandwidth:
- "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}
2015-10-20 06:32:48 +00:00
22993e1a0c Unify FrameType and VideoFrameType.
Prevents some heap allocation and frame-type conversion since interfaces
mismatch. Also it's less confusing to have one type for this.

BUG=webrtc:5042
R=magjed@webrtc.org, mflodman@webrtc.org, henrik.lundin@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1371043003

Cr-Commit-Position: refs/heads/master@{#10320}
2015-10-19 09:39:15 +00:00
4306fc70d7 Add histogram for percentage of sent frames that are limited in resolution due to quality:
- "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}
2015-10-19 07:35:27 +00:00
65e15bafaa Add native-handle support for single VP8 streams.
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}
2015-10-15 17:52:21 +00:00
ab73d13c4b Remove internal encoders from VCMCodecDatabase.
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}
2015-10-15 10:01:48 +00:00
7a975f75e7 Revert of Adding support for simulcast and spatial layers into VideoQualityTest (patchset #10 id:180001 of https://codereview.webrtc.org/1353263005/ )
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}
2015-10-12 13:33:24 +00:00
e7f6b565e4 VP9: Enable multi-threading for SVC.
This was disabled due to issues with multi-threading
and spatial layers, but have since been fixed.

R=stefan@webrtc.org
TBR=mflodman@webrtc.org, stefan@webrtc.org
BUG=

Review URL: https://codereview.webrtc.org/1390353003 .

Cr-Commit-Position: refs/heads/master@{#10229}
2015-10-08 20:57:15 +00:00
87f83a9a27 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.

Review URL: https://codereview.webrtc.org/1353263005

Cr-Commit-Position: refs/heads/master@{#10215}
2015-10-08 12:13:37 +00:00
c7199c2d0b Read the number of TLs for VP9 too + cleanup
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}
2015-10-07 13:43:43 +00:00
0c4e06b4c6 Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.

BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org

Review URL: https://codereview.webrtc.org/1362503003 .

Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 10:23:32 +00:00
5d0379da2c Remove kSkipFrame usage.
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}
2015-10-06 12:05:03 +00:00
dec5ebf106 Move sent key frame stats to send_statistics_proxy class.
BUG=

Review URL: https://codereview.webrtc.org/1374673003

Cr-Commit-Position: refs/heads/master@{#10166}
2015-10-05 09:36:20 +00:00
fb30c1b5d1 Update VP8 settings to avoid spending bitrate on static areas. PERF NOTE
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}
2015-10-01 13:26:16 +00:00
d6024e3c34 Roll chromium_revision 310ea93..8cf53d6 (349094:351112)
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}
2015-09-29 04:16:53 +00:00
1968d3f357 Simplify VCMTimestampMap.
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}
2015-09-28 15:55:52 +00:00
1741770742 Implement a high-QP threshold for Android H.264.
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}
2015-09-25 15:03:37 +00:00
ac547a6538 Remove channel ids from various interfaces.
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}
2015-09-17 21:06:02 +00:00
1d5198d5d2 Fix parameter in VP9 resize test.
TBR=stefan@webrtc.org
BUG=

Review URL: https://codereview.webrtc.org/1352953002 .

Cr-Commit-Position: refs/heads/master@{#9977}
2015-09-17 19:36:59 +00:00
f35072019b VP9: Add automaticeResize to codec setting.
Added unittest.
This setting allows for dynamic resizing at low bitrates.
Setting is off by default for now.

BUG=
R=mflodman@webrtc.org, stefan@webrtc.org
TBR=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1323943007 .

Cr-Commit-Position: refs/heads/master@{#9976}
2015-09-17 19:16:16 +00:00
91d6edef35 Add RTC_ prefix to (D)CHECKs and related macros.
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}
2015-09-17 07:24:51 +00:00
2520e7200e VP9: Enable static threshold for non-screen content.
Encoder control was currently on for screen-content mode,
use it also for normal video.

BUG=

TBR=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1351523005 .

Cr-Commit-Position: refs/heads/master@{#9958}
2015-09-16 21:05:12 +00:00
384194369b Consolidate constructormagic macros with Chromium version and remove Chromium override.
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}
2015-09-16 13:33:25 +00:00
3c089d751e Add RTC_ prefix to contructormagic macros.
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}
2015-09-16 12:37:52 +00:00
dcb8998821 Keep lock after updating encoder parameters.
Additionally adds some thread annotations.

BUG=
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1336023004 .

Cr-Commit-Position: refs/heads/master@{#9941}
2015-09-15 12:43:55 +00:00
9a78d22822 Revert of Consolidate constructormagic macros with Chromium version and remove Chromium override. (patchset #4 id:60001 of https://codereview.webrtc.org/1316363005/ )
Reason for revert:
Had to revert since FYI bots stopped compiling.  Example failure:

[94/9470] CXX obj\third_party\webrtc\modules\video_processing\main\source\video_processing_sse2.content_analysis_sse2.obj
FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\modules\video_coding\codecs\h264\webrtc_h264.h264.obj.rsp /c ..\..\third_party\webrtc\modules\video_coding\codecs\h264\h264.cc /Foobj\third_party\webrtc\modules\video_coding\codecs\h264\webrtc_h264.h264.obj /Fdobj\third_party\webrtc\modules\webrtc_h264.cc.pdb
e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated
e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition
        e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN'
FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\base\rtc_base_approved.bitbuffer.obj.rsp /c ..\..\third_party\webrtc\base\bitbuffer.cc /Foobj\third_party\webrtc\base\rtc_base_approved.bitbuffer.obj /Fdobj\third_party\webrtc\base\rtc_base_approved.cc.pdb
e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated
e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition
        e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN'
FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\modules\audio_processing\logging\audio_processing.aec_logging_file_handling.obj.rsp /c ..\..\third_party\webrtc\modules\audio_processing\logging\aec_logging_file_handling.cc /Foobj\third_party\webrtc\modules\audio_processing\logging\audio_processing.aec_logging_file_handling.obj /Fdobj\third_party\webrtc\modules\audio_processing.cc.pdb
e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated
e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition
        e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN'
FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\modules\audio_processing\beamformer\audio_processing.nonlinear_beamformer.obj.rsp /c ..\..\third_party\webrtc\modules\audio_processing\beamformer\nonlinear_beamformer.cc /Foobj\third_party\webrtc\modules\audio_processing\beamformer\audio_processing.nonlinear_beamformer.obj /Fdobj\third_party\webrtc\modules\audio_processing.cc.pdb
e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated
e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition
        e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN'

Original issue's description:
> Consolidate constructormagic macros with Chromium version and remove Chromium override.
>
> 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
>
> Committed: https://crrev.com/0de8ff488d92e0bc6b7b65662898ff5e955cda93
> Cr-Commit-Position: refs/heads/master@{#9913}

TBR=andrew@webrtc.org,henrikg@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:468375 (in particular comment #37)

Review URL: https://codereview.webrtc.org/1330283002

Cr-Commit-Position: refs/heads/master@{#9914}
2015-09-10 08:42:03 +00:00
0de8ff488d Consolidate constructormagic macros with Chromium version and remove Chromium override.
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}
2015-09-10 06:43:49 +00:00
7f6a6fc0b2 Enabling spatial layers in VP9Impl. Filter layers in the loopback test.
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}
2015-09-08 09:40:36 +00:00
110443c1ec Fix for frame resolution in encoded frame callback.
Scaled resolution for down scaled frames by the quality scaler is not used.

BUG=webrtc:4966
R=pbos@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1317463005 .

Cr-Commit-Position: refs/heads/master@{#9873}
2015-09-07 13:04:00 +00:00
242d6384c4 VP9 codec controls for screensharing
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}
2015-09-04 13:13:29 +00:00
7fabd46a89 Don't set V bit in flexible mode
BUG=webrtc:4914

Review URL: https://codereview.webrtc.org/1291163007

Cr-Commit-Position: refs/heads/master@{#9848}
2015-09-03 11:42:37 +00:00
f42376c601 Wire up currently-received video codec to stats.
BUG=webrtc:1844, webrtc:4808
R=mflodman@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1315413002

Cr-Commit-Position: refs/heads/master@{#9810}
2015-08-28 14:35:40 +00:00
3318f984cd VideoFrameBuffer: Make non-const data access explicit
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}
2015-08-26 14:06:30 +00:00
c464f504dc AndroidVideoCapturerJni: Fix threading issues
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}
2015-08-25 21:22:24 +00:00
ef7228cfa0 Selectable number of TL screenshare loopback test. Also contains some tweaks to make a single TL perform better.
BUG=

Review URL: https://codereview.webrtc.org/1242043002

Cr-Commit-Position: refs/heads/master@{#9676}
2015-08-05 09:02:09 +00:00
907dcfd0e1 Increase packet limit in jitter buffer.
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}
2015-08-05 08:09:15 +00:00
a9455ab235 Integration of VP9 packetization.
Supports running 1 spatial and 1-3 temporal layers in non-flexible mode.

BUG=webrtc:4148, webrtc:4168, chromium:500602
TBR=mflodman

Review URL: https://codereview.webrtc.org/1211353002

Cr-Commit-Position: refs/heads/master@{#9665}
2015-07-31 13:10:16 +00:00
f1828e8ed9 Prevent OOB reads for truncated H264 STAP-A packets.
BUG=webrtc:4771, webrtc:4834
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1238033003

Cr-Commit-Position: refs/heads/master@{#9650}
2015-07-28 15:21:07 +00:00