Commit Graph

916 Commits

Author SHA1 Message Date
1a646ee522 Wire up BitrateAllocation to be sent as RTCP TargetBitrate
This is the video parts of https://codereview.webrtc.org/2531383002/
Wire up BitrateAllocation to be sent as RTCP TargetBitrate

BUG=webrtc:6301

Review-Url: https://codereview.webrtc.org/2541303003
Cr-Commit-Position: refs/heads/master@{#15359}
2016-12-01 14:34:18 +00:00
86cf9a2474 Increase test timeout to combat flakiness.
These tests have been a little flaky on the bots.
Hopefully increasing the timeout by 200% will help.

BUG=webrtc:6799

Review-Url: https://codereview.webrtc.org/2541743006
Cr-Commit-Position: refs/heads/master@{#15355}
2016-12-01 10:57:07 +00:00
cb861e074a Templatize percentile_filter.h and move it to base/analytics.
BUG=None

Review-Url: https://codereview.webrtc.org/2529063002
Cr-Commit-Position: refs/heads/master@{#15334}
2016-11-30 14:52:06 +00:00
759e0b7241 Fix memory leak in video_coding::PacketBuffer::InsertPacket.
BUG=webrtc:6788

Review-Url: https://codereview.webrtc.org/2535203002
Cr-Commit-Position: refs/heads/master@{#15314}
2016-11-30 09:32:11 +00:00
be74270ebe Calculate JitterBufferDelayInMs in the new jitter buffer.
JitterBufferDelayInMs is used for the WebRTC-NewVideoJitterBuffer finch
experiment, and therefore needs to be calculated.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2534093003
Cr-Commit-Position: refs/heads/master@{#15313}
2016-11-30 09:31:45 +00:00
ee414d90b0 Added sanity check to VCMDecodingState::UsingFlexibleMode to prevent OOB error.
BUG=chromium:667504

Review-Url: https://codereview.webrtc.org/2534883003
Cr-Commit-Position: refs/heads/master@{#15298}
2016-11-29 15:01:29 +00:00
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
266f0a44eb Now run EndToEndTest with the WebRTC-NewVideoJitterBuffer experiment.
In this CL:
 - EndToEndTests is now parameterized.
 - Added VP8 non-rotated unittest.
 - CanReceiveUlpfec/CanReceiveFlexFec now use multisets for timestamps.
 - pre_decode_image_callback_ is now called before decoding a frame
   with the new video jitter buffer.
 - Set video rotation when FrameObjects are created.
 - Calculate KeyFramesReceivedInPermille in new video jitter buffer.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2522493002
Cr-Commit-Position: refs/heads/master@{#15274}
2016-11-28 16:49:15 +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
20dce34578 Fixed bug in PacketBuffer to correctly detect new complete frames after ClearTo has been called.
BUG=webrtc:5514
R=stefan@webrtc.org, terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#15269}
2016-11-28 15:15:04 +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
e69a1a9342 Reland of Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload (patchset #1 id:1 of https://codereview.webrtc.org/2529143002/ )
Reason for revert:
Include fix; set profile information in CreatePayloadType for video.

Original issue's description:
> Revert of Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload (patchset #1 id:40001 of https://codereview.webrtc.org/2525693003/ )
>
> Reason for revert:
> The CL doesn't actually set profile information in VideoPayload.
>
> Original issue's description:
> > Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload
> >
> > It's necessary to check H264 profile information as well as payload name
> > in PayloadIsCompatible in RTPPayloadRegistry.
> >
> > BUG=webrtc:6743
> >
> > Committed: https://crrev.com/bdbc4b7ef578ba1d61ceec351bc47c33da115329
> > Cr-Commit-Position: refs/heads/master@{#15248}
>
> TBR=mflodman@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6743
>
> Committed: https://crrev.com/d7e6ccbc53fc24acdcc7507a6f3a155626473d54
> Cr-Commit-Position: refs/heads/master@{#15251}

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

Review-Url: https://codereview.webrtc.org/2529153002
Cr-Commit-Position: refs/heads/master@{#15252}
2016-11-25 18:06:35 +00:00
d7e6ccbc53 Revert of Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload (patchset #1 id:40001 of https://codereview.webrtc.org/2525693003/ )
Reason for revert:
The CL doesn't actually set profile information in VideoPayload.

Original issue's description:
> Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload
>
> It's necessary to check H264 profile information as well as payload name
> in PayloadIsCompatible in RTPPayloadRegistry.
>
> BUG=webrtc:6743
>
> Committed: https://crrev.com/bdbc4b7ef578ba1d61ceec351bc47c33da115329
> Cr-Commit-Position: refs/heads/master@{#15248}

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

Review-Url: https://codereview.webrtc.org/2529143002
Cr-Commit-Position: refs/heads/master@{#15251}
2016-11-25 17:34:17 +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
bdbc4b7ef5 Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload
It's necessary to check H264 profile information as well as payload name
in PayloadIsCompatible in RTPPayloadRegistry.

BUG=webrtc:6743

Review-Url: https://codereview.webrtc.org/2525693003
Cr-Commit-Position: refs/heads/master@{#15248}
2016-11-25 15:14:30 +00:00
f3feeffe03 Reland of move RTPPayloadStrategy and simplify RTPPayloadRegistry (patchset #1 id:1 of https://codereview.webrtc.org/2528993002/ )
Reason for revert:
Downstream code has been updated.

Original issue's description:
> Revert of Remove RTPPayloadStrategy and simplify RTPPayloadRegistry (patchset #7 id:240001 of https://codereview.webrtc.org/2524923002/ )
>
> Reason for revert:
> Breaks downstream projects.
>
> Original issue's description:
> > Remove RTPPayloadStrategy and simplify RTPPayloadRegistry
> >
> > This CL removes RTPPayloadStrategy that is currently used to handle
> > audio/video specific aspects of payload handling. Instead, the audio and
> > video specific aspects will now have different functions, with linear
> > code flow.
> >
> > This CL does not contain any functional changes, and is just a
> > preparation for future CL:s.
> >
> > The main purpose with this CL is to add this function:
> > bool PayloadIsCompatible(const RtpUtility::Payload& payload,
> >                          const webrtc::VideoCodec& video_codec);
> > that can easily be extended in a future CL to look at video codec
> > specific information.
> >
> > BUG=webrtc:6743
> >
> > Committed: https://crrev.com/b881254dc86d2cc80a52e08155433458be002166
> > Cr-Commit-Position: refs/heads/master@{#15232}
>
> TBR=danilchap@webrtc.org,solenberg@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:6743
>
> Committed: https://crrev.com/33c81d05613f45f65ee17224ed381c6cdd1c6c6f
> Cr-Commit-Position: refs/heads/master@{#15234}

TBR=danilchap@webrtc.org,solenberg@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:6743

Review-Url: https://codereview.webrtc.org/2531043002
Cr-Commit-Position: refs/heads/master@{#15245}
2016-11-25 14:40:30 +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
33c81d0561 Revert of Remove RTPPayloadStrategy and simplify RTPPayloadRegistry (patchset #7 id:240001 of https://codereview.webrtc.org/2524923002/ )
Reason for revert:
Breaks downstream projects.

Original issue's description:
> Remove RTPPayloadStrategy and simplify RTPPayloadRegistry
>
> This CL removes RTPPayloadStrategy that is currently used to handle
> audio/video specific aspects of payload handling. Instead, the audio and
> video specific aspects will now have different functions, with linear
> code flow.
>
> This CL does not contain any functional changes, and is just a
> preparation for future CL:s.
>
> The main purpose with this CL is to add this function:
> bool PayloadIsCompatible(const RtpUtility::Payload& payload,
>                          const webrtc::VideoCodec& video_codec);
> that can easily be extended in a future CL to look at video codec
> specific information.
>
> BUG=webrtc:6743
>
> Committed: https://crrev.com/b881254dc86d2cc80a52e08155433458be002166
> Cr-Commit-Position: refs/heads/master@{#15232}

TBR=danilchap@webrtc.org,solenberg@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:6743

Review-Url: https://codereview.webrtc.org/2528993002
Cr-Commit-Position: refs/heads/master@{#15234}
2016-11-24 19:08:45 +00:00
69b627d89d Move smoothing filter to common audio and exp_filter to base/analytics.
An earlier attempt of this work can be found here https://codereview.webrtc.org/2520003005/#ps100001, but was reverted.

PS4 in that CL was not valid since separation of BUILD.gn can cause internal bot to fail.

This is a new attempt, which is the same as https://codereview.webrtc.org/2520003005/#ps100001 but PS4 reverted.

BUG=webrtc:6443
TBR=tommi@webrtc.org, solenberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2532523002
Cr-Commit-Position: refs/heads/master@{#15233}
2016-11-24 19:01:14 +00:00
b881254dc8 Remove RTPPayloadStrategy and simplify RTPPayloadRegistry
This CL removes RTPPayloadStrategy that is currently used to handle
audio/video specific aspects of payload handling. Instead, the audio and
video specific aspects will now have different functions, with linear
code flow.

This CL does not contain any functional changes, and is just a
preparation for future CL:s.

The main purpose with this CL is to add this function:
bool PayloadIsCompatible(const RtpUtility::Payload& payload,
                         const webrtc::VideoCodec& video_codec);
that can easily be extended in a future CL to look at video codec
specific information.

BUG=webrtc:6743

Review-Url: https://codereview.webrtc.org/2524923002
Cr-Commit-Position: refs/heads/master@{#15232}
2016-11-24 18:43:50 +00:00
3c3aef44de Revert of Reland "Move smoothing filter to common audio". (patchset #5 id:100001 of https://codereview.webrtc.org/2520003005/ )
Reason for revert:
Internal bots failed.

Original issue's description:
> Reland "Move smoothing filter to common audio".
>
> The original CL was this https://codereview.webrtc.org/2484153002/
>
> Due to failure with internal trial servers, it was reverted. This CL tries to reland it.
>
> BUG=webrtc:6443
>
> Committed: https://crrev.com/223641f1b903e41e77d88f03199b4cdb65255ec8
> Cr-Commit-Position: refs/heads/master@{#15227}

TBR=tommi@webrtc.org,solenberg@webrtc.org,terelius@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6443

Review-Url: https://codereview.webrtc.org/2529943002
Cr-Commit-Position: refs/heads/master@{#15228}
2016-11-24 15:13:24 +00:00
223641f1b9 Reland "Move smoothing filter to common audio".
The original CL was this https://codereview.webrtc.org/2484153002/

Due to failure with internal trial servers, it was reverted. This CL tries to reland it.

BUG=webrtc:6443

Review-Url: https://codereview.webrtc.org/2520003005
Cr-Commit-Position: refs/heads/master@{#15227}
2016-11-24 14:08:09 +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
40217c3718 Initial rate allocation should not use fps = 0
A recent cl (https://codereview.webrtc.org/2510583002) introduced an
issue where the initial rate allocation (call to VideoBitrateAllocator
and any associated temporal layers) uses framerate = 0 fps. This may
cause issues, including having the rate control in ScreenshareLayers
ramp up too slowly.

This CL make the initial call use VideoCodec.maxFramerate as framerate.
Also expanded unit tests.

BUG=webrtc:6301

Review-Url: https://codereview.webrtc.org/2513383002
Cr-Commit-Position: refs/heads/master@{#15166}
2016-11-21 13:42:04 +00:00
05f845d025 Replace c-style cast and constrain value in VCMFecMethod::ProtectionFactor.
BUG=None

Review-Url: https://codereview.webrtc.org/2501083003
Cr-Commit-Position: refs/heads/master@{#15116}
2016-11-17 06:59:42 +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
41b8ca0420 PacketBuffer no longer copy the bitstream data of incoming packets.
This change the interface of the PacketBuffer since the bitstream data of the packet has to be persistent when inserted into the PacketBuffer.

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

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

Cr-Commit-Position: refs/heads/master@{#14949}
2016-11-07 14:42:32 +00:00
a75d12d09d H264SpsPpsTracker now return PacketAction on CopyAndFixBitstream.
To differentiate between when a packet should be dropped or when a keyframe
is missing its SPS and/or SPS CopyAndFixBitstream now returns:
 - kInsert, the packet should be inserted into the PacketBuffer.
 - kDrop, the packet should be dropped.
 - kRequestKeyframe, a keyframe should be requested.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2477343002
Cr-Commit-Position: refs/heads/master@{#14948}
2016-11-07 13:11:44 +00:00
87d7d77700 Add new codec for FlexFEC.
This CL does nothing except adding new strings and enums corresponding to
the new codec.

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

Review-Url: https://codereview.webrtc.org/2470103002
Cr-Commit-Position: refs/heads/master@{#14943}
2016-11-07 11:04:03 +00:00
36928454fa Allocate extra buffer space in FrameObject in case of H264.
Since ffmpeg use an optimized bitstream reader that reads in chunks of 32/64
bits the bitstream buffer has to be increased in order for the reader to not
read out of bounds.

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

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

Cr-Commit-Position: refs/heads/master@{#14941}
2016-11-07 09:42:43 +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