Commit Graph

312 Commits

Author SHA1 Message Date
c9c142f170 Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1983583002/ )
Reason for revert:
Should work after cl https://codereview.webrtc.org/1985693002/ is landed, which initializes the frames used by FakeWebRtcVideoCaptureModule. So intend to reland after that, with no changes.

Original issue's description:
> Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #2 id:290001 of https://codereview.webrtc.org/1963413004/ )
>
> Reason for revert:
> Speculative revert to see if failures on the DrMemory bot are related to this cl.  See e.g. here:
> https://build.chromium.org/p/client.webrtc/builders/Win%20DrMemory%20Full/builds/4243
>
> UNINITIALIZED READ: reading 0x04980040-0x04980060 32 byte(s) within 0x04980040-0x04980060
> # 0 CopyRow_AVX
> # 1 CopyPlane
> # 2 I420Copy
> # 3 webrtc::ExtractBuffer
> # 4 cricket::WebRtcVideoCapturer::SignalFrameCapturedOnStartThread
> # 5 cricket::WebRtcVideoCapturer::OnIncomingCapturedFrame
> # 6 FakeWebRtcVideoCaptureModule::SendFrame
> # 7 WebRtcVideoCapturerTest_TestCaptureVcm_Test::TestBody
> # 8 testing::internal::HandleSehExceptionsInMethodIfSupported<>
>
> Original issue's description:
> > Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1935443002/ )
> >
> > Reason for revert:
> > I plan to reland this change in a week or two, after downstream users are updated.
> >
> > Original issue's description:
> > > Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
> > >
> > > Reason for revert:
> > > Breaks chrome FYI bots.
> > >
> > > Original issue's description:
> > > > Delete webrtc::VideoFrame methods buffer and stride.
> > > >
> > > > To make the HasOneRef/IsMutable hack work, also had to change the
> > > > video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> > > > to not imply an AddRef.
> > > >
> > > > BUG=webrtc:5682
> > >
> > > TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@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:5682
> > >
> > > Committed: https://crrev.com/5b3c443d301f2c2f18dac5b02652c08b91ea3828
> > > Cr-Commit-Position: refs/heads/master@{#12558}
> >
> > TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/d0dc66e0ea30c8614001e425a4ae0aa7dd56c2a7
> > Cr-Commit-Position: refs/heads/master@{#12721}
>
> TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@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/d49c30cd2fe442f2b5b4ecec8d5cbaa430464725
> Cr-Commit-Position: refs/heads/master@{#12745}

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

Review-Url: https://codereview.webrtc.org/1979193003
Cr-Commit-Position: refs/heads/master@{#12773}
2016-05-17 11:05:51 +00:00
d49c30cd2f Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #2 id:290001 of https://codereview.webrtc.org/1963413004/ )
Reason for revert:
Speculative revert to see if failures on the DrMemory bot are related to this cl.  See e.g. here:
https://build.chromium.org/p/client.webrtc/builders/Win%20DrMemory%20Full/builds/4243

UNINITIALIZED READ: reading 0x04980040-0x04980060 32 byte(s) within 0x04980040-0x04980060
# 0 CopyRow_AVX
# 1 CopyPlane
# 2 I420Copy
# 3 webrtc::ExtractBuffer
# 4 cricket::WebRtcVideoCapturer::SignalFrameCapturedOnStartThread
# 5 cricket::WebRtcVideoCapturer::OnIncomingCapturedFrame
# 6 FakeWebRtcVideoCaptureModule::SendFrame
# 7 WebRtcVideoCapturerTest_TestCaptureVcm_Test::TestBody
# 8 testing::internal::HandleSehExceptionsInMethodIfSupported<>

Original issue's description:
> Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1935443002/ )
>
> Reason for revert:
> I plan to reland this change in a week or two, after downstream users are updated.
>
> Original issue's description:
> > Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
> >
> > Reason for revert:
> > Breaks chrome FYI bots.
> >
> > Original issue's description:
> > > Delete webrtc::VideoFrame methods buffer and stride.
> > >
> > > To make the HasOneRef/IsMutable hack work, also had to change the
> > > video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> > > to not imply an AddRef.
> > >
> > > BUG=webrtc:5682
> >
> > TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@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:5682
> >
> > Committed: https://crrev.com/5b3c443d301f2c2f18dac5b02652c08b91ea3828
> > Cr-Commit-Position: refs/heads/master@{#12558}
>
> TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:5682
>
> Committed: https://crrev.com/d0dc66e0ea30c8614001e425a4ae0aa7dd56c2a7
> Cr-Commit-Position: refs/heads/master@{#12721}

TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@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/1983583002
Cr-Commit-Position: refs/heads/master@{#12745}
2016-05-14 10:18:13 +00:00
1299615838 Make sure WebRTC works without libvpx VP9 support.
Wires up existing libvpx_build_vp9==0 GYP flag into WebRTC and makes VP9
optional. Change is GYP only for now since libvpx's GN files build VP9
unconditionally.

BUG=webrtc:5884
R=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12741}
2016-05-14 00:03:28 +00:00
1f53452ca6 Unify hardware and software QP thresholds.
Uses current libvpx (slightly older) thresholds to maintain a larger
window of stable QP, but maintains the newer H264 thresholds.

BUG=
R=glaznev@webrtc.org, mflodman@webrtc.org

Review-Url: https://codereview.webrtc.org/1966213002
Cr-Commit-Position: refs/heads/master@{#12734}
2016-05-13 18:05:38 +00:00
d0dc66e0ea Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1935443002/ )
Reason for revert:
I plan to reland this change in a week or two, after downstream users are updated.

Original issue's description:
> Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
>
> Reason for revert:
> Breaks chrome FYI bots.
>
> Original issue's description:
> > Delete webrtc::VideoFrame methods buffer and stride.
> >
> > To make the HasOneRef/IsMutable hack work, also had to change the
> > video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> > to not imply an AddRef.
> >
> > BUG=webrtc:5682
>
> TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@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:5682
>
> Committed: https://crrev.com/5b3c443d301f2c2f18dac5b02652c08b91ea3828
> Cr-Commit-Position: refs/heads/master@{#12558}

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

Review-Url: https://codereview.webrtc.org/1963413004
Cr-Commit-Position: refs/heads/master@{#12721}
2016-05-13 11:12:48 +00:00
b6e8f2f7a7 Reland of name OpenH264 frame-type conversion function. (patchset #1 id:1 of https://codereview.webrtc.org/1964913002/ )
Reason for revert:
Not perf-regression culprit.

Original issue's description:
> Revert of Rename OpenH264 frame-type conversion function. (patchset #2 id:20001 of https://codereview.webrtc.org/1943193003/ )
>
> Reason for revert:
> Speculative revert for perf regression (though unlikely).
>
> Original issue's description:
> > Rename OpenH264 frame-type conversion function.
> >
> > Also removing default case, so if another frame is added to
> > EVideoFrameType we have to handle it.
> >
> > This will now NOTREACHED on videoFrameTypeInvalid, but
> > videoFrameTypeInvalid shouldn't happen if encoding succeeds, so it
> > should be fine or we should become aware of it.
> >
> > BUG=
> > R=hbos@webrtc.org
> >
> > Committed: https://crrev.com/39a36705ab734914d500b8a0f214ea630d82ab70
> > Cr-Commit-Position: refs/heads/master@{#12636}
>
> TBR=hbos@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:610347
>
> Committed: https://crrev.com/1abf937cecea56ee02ac4a08980ffea9e7ed1054
> Cr-Commit-Position: refs/heads/master@{#12677}

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

Review-Url: https://codereview.webrtc.org/1970513004
Cr-Commit-Position: refs/heads/master@{#12679}
2016-05-11 07:58:42 +00:00
1abf937cec Revert of Rename OpenH264 frame-type conversion function. (patchset #2 id:20001 of https://codereview.webrtc.org/1943193003/ )
Reason for revert:
Speculative revert for perf regression (though unlikely).

Original issue's description:
> Rename OpenH264 frame-type conversion function.
>
> Also removing default case, so if another frame is added to
> EVideoFrameType we have to handle it.
>
> This will now NOTREACHED on videoFrameTypeInvalid, but
> videoFrameTypeInvalid shouldn't happen if encoding succeeds, so it
> should be fine or we should become aware of it.
>
> BUG=
> R=hbos@webrtc.org
>
> Committed: https://crrev.com/39a36705ab734914d500b8a0f214ea630d82ab70
> Cr-Commit-Position: refs/heads/master@{#12636}

TBR=hbos@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:610347

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

Cr-Commit-Position: refs/heads/master@{#12677}
2016-05-10 18:52:13 +00:00
d28db7fd65 Delete all use of tick_util.h.
Depends on Chrome cl https://codereview.chromium.org/1888003002/, which was landed some time ago.

BUG=webrtc:5740
R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12674}
2016-05-10 14:31:58 +00:00
39a36705ab Rename OpenH264 frame-type conversion function.
Also removing default case, so if another frame is added to
EVideoFrameType we have to handle it.

This will now NOTREACHED on videoFrameTypeInvalid, but
videoFrameTypeInvalid shouldn't happen if encoding succeeds, so it
should be fine or we should become aware of it.

BUG=
R=hbos@webrtc.org

Review-Url: https://codereview.webrtc.org/1943193003
Cr-Commit-Position: refs/heads/master@{#12636}
2016-05-05 15:09:17 +00:00
b49ac78c71 Revert of Use RC_TIMESTAMP_MODE for OpenH264. (patchset #1 id:1 of https://codereview.webrtc.org/1945763002/ )
Reason for revert:
Previous mode aligns with other encoders, and RC_TIMESTAMP_MODE might have issues with no frames for several seconds.

Original issue's description:
> Use RC_TIMESTAMP_MODE for OpenH264.
>
> Performs rate control based on timestamp deltas instead of announced
> frame rate.
>
> BUG=webrtc:5855
> R=hbos@webrtc.org
>
> Committed: https://crrev.com/c4deee49a3ec42b7fe83c82f750539b36aae1d3f
> Cr-Commit-Position: refs/heads/master@{#12611}

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

Review-Url: https://codereview.webrtc.org/1950973002
Cr-Commit-Position: refs/heads/master@{#12629}
2016-05-04 14:18:01 +00:00
c4deee49a3 Use RC_TIMESTAMP_MODE for OpenH264.
Performs rate control based on timestamp deltas instead of announced
frame rate.

BUG=webrtc:5855
R=hbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12611}
2016-05-03 18:00:05 +00:00
ef8b61e110 Enable -Winconsistent-missing-override flag.
The problem with gmock is worked around by commenting out any other override declarations in classes using gmock.

NOPRESUBMIT=True
BUG=webrtc:3970

Review-Url: https://codereview.webrtc.org/1921653002
Cr-Commit-Position: refs/heads/master@{#12563}
2016-04-29 13:09:23 +00:00
5b3c443d30 Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
Reason for revert:
Breaks chrome FYI bots.

Original issue's description:
> Delete webrtc::VideoFrame methods buffer and stride.
>
> To make the HasOneRef/IsMutable hack work, also had to change the
> video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> to not imply an AddRef.
>
> BUG=webrtc:5682

TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@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:5682

Review-Url: https://codereview.webrtc.org/1935443002
Cr-Commit-Position: refs/heads/master@{#12558}
2016-04-29 09:39:33 +00:00
a0591b5473 Delete webrtc::VideoFrame methods buffer and stride.
To make the HasOneRef/IsMutable hack work, also had to change the
video_frame_buffer method to return a const ref to a scoped_ref_ptr,
to not imply an AddRef.

BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1900673002
Cr-Commit-Position: refs/heads/master@{#12557}
2016-04-29 09:09:33 +00:00
9eeb6240c9 Build dynamic iOS SDK.
- Places most ObjC code into webrtc/sdk/objc instead.
- New gyp targets to build, strip and export symbols for dylib.
- Removes old script used to generate dylib.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12524}
2016-04-27 08:54:27 +00:00
55a401e607 Move BitrateAdjuster into common_video
This CL moves BitrateAdjuster into common_video folder as it
was suggested on [0] such that it can be properly linked with
Chrome projects.

[0] https://codereview.chromium.org/1818903004/

BUG=500605

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

Cr-Commit-Position: refs/heads/master@{#12515}
2016-04-26 19:55:10 +00:00
3c6eac2860 Remove QualityScaler framerate reduction.
Framerate-reduction code is disabled on all platforms, and this code
adds complexity. It's necessary to react fast, especially on mobile
platforms or other bad network conditions and framerate reduction adds
another step between HD and QVGA.

BUG=webrtc:5678, webrtc:5830
R=jackychen@webrtc.org, mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12503}
2016-04-26 11:37:20 +00:00
9b2119be47 Reland of Use initial bitrates for software VP8. (patchset #1 id:1 of https://codereview.webrtc.org/1898183002/ )
Reason for revert:
Chromium test updated to handle this change.

Original issue's description:
> Revert of Use initial bitrates for software VP8. (patchset #3 id:40001 of https://codereview.webrtc.org/1893313002/ )
>
> Reason for revert:
> Likely broke Chromium:
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Tester/builds/26838
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/2224
>
> Original issue's description:
> > Use initial bitrates for software VP8.
> >
> > Makes the software encoder start at VGA as well, since ~300k isn't good
> > enough to produce a good HD stream.
> >
> > BUG=webrtc:5678
> > R=glaznev@webrtc.org, stefan@webrtc.org
> >
> > Committed: https://crrev.com/e1da27e543bdb1983638118172a4efd599ca51b5
> > Cr-Commit-Position: refs/heads/master@{#12428}
>
> TBR=stefan@webrtc.org,glaznev@webrtc.org,pbos@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5678
>
> Committed: https://crrev.com/5aa2d344d7e0b8940794d3c4422f81ac81249022
> Cr-Commit-Position: refs/heads/master@{#12430}

TBR=stefan@webrtc.org,glaznev@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:5678

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

Cr-Commit-Position: refs/heads/master@{#12447}
2016-04-20 13:37:44 +00:00
5aa2d344d7 Revert of Use initial bitrates for software VP8. (patchset #3 id:40001 of https://codereview.webrtc.org/1893313002/ )
Reason for revert:
Likely broke Chromium:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Tester/builds/26838
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/2224

Original issue's description:
> Use initial bitrates for software VP8.
>
> Makes the software encoder start at VGA as well, since ~300k isn't good
> enough to produce a good HD stream.
>
> BUG=webrtc:5678
> R=glaznev@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/e1da27e543bdb1983638118172a4efd599ca51b5
> Cr-Commit-Position: refs/heads/master@{#12428}

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

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

Cr-Commit-Position: refs/heads/master@{#12430}
2016-04-19 15:18:50 +00:00
e1da27e543 Use initial bitrates for software VP8.
Makes the software encoder start at VGA as well, since ~300k isn't good
enough to produce a good HD stream.

BUG=webrtc:5678
R=glaznev@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12428}
2016-04-19 13:53:22 +00:00
Per
ba7dc723b0 Add rotation to EncodedImage and make sure it is passed through encoders.
This fix a potential race where the rotation information of a sent frame does not match the encoded frame.

BUG=webrtc:5783
TEST= Run ApprtcDemo on IOs and Android with and without capture to texture and both VP8 and H264.
R=magjed@webrtc.org, pbos@webrtc.org, tkchin@webrtc.org
TBR=tkchin_webrtc // For IOS changes.

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

Cr-Commit-Position: refs/heads/master@{#12426}
2016-04-19 13:01:32 +00:00
2c8a2964fd Tune QP-based quality thresholds.
Increases measure time for downscale back to 5 seconds, this is required
to not over-react on hand-waving or quick device rotations.

Also increase max thresholds for QP a bit to not overreact when quality
still looks somewhat OK. Min thresholds for H264 seemed very low and are
increased to be sure that we can go back up again. The window is still
quite big with the increased max QP.

Also changes libvpx thresholds to use the same thresholds as the
encoder, they were excessively low before and wouldn't adapt on bad QPs
at all before (but rely on >60% framedropping based on bitrates to go
down).

BUG=webrtc:5678
R=stefan@webrtc.org
TBR=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12403}
2016-04-18 10:58:17 +00:00
5265fedffe Add histogram stats for average QP per frame for VP9 (for sent video streams):
- "WebRTC.Video.Encoded.Qp.Vp9"
- "WebRTC.Video.Encoded.Qp.Vp9.S0"
- "WebRTC.Video.Encoded.Qp.Vp9.S1"
- "WebRTC.Video.Encoded.Qp.Vp9.S2"

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12402}
2016-04-18 09:58:52 +00:00
8056acc6f5 Use bitstream-level QP for libvpx VP8 quality.
BUG=webrtc:5678
TBR=marpan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12401}
2016-04-18 09:17:43 +00:00
a186288fd0 Revert of Update histogram "WebRTC.Video.OnewayDelayInMs" to use the estimated one-way delay. (patchset #4 id:60001 of https://codereview.webrtc.org/1688143003/ )
Reason for revert:
The delay stats are high.

Original issue's description:
> Update histogram "WebRTC.Video.OnewayDelayInMs" to use the estimated one-way delay.
> Previous logged delay was: network delay (rtt/2) + jitter delay + decode time + render delay.
>
> Make capture time in local timebase available for decoded VP9 video frames (propagate ntp_time_ms from EncodedImage to decoded VideoFrame).
>
> BUG=
>
> Committed: https://crrev.com/5249599a9b69ad9c2d513210d694719f1011f977
> Cr-Commit-Position: refs/heads/master@{#11901}

TBR=stefan@webrtc.org,pbos@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:603838

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

Cr-Commit-Position: refs/heads/master@{#12400}
2016-04-18 07:41:09 +00:00
00b62b0849 Remove QualityScaler kDefaultLowQpDenominator.
This denominator doesn't make any semantic sense, it's better to use
real thresholds for when things look "good" or "bad" rather than
fractions of a max QP.

BUG=webrtc:5678
R=danilchap@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12363}
2016-04-14 15:04:10 +00:00
cbac40d321 Reland of Make QualityScaler more responsive to downgrades. (patchset #1 id:1 of https://codereview.webrtc.org/1880103002/ )
Reason for revert:
Regressed behavior is actually desirable (go down to 360p instead of producing super-bad 720p).

Original issue's description:
> Revert of Make QualityScaler more responsive to downgrades. (patchset #3 id:40001 of https://codereview.webrtc.org/1830593003/ )
>
> Reason for revert:
> Speculative revert: want to see if this causes the regression in https://crbug.com/602621
>
> Original issue's description:
> > Make QualityScaler more responsive to downgrades.
> >
> > Permits going from HD to QVGA in 6 seconds instead of 10. Also adds
> > windows for going up quickly in the beginning of a call (before any
> > downscaling happens due to bad quality).
> >
> > BUG=webrtc:5678
> > R=glaznev@webrtc.org, stefan@webrtc.org
> >
> > Committed: https://crrev.com/85829fd90cc4e7a91c9857921b19e8fc126aeb60
> > Cr-Commit-Position: refs/heads/master@{#12219}
>
> TBR=glaznev@webrtc.org,stefan@webrtc.org,pbos@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:5678
> NOTRY=true
>
> Committed: https://crrev.com/19b4fecf08e3fe215e431a260fb673553c15e569
> Cr-Commit-Position: refs/heads/master@{#12331}

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

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

Cr-Commit-Position: refs/heads/master@{#12341}
2016-04-13 09:51:10 +00:00
19b4fecf08 Revert of Make QualityScaler more responsive to downgrades. (patchset #3 id:40001 of https://codereview.webrtc.org/1830593003/ )
Reason for revert:
Speculative revert: want to see if this causes the regression in https://crbug.com/602621

Original issue's description:
> Make QualityScaler more responsive to downgrades.
>
> Permits going from HD to QVGA in 6 seconds instead of 10. Also adds
> windows for going up quickly in the beginning of a call (before any
> downscaling happens due to bad quality).
>
> BUG=webrtc:5678
> R=glaznev@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/85829fd90cc4e7a91c9857921b19e8fc126aeb60
> Cr-Commit-Position: refs/heads/master@{#12219}

TBR=glaznev@webrtc.org,stefan@webrtc.org,pbos@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5678
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#12331}
2016-04-12 16:06:02 +00:00
afe1f74c04 Make sure temporal layered screenshare frames are sent in at least 2s.
If a very large frame is sent (high res slide change) when the available
send bitrate is very low, the it might take many seconds before any new
frames are emitted as the accrued debt will take time to pay off.

Add a bailout, so that if a frame hasn't been sent for 2 seconds, cancel
the debt immediately, even if the target bitrate is then exceeded.

BUG=webrtc:5750

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

Cr-Commit-Position: refs/heads/master@{#12328}
2016-04-12 09:45:20 +00:00
7f315883f0 vp8-intergationtest: Adjust a parameter in resize test.
Needed for new libvpx roll.

TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12324}
2016-04-12 04:02:51 +00:00
9ff9c6540b iOS h264: Request keyframe after coming back from background.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12319}
2016-04-11 18:40:36 +00:00
7d06a8cfe4 Add CoreVideoFrameBuffer.
- Makes vt h264 decoder output CoreVideoFrameBuffer
- Makes iOS renderer convert frame buffer if it is not i420

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12224}
2016-04-04 21:10:47 +00:00
85829fd90c Make QualityScaler more responsive to downgrades.
Permits going from HD to QVGA in 6 seconds instead of 10. Also adds
windows for going up quickly in the beginning of a call (before any
downscaling happens due to bad quality).

BUG=webrtc:5678
R=glaznev@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12219}
2016-04-04 16:11:18 +00:00
fecb7c3c50 Use mobile platform settings for VP8 and VP9 decoders on all Android builds.
BUG=b/27877683
R=jackychen@webrtc.org, marpan@google.com, marpan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12185}
2016-03-31 21:23:33 +00:00
118ef00594 Add histogram stats for average QP per frame for VP8 (for sent video streams):
- "WebRTC.Video.Encoded.Qp.Vp8"
- "WebRTC.Video.Encoded.Qp.Vp8.S0"
- "WebRTC.Video.Encoded.Qp.Vp8.S1"
- "WebRTC.Video.Encoded.Qp.Vp8.S2"

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12174}
2016-03-31 07:00:25 +00:00
d53c389550 Shorten single-stream VP8 HW implementation names.
Removes "SimulcastEncoderAdapter" from single-stream HW VP8 even though
they are wrapped in a SimulcastEncoderAdapter.

BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12161}
2016-03-30 15:04:04 +00:00
58d992e025 Add macros for ability to log samples that are added to histograms (RTC_LOGGED_*).
Adds logging of:
- video stats that are recorded when a stream is removed
- bitrate stats that are recorded at the end of a call
- initial bwe rampup stats

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12133}
2016-03-29 09:15:11 +00:00
94a23f04af Reland "Add check_deps rules in DEPS files."
Relanding https://codereview.webrtc.org/1796413002/
without the change to the openmax_dl include path
(which broke downstream code).

TBR=tommi@webrtc.org
BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc

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

Cr-Commit-Position: refs/heads/master@{#12031}
2016-03-17 11:05:50 +00:00
56cf60e717 Revert of Add check_deps rules in DEPS files. (patchset #2 id:60001 of https://codereview.webrtc.org/1796413002/ )
Reason for revert:
The openmax_dl include change breaks downstream projects.

Original issue's description:
> Add check_deps rules in DEPS files.
>
> Add fine-grained check_deps rules for all of WebRTC.
> This will help both maintaining sane dependencies and provides a way
> to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
>
> Example:
> buildtools/checkdeps/graphdeps.py --root=. --format=png \
> --out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
> --excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
>
> will produce a neat webrtc.png image showcasing the dependencies
> (according to the DEPS file) for the bitrate_controller module.
> Some dependencies are filtered out for readability.
>
> BUG=webrtc:5623
> TESTED=Passing runs using:
> buildtools/checkdeps/checkdeps.py --root=. talk
> buildtools/checkdeps/checkdeps.py --root=. webrtc
>
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/086f851b7b9b4bcbd4fe507c3bf83b760bd7f4d9
> Cr-Commit-Position: refs/heads/master@{#12008}

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

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

Cr-Commit-Position: refs/heads/master@{#12009}
2016-03-16 00:41:04 +00:00
086f851b7b Add check_deps rules in DEPS files.
Add fine-grained check_deps rules for all of WebRTC.
This will help both maintaining sane dependencies and provides a way
to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.

Example:
buildtools/checkdeps/graphdeps.py --root=. --format=png \
--out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
--excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'

will produce a neat webrtc.png image showcasing the dependencies
(according to the DEPS file) for the bitrate_controller module.
Some dependencies are filtered out for readability.

BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc

R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12008}
2016-03-16 00:22:53 +00:00
5ed5ed953d Fix VideoToolbox backgrounding issues.
When the iOS application is not in the foreground, the hardware encoder and
decoder become invalidated. There doesn't seem to be a way to query their state
so we don't know they're invalid until we get an error code after an
encode/decode request. To solve the issue, we just don't encode/decode when the
app is not active, and reinitialize the encoder/decoder when the app is active
again.

Also fixes a leak in the decoder.

BUG=webrtc:4081

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

Cr-Commit-Position: refs/heads/master@{#11916}
2016-03-08 18:51:58 +00:00
5249599a9b Update histogram "WebRTC.Video.OnewayDelayInMs" to use the estimated one-way delay.
Previous logged delay was: network delay (rtt/2) + jitter delay + decode time + render delay.

Make capture time in local timebase available for decoded VP9 video frames (propagate ntp_time_ms from EncodedImage to decoded VideoFrame).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11901}
2016-03-08 10:10:24 +00:00
e26e78784b Roll chromium_revision ee31124..508edd3 (378158:379249)
This includes renaming back libvpx_new to libvpx in
https://codereview.chromium.org/1765703002

Add symlink to src/mojo as workaround while figuring out how to fix
this upstream in Chromium. See webrtc:5629.

Change log: ee31124..508edd3
Full diff: ee31124..508edd3

Changed dependencies:
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/6d49157..708db16
* src/third_party/libvpx_new/source/libvpx: https://chromium.googlesource.com/webm/libvpx.git/+log/89cc682..None
* src/tools/swarming_client: https://chromium.googlesource.com/external/swarming.client.git/+log/a72f46e..df6e95e
DEPS diff: https://chromium.googlesource.com/chromium/src/+/ee31124..508edd3/DEPS

No update to Clang.

BUG=webrtc:5629
TBR=marpan@webrtc.org, stefan@webrtc.org,
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11879}
2016-03-04 22:39:32 +00:00
b0fdfea9e8 Add stats (histograms) for vp8 screenshare layers
BUG=

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

Cr-Commit-Position: refs/heads/master@{#11830}
2016-03-01 13:51:20 +00:00
3f55dea259 Replace scoped_ptr with unique_ptr in webrtc/modules/video_coding/
BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11814}
2016-02-29 13:52:06 +00:00
12f4cda086 Histograms for H264EncoderImpl/H264DecoderImpl
initialization and errors.

The stats are counts using enumeration, an instance of
H264EncoderImpl/H264DecoderImpl will report at most 1 Init
and 1 Error for its entire lifetime. This is to avoid
spamming reports if initialization or coding fails and it
retries in a loop. The Init stats will give us an idea of
usage counts for the encoder/decoder. The Error stats will
give us an idea of how many of these usages encounters some
type of problem, such as encode or decode errors.

- WebRTC.Video.H264EncoderImpl.Event:
  * kH264EncoderEventInit: Occurs at InitEncode.
  * kH264EncoderEventError: Occurs if any type of error
    occurs during initialization or encoding.
- WebRTC.Video.H264DecoderImpl.Event:
  * kH264DecoderEventInit: Occurs at InitDecode.
  * kH264DecoderEventError: Occurs if any type of error
    occurs during initialization, AVGetBuffer2 or decoding.

Chromium sibling CL:
https://codereview.chromium.org/1719273002/

BUG=chromium:500605, chromium:468365

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

Cr-Commit-Position: refs/heads/master@{#11736}
2016-02-24 11:03:11 +00:00
f75d008235 Bitrate controller for VideoToolbox encoder.
Also fixes a crash on encoder Release.

BUG=webrtc:4081

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

Cr-Commit-Position: refs/heads/master@{#11729}
2016-02-24 06:49:48 +00:00
91fe304b0f vp9: Adjust parameter for a test in videoprocessor_integrationtest.cc
Needed for upcoming libvpx roll.

TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11693}
2016-02-19 23:31:29 +00:00
a9d0892946 Add initial bitrate and frame resolution parameters to quality scaler.
- Scale down to VGA immediately if call starts with HD resolution
and bitrate below 500 kbps.
- Adjust QP threshold for HW VP8 encoder to scale down faster.

BUG=b/26504665
R=mflodman@webrtc.org, pbos@webrtc.org, sprang@google.com, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11692}
2016-02-19 23:24:12 +00:00
28c99bc44a iOS: Include legacy objc API in all.gyp + fix H264 libyuv dependency
The legacy objc API is not included in the GYP generation if include_tests=0.
This causes problems downstream in some cases, so it's changed in this CL.

The libyuv dependency needs to be possible to disable using the build_libyuv
GYP variable.

NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11652}
2016-02-17 13:38:35 +00:00