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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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.orgTBR=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}
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}
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}
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}
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}
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}
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}
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}