301 Commits

Author SHA1 Message Date
nisse
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
nisse
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
nisse
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
tkchin
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
emircan
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
Peter Boström
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
pbos
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
kjellander
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
Peter Boström
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
Peter Boström
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
asapersson
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
Peter Boström
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
asapersson
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
Peter Boström
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
pbos
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
phoglund
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
sprang
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
Marco
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
tkchin
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
tkchin
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
Peter Boström
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
Alex Glaznev
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
asapersson
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
Peter Boström
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
asapersson
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
kjellander@webrtc.org
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
kjellander
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
kjellander@webrtc.org
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
tkchin
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
asapersson
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
kjellander
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
sprang
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
kwiberg
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
hbos
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
tkchin
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
Marco
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
Alex Glaznev
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
kjellander
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
kjellander
0206000a66 iOS: Add resource files for tests and implement OutputPath
With this change the following tests have been successfully
passing in the iOS Simulator for iPhone 5 and iOS 9:
* audio_decoder_unittests
* common_video_unittests
* modules_tests
* rtc_api_objc_tests
* rtc_pc_unittests
* system_wrappers_unittests
* voice_engine_unittests

The modules_unittests and common_audio_unittests are
handled in https://codereview.webrtc.org/1698033002/

BUG=webrtc:4755
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11646}
2016-02-17 06:06:17 +00:00
Peter Boström
b72dada927 Remove Reset from conditionally-compiled decoders.
Reset is no longer called but removal of them was missed in a previous
commit.

BUG=webrtc:5475
TBR=hbos@webrtc.org,tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11603}
2016-02-12 14:57:03 +00:00
hbos
0715a83a07 Avoid OpenH264 encoder bug for #threads > 1 on Mac and Chromium+Sandbox.
Until the bug has been further investigated, we're limiting the number
of threads to 1 to avoid problems. See crbug.com/583348.

BUG=chromium:500605, chromium:468365, chromium:583348

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

Cr-Commit-Position: refs/heads/master@{#11536}
2016-02-09 10:34:34 +00:00
kjellander
f6b5509229 Fix GYP and GN references that are invalid in Chromium builds.
There were a couple of GN and GYP references that were incorrect in Chromium builds:
- GN references between WebRTC targets must be using relative paths, not absolute.
- GYP references between WebRTC targets must be using the <(webrtc_root)v variable
  in order to be expanded to the correct path in a Chromium build.

NOTRY=True
TBR=hjon@webrtc.org, hbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11521}
2016-02-08 07:04:33 +00:00
hbos
900f97534b H264: Improve FFmpeg decoder performance by using I420BufferPool.
Had to update I420BufferPool to allow zero-initializing buffers.

BUG=chromium:500605, chromium:468365, webrtc:5428

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

Cr-Commit-Position: refs/heads/master@{#11505}
2016-02-05 16:08:39 +00:00
sprang
2ddb8bd359 Avoid undefined behavior in vp8 screenshare_layers
active_layer_ could be dereferenced while being -1...
Also added som DCHECKs

BUG=webrtc:5490

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

Cr-Commit-Position: refs/heads/master@{#11486}
2016-02-04 11:59:57 +00:00
hbos
9dc5928eb2 Ability to disable the effects of |rtc_use_h264| with DisableRtcUseH264.
Renamed the WEBRTC_THIRD_PARTY_H264 macro to WEBRTC_USE_H264 to match flag name.

The idea is to be able to turn off H264 from chromium with this function because...
1) The Chromium trybots will soon use this flag, we want to temporarily disable H264 from chromium even if flag is set in case something is broken. That way when we are ready to flip the switch the trybots will run our test code then and not after it is already enabled.
2) If feature is launched and we discover major problems we can easily disable H264 and merge with beta/stable.
3) Or, if feature is behind a *runtime* flag, this is how we would control if it is used or not.

The idea is to call DisableRtcUseH264 in chromium's PeerConnectionDependencyFactory.

BUG=chromium:500605, chromium:468365
NOTRY=True
NOPRESUBMIT=True

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

Cr-Commit-Position: refs/heads/master@{#11474}
2016-02-03 13:09:40 +00:00
Peter Boström
ed3277bf14 Deprecate VideoDecoder::Reset() and remove calls.
Removes calls to decoder reset and instead drops delta frames and
requests keyframes until one arrives.

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

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

Cr-Commit-Position: refs/heads/master@{#11460}
2016-02-02 14:40:13 +00:00
hbos
c5a39c2591 H264: Thread-safe InitializeFFmpeg. Flag to control if InitializeFFmpeg should be called.
New flag: rtc_initialize_ffmpeg, default value = !build_with_chromium.

In WebRTC standalone we initialize FFmpeg by default, in Chromium we don't by default.
Chromium is an external project that also use FFmpeg. If both projects do FFmpeg initialization code things will break. The flag makes it possible for other external projects than chromium to decide whether or not WebRTC should initialize FFmpeg.

BUG=chromium:500605, chromium:468365, webrtc:5427

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

Cr-Commit-Position: refs/heads/master@{#11456}
2016-02-02 10:30:57 +00:00
hbos
bab934bffe H.264 video codec support using OpenH264 (http://www.openh264.org/) for encoding and FFmpeg (https://www.ffmpeg.org/) for decoding.
It works on all platforms except Android and iOS (FFmpeg limitation).

Implemented behind compile time flags, off by default.
The plan is to have it enabled in Chrome (see bug), but not in Chromium/webrtc by default.

Flags to turn it on:
- rtc_use_h264 = true
- ffmpeg_branding = "Chrome" (or other brand that includes H.264 decoder)

Tests using H264:
- video_loopback --codec=H264
- screenshare_loopback --codec=H264
- video_engine_tests (EndToEndTest.SendsAndReceivesH264)

NOTRY=True
BUG=500605, 468365
BUG=https://bugs.chromium.org/p/webrtc/issues/detail?id=5424

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

Cr-Commit-Position: refs/heads/master@{#11390}
2016-01-27 09:36:07 +00:00
asapersson
7fd881743c Fix type of local encoded length variable from uint32_t to size_t.
BUG=chromium:571594

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

Cr-Commit-Position: refs/heads/master@{#11383}
2016-01-26 15:26:12 +00:00