Commit Graph

412 Commits

Author SHA1 Message Date
876222f77d Move usage of QualityScaler to ViEEncoder.
This brings QualityScaler much more in line with OveruseFrameDetector.
The two classes are conceptually similar, and should be used in the
same way. The biggest changes in this CL are:
- Quality scaling is now only done in ViEEncoder and not in each
  encoder implementation separately.
- QualityScaler now checks the average QP asynchronously, instead of
  having to be polled on each frame.
- QualityScaler is no longer responsible for actually scaling the frames,
  but has a callback to ViEEncoder that it uses to express it's desire
  for lower resolution.

BUG=webrtc:6495

Review-Url: https://codereview.webrtc.org/2398963003
Cr-Commit-Position: refs/heads/master@{#15286}
2016-11-29 09:44:22 +00:00
352444fcac RTC_[D]CHECK_op: Remove superfluous casts
There's no longer any need to make the two arguments have the same
signedness, so we can remove a bunch of superfluous (and sometimes
dangerous) casts.

It turned out I also had to fix the safe_cmp functions to properly handle
enums that are implicitly convertible to integers.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2534683002
Cr-Commit-Position: refs/heads/master@{#15281}
2016-11-28 23:59:03 +00:00
af476c737f RTC_[D]CHECK_op: Remove "u" suffix on integer constants
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
2016-11-28 23:21:51 +00:00
1bc3146e08 Disable more VideoProcessorIntegrationTest tests on Linux 32-bit
The previously disabled tests on TSan and UBSan are also failing on
Linux 32-bit.

BUG=webrtc:6781
R=ehmaldonado@webrtc.org
TBR=deadbeef@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#15276}
2016-11-28 18:34:43 +00:00
ceecea4559 Pass selected cricket::VideoCodec down to internal H264 encoder
Pass the selected cricket::VideoCodec to H264EncoderImpl::H264EncoderImpl. The cricket::VideoCodec contains relevant information for H264 about selected profile and packetization mode.

BUG=chromium:600254,webrtc:6402, webrtc:6337

Review-Url: https://codereview.webrtc.org/2474993002
Cr-Commit-Position: refs/heads/master@{#15270}
2016-11-28 15:20:26 +00:00
847f6897f2 Roll chromium_revision 5e821a778b..5c22c2afac (432715:434448)
Manual changes needed to use our own test runner for Android tests.
VideoProcessorIntegrationTest.ProcessNoLossChangeFrameRateFrameDropVP9
is failing for TSan and UBSan configs, so disable the test for them here.

Change log: 5e821a778b..5c22c2afac
Full diff: 5e821a778b..5c22c2afac

Changed dependencies:
* src/buildtools: 1f985091a5..991f459071
* src/third_party/android_tools: https://chromium.googlesource.com/android_tools.git/+log/c02a002b48..811a2c3f91
* src/third_party/catapult: 249cfbcd88..671a654736
* src/third_party/ffmpeg: 3c7a098821..d16162e3f4
* src/third_party/icu: 7ddf5e9ba1..dda089a98a
* src/third_party/libvpx/source/libvpx: 5c64c01c7c..d7f1d60c51
* src/third_party/openmax_dl: 57d33bee78..7acede9c03
DEPS diff: 5e821a778b..5c22c2afac/DEPS

Clang version changed 284979:287780
Details: 5e821a778b..5c22c2afac/tools/clang/scripts/update.py

TBR=marpan@webrtc.org, ehmaldonado@webrtc.org
BUG=webrtc:6775, webrtc:6739, webrtc:6781
NOTRY=True

Review-Url: https://codereview.webrtc.org/2533733002
Cr-Commit-Position: refs/heads/master@{#15256}
2016-11-28 10:04:45 +00:00
deb95f32f4 Change rtc::TimeNanos and rtc::TimeMicros return value from uint64_t to int64_t.
Also updated types close to call sites.

BUG=webrtc:6733

Review-Url: https://codereview.webrtc.org/2514553003
Cr-Commit-Position: refs/heads/master@{#15255}
2016-11-28 09:55:05 +00:00
c7805dbd0e Fix perf regression in screenshare temporal layer bitrate allocation
A recent cl (https://codereview.webrtc.org/2510583002) introduced an
issue where temporal layers may return incorrect bitrates, given that
they are stateful and that the GetPreferredBitrateBps is called.
The fix is to use a temporary simulcast rate allocator instance, without
temporal layers, and get the preferred bitrate from that.

Additionally, some regression in bitrate allocated stems from overly
often reconfiguring the encoder, which yields suboptimal rate control.
The fix here is to limit encoder updates to when values have actually
changed.

As a bonus, dchecks added by this cl found a bug in the (unused) RealtimeTemporalLayers implementation. Fixed that as well.

BUG=webrtc:6301, chromium:666654

Review-Url: https://codereview.webrtc.org/2529073003
Cr-Commit-Position: refs/heads/master@{#15250}
2016-11-25 16:09:51 +00:00
5f7226f8a3 Turn off error resilience for vp8 for no temporal layers if nack is enabled.
BUG=webrtc:6634

Review-Url: https://codereview.webrtc.org/2493893003
Cr-Commit-Position: refs/heads/master@{#15240}
2016-11-25 12:37:06 +00:00
10165ab8e7 Unify VideoCodecType to/from string functionality
BUG=None

Review-Url: https://codereview.webrtc.org/2509273002
Cr-Commit-Position: refs/heads/master@{#15200}
2016-11-22 18:17:04 +00:00
2d60e53ad5 H264 encoder: Include QP information in encoded images
Set the |qp_| field in EncodedImage before calling OnEncodedImage.

BUG=webrtc:6541

Review-Url: https://codereview.webrtc.org/2499003002
Cr-Commit-Position: refs/heads/master@{#15199}
2016-11-22 16:42:14 +00:00
b4af3d673a Remove all references to GYP
Remove all .gyp and .gypi files.
Remove entries from OWNERS files for *.isolate, *.gyp, *.gypi
Remove unused scripts in webrtc/build.

BUG=webrtc:6323
R=henrika@webrtc.org, phoglund@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#15107}
2016-11-16 19:11:38 +00:00
08127a9449 Reland #2 of Issue 2434073003: Extract bitrate allocation ...
This is yet another reland of https://codereview.webrtc.org/2434073003/
including two fixes:

1. SimulcastRateAllocator did not handle the screenshare settings properly for numSimulcastStreams = 1. Additional test case was added for that.
2. In VideoSender, when rate allocation is updated after setting a new VideoCodec config, only update the state of the EncoderParameters, but don't actually run SetRateAllocation on the encoder itself. This caused some problems upstreams.

Please review only the changes after patch set 1.

Original description:

Extract bitrate allocation of spatial/temporal layers out of codec impl.

This CL makes a number of intervowen changes:

* Add BitrateAllocation struct, that contains a codec independent view
  of how the target bitrate is distributed over spatial and temporal
  layers.

* Adds the BitrateAllocator interface, which takes a bitrate and frame
  rate and produces a BitrateAllocation.

* A default (non layered) implementation is added, and
  SimulcastRateAllocator is extended to fully handle VP8 allocation.
  This includes capturing TemporalLayer instances created by the
  encoder.

* ViEEncoder now owns both the bitrate allocator and the temporal layer
  factories for VP8. This allows allocation to happen fully outside of
  the encoder implementation.

This refactoring will make it possible for ViEEncoder to signal the
full picture of target bitrates to the RTCP module.

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

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

Cr-Commit-Position: refs/heads/master@{#15105}
2016-11-16 15:41:45 +00:00
fd5a20fd68 New jitter buffer experiment.
BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2480293002
Cr-Commit-Position: refs/heads/master@{#15077}
2016-11-15 08:58:06 +00:00
13ceeeadfc Revert of H.264 packetization mode 0 (try 2) (patchset #27 id:520001 of https://codereview.webrtc.org/2337453002/ )
Reason for revert:
Broke a lot of tests in chromium.webrtc browser_tests. See e.g. https://build.chromium.org/p/chromium.webrtc/builders/Mac%20Tester/builds/62228 and https://build.chromium.org/p/chromium.webrtc/builders/Win8%20Tester/builds/30102.
[ RUN      ] WebRtcVideoQualityBrowserTests/WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264/1
...
#
# Fatal error in e:\b\c\b\win_builder\src\third_party\webrtc\modules\rtp_rtcp\source\rtp_format_h264.cc, line 170
# last system error: 0
# Check failed: packetization_mode_ == kH264PacketizationMode1 (0 vs. 2)
#

Original issue's description:
> Implement H.264 packetization mode 0.
>
> This approach extends the H.264 specific information with
> a packetization mode enum.
>
> Status: Parameter is in code. No way to set it yet.
>
> Rebase of CL  2009213002
>
> BUG=600254
>
> Committed: https://crrev.com/3bba101f36483b8030a693dfbc93af736d1dba68
> Cr-Commit-Position: refs/heads/master@{#15032}

TBR=hbos@webrtc.org,sprang@webrtc.org,mflodman@webrtc.org,hta@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=600254
NOPRESUBMIT=true

Review-Url: https://codereview.webrtc.org/2500743002
Cr-Commit-Position: refs/heads/master@{#15050}
2016-11-12 16:54:50 +00:00
hta
3bba101f36 Implement H.264 packetization mode 0.
This approach extends the H.264 specific information with
a packetization mode enum.

Status: Parameter is in code. No way to set it yet.

Rebase of CL  2009213002

BUG=600254

Review-Url: https://codereview.webrtc.org/2337453002
Cr-Commit-Position: refs/heads/master@{#15032}
2016-11-11 05:50:05 +00:00
e3fe4a7c2d Update VideoFrameBuffer-related methods to not use references to scoped_refptr.
Chrome coding standard now discourages use of references to smart
pointers. This cl updates some recent methods to the new conventions.

BUG=webrtc:6672

Review-Url: https://codereview.webrtc.org/2477233004
Cr-Commit-Position: refs/heads/master@{#15028}
2016-11-10 16:44:47 +00:00
1369c83b42 Revert of Issue 2434073003: Extract bitrate allocation ... (patchset #4 id:60001 of https://codereview.webrtc.org/2488833004/ )
Reason for revert:
Seems to be causing flakiness in perf test:
FullStackTest.ScreenshareSlidesVP8_2TL_LossyNet

Original issue's description:
> Reland of Issue 2434073003: Extract bitrate allocation ...
>
> This is a reland of https://codereview.webrtc.org/2434073003/ including
> some fixes for failing test cases.
>
> Original description:
>
> Extract bitrate allocation of spatial/temporal layers out of codec impl.
>
> This CL makes a number of intervowen changes:
>
> * Add BitrateAllocation struct, that contains a codec independent view
>   of how the target bitrate is distributed over spatial and temporal
>   layers.
>
> * Adds the BitrateAllocator interface, which takes a bitrate and frame
>   rate and produces a BitrateAllocation.
>
> * A default (non layered) implementation is added, and
>   SimulcastRateAllocator is extended to fully handle VP8 allocation.
>   This includes capturing TemporalLayer instances created by the
>   encoder.
>
> * ViEEncoder now owns both the bitrate allocator and the temporal layer
>   factories for VP8. This allows allocation to happen fully outside of
>   the encoder implementation.
>
> This refactoring will make it possible for ViEEncoder to signal the
> full picture of target bitrates to the RTCP module.
>
> BUG=webrtc:6301
>
> Committed: https://crrev.com/647bf43dcb2fd16fccf276bd94dc4400728bb405
> Cr-Commit-Position: refs/heads/master@{#15023}

TBR=mflodman@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6301

Review-Url: https://codereview.webrtc.org/2491393002
Cr-Commit-Position: refs/heads/master@{#15026}
2016-11-10 16:30:39 +00:00
647bf43dcb Reland of Issue 2434073003: Extract bitrate allocation ...
This is a reland of https://codereview.webrtc.org/2434073003/ including
some fixes for failing test cases.

Original description:

Extract bitrate allocation of spatial/temporal layers out of codec impl.

This CL makes a number of intervowen changes:

* Add BitrateAllocation struct, that contains a codec independent view
  of how the target bitrate is distributed over spatial and temporal
  layers.

* Adds the BitrateAllocator interface, which takes a bitrate and frame
  rate and produces a BitrateAllocation.

* A default (non layered) implementation is added, and
  SimulcastRateAllocator is extended to fully handle VP8 allocation.
  This includes capturing TemporalLayer instances created by the
  encoder.

* ViEEncoder now owns both the bitrate allocator and the temporal layer
  factories for VP8. This allows allocation to happen fully outside of
  the encoder implementation.

This refactoring will make it possible for ViEEncoder to signal the
full picture of target bitrates to the RTCP module.

BUG=webrtc:6301

Review-Url: https://codereview.webrtc.org/2488833004
Cr-Commit-Position: refs/heads/master@{#15023}
2016-11-10 14:46:28 +00:00
4bc98d4e1b Revert of Extract bitrate allocation of spatial/temporal layers out of codec impl. (patchset #17 id:320001 of https://codereview.webrtc.org/2434073003/ )
Reason for revert:
Breaks perf tests.

Original issue's description:
> Extract bitrate allocation of spatial/temporal layers out of codec impl.
>
> This CL makes a number of intervowen changes:
>
> * Add BitrateAllocation struct, that contains a codec independent view
>   of how the target bitrate is distributed over spatial and temporal
>   layers.
>
> * Adds the BitrateAllocator interface, which takes a bitrate and frame
>   rate and produces a BitrateAllocation.
>
> * A default (non layered) implementation is added, and
>   SimulcastRateAllocator is extended to fully handle VP8 allocation.
>   This includes capturing TemporalLayer instances created by the
>   encoder.
>
> * ViEEncoder now owns both the bitrate allocator and the temporal layer
>   factories for VP8. This allows allocation to happen fully outside of
>   the encoder implementation.
>
> This refactoring will make it possible for ViEEncoder to signal the
> full picture of target bitrates to the RTCP module.
>
> BUG=webrtc:6301
>
> Committed: https://crrev.com/8f46c679d24a05b3f08e02c6d91ec9637f34e24f
> Cr-Commit-Position: refs/heads/master@{#14998}

TBR=stefan@webrtc.org,perkj@webrtc.org,mflodman@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6301

Review-Url: https://codereview.webrtc.org/2489843002
Cr-Commit-Position: refs/heads/master@{#15001}
2016-11-09 14:14:56 +00:00
8f46c679d2 Extract bitrate allocation of spatial/temporal layers out of codec impl.
This CL makes a number of intervowen changes:

* Add BitrateAllocation struct, that contains a codec independent view
  of how the target bitrate is distributed over spatial and temporal
  layers.

* Adds the BitrateAllocator interface, which takes a bitrate and frame
  rate and produces a BitrateAllocation.

* A default (non layered) implementation is added, and
  SimulcastRateAllocator is extended to fully handle VP8 allocation.
  This includes capturing TemporalLayer instances created by the
  encoder.

* ViEEncoder now owns both the bitrate allocator and the temporal layer
  factories for VP8. This allows allocation to happen fully outside of
  the encoder implementation.

This refactoring will make it possible for ViEEncoder to signal the
full picture of target bitrates to the RTCP module.

BUG=webrtc:6301

Review-Url: https://codereview.webrtc.org/2434073003
Cr-Commit-Position: refs/heads/master@{#14998}
2016-11-09 13:09:12 +00:00
cbe7435288 Reland of Add a webrtc{en,de}coderfactory implementation for VideoToolbox (patchset #1 id:1 of https://codereview.webrtc.org/2483273002/ )
Reason for revert:
Fix gyp build

Original issue's description:
> Revert of Add a webrtc{en,de}coderfactory implementation for VideoToolbox (patchset #2 id:20001 of https://codereview.webrtc.org/2463313002/ )
>
> Reason for revert:
> Broke dependent project because the .gn changes weren't accompanied by corresponding .gyp changes.
>
> Original issue's description:
> > Add a webrtc{en,de}coderfactory implementation for VideoToolbox
> >
> > This CL removes the coupling of the VideoToolbox h264 implementation
> > to the generic h264 code. The files have been moved into sdb/obj/Framework
> > and all dependency on them has been removed from the rest of WebRTC.
> > We now add it as an external encoder via a factory supplied to the
> > CreatePeerConnectionFactory call. This also brings the iOS implementation
> > closer to what we do on Android for MediaCodec.
> >
> > BUG=webrtc:6619
> >
> > Committed: https://crrev.com/6a5047dad31f14f53dd9f8bc1ecde19e1dede2e4
> > Cr-Commit-Position: refs/heads/master@{#14953}
>
> TBR=magjed@webrtc.org,stefan@webrtc.org,kthelgason@webrtc.org
> BUG=webrtc:6619
>
> Committed: https://crrev.com/d69ad84420d9c0e1c11450c352f6c92e7c9583f1
> Cr-Commit-Position: refs/heads/master@{#14985}

R=magjed@webrtc.org
TBR=kwiberg@webrtc.org, magjed@webrtc.org, stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6619

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

Cr-Commit-Position: refs/heads/master@{#14992}
2016-11-09 09:43:38 +00:00
d69ad84420 Revert of Add a webrtc{en,de}coderfactory implementation for VideoToolbox (patchset #2 id:20001 of https://codereview.webrtc.org/2463313002/ )
Reason for revert:
Broke dependent project because the .gn changes weren't accompanied by corresponding .gyp changes.

Original issue's description:
> Add a webrtc{en,de}coderfactory implementation for VideoToolbox
>
> This CL removes the coupling of the VideoToolbox h264 implementation
> to the generic h264 code. The files have been moved into sdb/obj/Framework
> and all dependency on them has been removed from the rest of WebRTC.
> We now add it as an external encoder via a factory supplied to the
> CreatePeerConnectionFactory call. This also brings the iOS implementation
> closer to what we do on Android for MediaCodec.
>
> BUG=webrtc:6619
>
> Committed: https://crrev.com/6a5047dad31f14f53dd9f8bc1ecde19e1dede2e4
> Cr-Commit-Position: refs/heads/master@{#14953}

TBR=magjed@webrtc.org,stefan@webrtc.org,kthelgason@webrtc.org
BUG=webrtc:6619

Review-Url: https://codereview.webrtc.org/2483273002
Cr-Commit-Position: refs/heads/master@{#14985}
2016-11-08 18:42:55 +00:00
6eaa55867b Disabling NOTREACHED which we're hitting flakily in browser tests.
I have no idea how bad it is that we're hitting this limit; I'm just
doing this to stop the tests from flaking.

BUG=webrtc:6484

Review-Url: https://codereview.webrtc.org/2477663002
Cr-Commit-Position: refs/heads/master@{#14974}
2016-11-08 13:32:07 +00:00
6a5047dad3 Add a webrtc{en,de}coderfactory implementation for VideoToolbox
This CL removes the coupling of the VideoToolbox h264 implementation
to the generic h264 code. The files have been moved into sdb/obj/Framework
and all dependency on them has been removed from the rest of WebRTC.
We now add it as an external encoder via a factory supplied to the
CreatePeerConnectionFactory call. This also brings the iOS implementation
closer to what we do on Android for MediaCodec.

BUG=webrtc:6619

Review-Url: https://codereview.webrtc.org/2463313002
Cr-Commit-Position: refs/heads/master@{#14953}
2016-11-07 15:26:05 +00:00
2cb155aa8a Remove deprected functions from EncodedImageCallback and RtpRtcp
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.

BUG=chromium:621691

Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Original-Commit-Position: refs/heads/master@{#14923}
Cr-Commit-Position: refs/heads/master@{#14935}
2016-11-04 18:39:37 +00:00
Per
00983572b0 Replace Check for too many pending frames in I420_buffer_pool with returning nullptr. Added histograms for when this happens in VP8Impl.
BUG=chromium:542522
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14930}
2016-11-04 07:57:39 +00:00
91b957d3e4 Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
Reason for revert:
Still breaks internal downstream project.
Sergey: Please update internal project before relanding this.

Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
> Cr-Commit-Position: refs/heads/master@{#14923}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2479643002
Cr-Commit-Position: refs/heads/master@{#14925}
2016-11-03 18:53:50 +00:00
c681250aaa Remove deprected functions from EncodedImageCallback and RtpRtcp
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.

BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14923}
2016-11-03 18:06:42 +00:00
43a9dc0f93 Revert of move deprected functions from EncodedImageCallback and RtpRtcp (patchset #1 id:1 of https://codereview.webrtc.org/2467373003/ )
Reason for revert:
Made a mistake while reverting.

Original issue's description:
> Reland of move deprected functions from EncodedImageCallback and RtpRtcp (patchset #2 id:240001 of https://codereview.webrtc.org/2474433008/ )
>
> Reason for revert:
> Breaks everything
>
> Original issue's description:
> > Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
> >
> > Reason for revert:
> > This might be breaking projects downstream.
> >
> > Original issue's description:
> > > Remove deprected functions from EncodedImageCallback and RtpRtcp
> > >
> > > Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> > > These methods should no longer be used anywhere and it's safe to remove
> > > them.
> > >
> > > BUG=chromium:621691
> > >
> > > Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> > > Cr-Commit-Position: refs/heads/master@{#14902}
> >
> > TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=chromium:621691
> >
> > Committed: https://crrev.com/6c78307a21252c2dbd704f6d5e92a220fb722ed4
> > Cr-Commit-Position: refs/heads/master@{#14914}
>
> TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:621691
>
> Committed: https://crrev.com/a1d6cd64083a3c0173aeefe38425a56de8942745
> Cr-Commit-Position: refs/heads/master@{#14915}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2477773002
Cr-Commit-Position: refs/heads/master@{#14916}
2016-11-03 14:52:42 +00:00
a1d6cd6408 Reland of move deprected functions from EncodedImageCallback and RtpRtcp (patchset #2 id:240001 of https://codereview.webrtc.org/2474433008/ )
Reason for revert:
Breaks everything

Original issue's description:
> Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
>
> Reason for revert:
> This might be breaking projects downstream.
>
> Original issue's description:
> > Remove deprected functions from EncodedImageCallback and RtpRtcp
> >
> > Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> > These methods should no longer be used anywhere and it's safe to remove
> > them.
> >
> > BUG=chromium:621691
> >
> > Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> > Cr-Commit-Position: refs/heads/master@{#14902}
>
> TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:621691
>
> Committed: https://crrev.com/6c78307a21252c2dbd704f6d5e92a220fb722ed4
> Cr-Commit-Position: refs/heads/master@{#14914}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2467373003
Cr-Commit-Position: refs/heads/master@{#14915}
2016-11-03 14:39:04 +00:00
6c78307a21 Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
Reason for revert:
This might be breaking projects downstream.

Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> Cr-Commit-Position: refs/heads/master@{#14902}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2474433008
Cr-Commit-Position: refs/heads/master@{#14914}
2016-11-03 14:33:25 +00:00
fa56584271 Remove deprected functions from EncodedImageCallback and RtpRtcp
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.

BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14902}
2016-11-02 20:14:24 +00:00
hta
5881d552c5 Remove webrtc::Video from H264 encoder internals
This CL replaces the use of webrtc::Video as an internal
variable in the H.264 encoder with the specific fields
that are used by this encoder.

In support of refactorings discussed around:

BUG=600254

Committed: https://crrev.com/2549437b5ccf5aae2e6f1a1491c5f505d1859f9c
Review-Url: https://codereview.webrtc.org/2468903003
Cr-Original-Commit-Position: refs/heads/master@{#14887}
Cr-Commit-Position: refs/heads/master@{#14892}
2016-11-02 14:22:29 +00:00
cb18ee6127 Add support for 3-byte headers in VideoToolbox NALU parser.
BUG=webrtc:6278
R=tkchin@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14889}
2016-11-02 14:07:12 +00:00
hta
6ad7fa4606 Revert of Remove webrtc::Video from H264 encoder internals (patchset #2 id:20001 of https://codereview.webrtc.org/2468903003/ )
Reason for revert:
Landed the wrong patchset. Nothing broken.

Original issue's description:
> Remove webrtc::Video from H264 encoder internals
>
> This CL replaces the use of webrtc::Video as an internal
> variable in the H.264 encoder with the specific fields
> that are used by this encoder.
>
> In support of refactorings discussed around:
>
> BUG=600254
>
> Committed: https://crrev.com/2549437b5ccf5aae2e6f1a1491c5f505d1859f9c
> Cr-Commit-Position: refs/heads/master@{#14887}

TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=600254

Review-Url: https://codereview.webrtc.org/2472673002
Cr-Commit-Position: refs/heads/master@{#14888}
2016-11-02 13:53:25 +00:00
hta
2549437b5c Remove webrtc::Video from H264 encoder internals
This CL replaces the use of webrtc::Video as an internal
variable in the H.264 encoder with the specific fields
that are used by this encoder.

In support of refactorings discussed around:

BUG=600254

Review-Url: https://codereview.webrtc.org/2468903003
Cr-Commit-Position: refs/heads/master@{#14887}
2016-11-02 13:45:57 +00:00
384e731455 vp8_impl.cc: Adjust cpu speed setting for arm for devices with 4 or more cores.
CIF or less: -12 -> -8
VGA: -12 -> -10

BUG=webrtc:6634

Review-Url: https://codereview.webrtc.org/2463033002
Cr-Commit-Position: refs/heads/master@{#14873}
2016-11-01 11:08:27 +00:00
67dca9f12e Delete ShallowCopy, in favor of copy construction and assignment.
BUG=webrtc:6591

Review-Url: https://codereview.webrtc.org/2443123002
Cr-Commit-Position: refs/heads/master@{#14853}
2016-10-31 15:05:58 +00:00
ca27f9d5b9 It seems that if encoder_params.sSpatialLayers[0].sSliceArgument.uiSliceNum is configured to number of cores as determined by openh264 (or any number > 1 in my local tests), frame rate statistics will be mucked up (apparently thousands of frames per second) and quality will bottom out because bits per frame is then very low.
BUG=webrtc:6583

Review-Url: https://codereview.webrtc.org/2458673002
Cr-Commit-Position: refs/heads/master@{#14842}
2016-10-31 10:43:47 +00:00
b906172e02 Reland of Move bitstream parser to more appropriate directory. (patchset #1 id:1 of https://codereview.webrtc.org/2430353004/ )
Reason for revert:
Internal project has been fixed

Original issue's description:
> Revert of Move bitstream parser to more appropriate directory. (patchset #4 id:60001 of https://codereview.webrtc.org/2370853005/ )
>
> Reason for revert:
> Breaks internal project
>
> Original issue's description:
> > Move current bitstream parser to more appropriate directory.
> >
> > This CL groups together the code that has to do with parsing H264 bitstreams.
> > This code logically belongs together, and having it in the same directory not
> > only simplifies things from a project structure perspective, but also makes it
> > easier to refactor out common parts incrementally.
> > An added benefit is that this simplifies modular compilation, where for example
> > one would like a build of WebRTC without the H264 codec-specific parts.
> >
> > BUG=webrtc:6338
> >
> > Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> > Cr-Commit-Position: refs/heads/master@{#14684}
>
> TBR=magjed@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6338
>
> Committed: https://crrev.com/f04f14e772f803de39f8a6128e5157127cd35103
> Cr-Commit-Position: refs/heads/master@{#14685}

TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6338

Review-Url: https://codereview.webrtc.org/2434043002
Cr-Commit-Position: refs/heads/master@{#14783}
2016-10-26 09:48:24 +00:00
hta
257dc39841 Refactoring: Hide VideoCodec.codecSpecific as "private"
This refactoring allows runtime checks that functions that access
codec specific information are using the correct union member.
The API also allows replacing the union with another implementation
without changes at calling sites.

BUG=webrtc:6603

Review-Url: https://codereview.webrtc.org/2001533003
Cr-Commit-Position: refs/heads/master@{#14775}
2016-10-25 16:05:15 +00:00
611f267370 Make WebRTC compatible with OpenH264 v1.6.
The API has changed for the slice config of SSpatialLayerConfig as of
OpenH264 v1.6. Update H264EncoderImpl with an ifdef that uses the
correct API depending on what version of OpenH264 is being used.

BUG=webrtc:6583

Review-Url: https://codereview.webrtc.org/2440113002
Cr-Commit-Position: refs/heads/master@{#14762}
2016-10-25 10:09:06 +00:00
61c053e329 Reland of Delete webrtc::VideoFrame::CopyFrame. (patchset #1 id:1 of https://codereview.webrtc.org/2397943003/ )
Reason for revert:
Dependencies updated.

Original issue's description:
> Revert of Delete webrtc::VideoFrame::CopyFrame. (patchset #2 id:20001 of https://codereview.webrtc.org/2371363003/ )
>
> Reason for revert:
> This CL breaks internal dependencies.
>
> Original issue's description:
> > Delete webrtc::VideoFrame::CopyFrame.
> >
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/0e7c7ce35d9449c5bb13328d1bfb04ad32e48ccc
> > Cr-Commit-Position: refs/heads/master@{#14550}
>
> TBR=magjed@webrtc.org,tommi@webrtc.org,nisse@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/21a18ee267146c86e188d95edf6432f71dd53aeb
> Cr-Commit-Position: refs/heads/master@{#14553}

TBR=magjed@webrtc.org,tommi@webrtc.org,ivoc@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2435963002
Cr-Commit-Position: refs/heads/master@{#14731}
2016-10-24 07:44:17 +00:00
5a8724564c iOS: Optimize video scaling and cropping
This CL makes scaling and cropping lazy in AVFoundationVideoCapturer and
provides optimized paths for SW and HW encoding. For SW encoding, an
efficient NV12 -> I420 cropping and scaling is implemented in
CoreVideoFrameBuffer::NativeToI420. For HW encoding, an efficient NV12 ->
NV12 cropping and scaling is implemented in
CoreVideoFrameBuffer::CropAndScaleTo. The performance improvement over
the existing cropping and scaling is that it is now done in one step
instead of making an intermediary copy of the Y plane.

There might still be room for improvement in the HW path using some HW
support. That will be explored in a future CL.

BUG=b/30939444

Review-Url: https://codereview.webrtc.org/2394483005
Cr-Commit-Position: refs/heads/master@{#14701}
2016-10-20 10:34:32 +00:00
f04f14e772 Revert of Move bitstream parser to more appropriate directory. (patchset #4 id:60001 of https://codereview.webrtc.org/2370853005/ )
Reason for revert:
Breaks internal project

Original issue's description:
> Move current bitstream parser to more appropriate directory.
>
> This CL groups together the code that has to do with parsing H264 bitstreams.
> This code logically belongs together, and having it in the same directory not
> only simplifies things from a project structure perspective, but also makes it
> easier to refactor out common parts incrementally.
> An added benefit is that this simplifies modular compilation, where for example
> one would like a build of WebRTC without the H264 codec-specific parts.
>
> BUG=webrtc:6338
>
> Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> Cr-Commit-Position: refs/heads/master@{#14684}

TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6338

Review-Url: https://codereview.webrtc.org/2430353004
Cr-Commit-Position: refs/heads/master@{#14685}
2016-10-19 17:34:39 +00:00
cc6817e9ce Move current bitstream parser to more appropriate directory.
This CL groups together the code that has to do with parsing H264 bitstreams.
This code logically belongs together, and having it in the same directory not
only simplifies things from a project structure perspective, but also makes it
easier to refactor out common parts incrementally.
An added benefit is that this simplifies modular compilation, where for example
one would like a build of WebRTC without the H264 codec-specific parts.

BUG=webrtc:6338

Review-Url: https://codereview.webrtc.org/2370853005
Cr-Commit-Position: refs/heads/master@{#14684}
2016-10-19 16:31:15 +00:00
21a18ee267 Revert of Delete webrtc::VideoFrame::CopyFrame. (patchset #2 id:20001 of https://codereview.webrtc.org/2371363003/ )
Reason for revert:
This CL breaks internal dependencies.

Original issue's description:
> Delete webrtc::VideoFrame::CopyFrame.
>
> BUG=webrtc:5682
>
> Committed: https://crrev.com/0e7c7ce35d9449c5bb13328d1bfb04ad32e48ccc
> Cr-Commit-Position: refs/heads/master@{#14550}

TBR=magjed@webrtc.org,tommi@webrtc.org,nisse@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2397943003
Cr-Commit-Position: refs/heads/master@{#14553}
2016-10-06 13:29:34 +00:00
0e7c7ce35d Delete webrtc::VideoFrame::CopyFrame.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2371363003
Cr-Commit-Position: refs/heads/master@{#14550}
2016-10-06 12:00:13 +00:00
470c0887b3 Fix modules_unittests on iOS.
Some of the module tests were failing on iOS, causing them to be ignored
on the trybots. Specifically this CL:
- Skips some tests that should not run on the simulator
- Fixes iOS file system test helpers
- Fixes failing nalu parser unittest

BUG=webrtc:4752
R=henrika@webrtc.org, peah@webrtc.org, sprang@webrtc.org
TBR=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14472}
2016-10-03 11:13:33 +00:00