4031 Commits

Author SHA1 Message Date
Erik Språng
51e60305e6 Update RateStatistics to handle too-little-data case.
To avoid the case where a single data point or too short window is used,
causing bad behavior due to bad stats, update RateStatistics to return
an Optional rather than a plain rate.

There was also a strange off by one bug where the rate was slightly
overestimated (N + 1 buckets, N ms time window).

These changes requires updates to a number of places, and may very well
cause seeming perf regressions (but the stats were probablty more wrong
previously).

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

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

Cr-Commit-Position: refs/heads/master@{#13103}
2016-06-10 20:13:33 +00:00
nisse
602844aa5e Delete some unused header files.
NOTRY=True # two of the androids bots are not cooperating
BUG=

Review-Url: https://codereview.webrtc.org/2057533002
Cr-Commit-Position: refs/heads/master@{#13099}
2016-06-10 11:41:13 +00:00
kjellander
94cee3111c GN: Enable api,media,pc and p2p for the 'webrtc' target.
These parts were commented out to avoid breaking the Chromium
WebRTC FYI bots. Include them in the WebRTC build to make our bots
build as many as possible of our GN targets.

BUG=webrtc:5949
NOTRY=True
TBR=phoglund@webrtc.org

Review-Url: https://codereview.webrtc.org/2054903002
Cr-Commit-Position: refs/heads/master@{#13097}
2016-06-10 08:57:05 +00:00
Åsa Persson
2b9423f7a1 Revert of Re-enable UBsan on AGC. (patchset #8 id:300001 of https://codereview.webrtc.org/2003623003/ )
Reason for revert:
Breaks bot.

Original issue's description:
> Re-enable UBsan on AGC.
>
> BUG=webrtc:5530
>
> Committed: https://crrev.com/293c86d67384c15f46b8296096a62a14b4a58d33
> Cr-Commit-Position: refs/heads/master@{#13034}

R=kjellander@webrtc.org, peah@webrtc.org
TBR=kjellander@webrtc.org, minyue@webrtc.org, peah@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5530

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

Cr-Commit-Position: refs/heads/master@{#13096}
2016-06-10 07:12:43 +00:00
Henrik Kjellander
d4070c63d9 GN: Fix Chromium breakage for remote_bitrate_estimator
In https://codereview.webrtc.org/2040313004 a config was changed
incorrectly and a dependency on rtc_base_approved is also missing.

BUG=webrtc:5949
TBR=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13088}
2016-06-09 09:55:40 +00:00
kjellander
5c1d043726 Fix GYP/GN for webrtc/modules/remote_bitrate_estimator
Sync the GYP and GN targets and update the name of the GN one
to 'remote_bitrate_estimator'.
Move the GYP variable 'enable_bwe_test_logging' into the local scope.
Remove redundant entries in modules.gyp.

These are preparations related to the GN migration.

BUG=webrtc:5949
TESTED=Ran GYP with the default variables and with
-Denable_bwe_test_logging=1. Compiled remote_bitrate_estimator
and verified that bwe_test_logging.cc is compiled only when
set.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2040313004
Cr-Commit-Position: refs/heads/master@{#13087}
2016-06-09 09:41:02 +00:00
sergeyu
f2a1c89241 Add r-value constructor for RefCountedObject.
Previously RefCountedObject was passing all parameters by value.
This meant that it was hard to use it with movable types, such
as unique_ptr<>. Now there is a constructor that takes r-value,
which means that RefCountedObject<std::unique_ptr<foo>> can be
initialized by passing std::unique_ptr<foo> to the constructor.

Review-Url: https://codereview.webrtc.org/2036123002
Cr-Commit-Position: refs/heads/master@{#13079}
2016-06-08 22:52:28 +00:00
philipel
bde418d84c Renamed video_coding/packet_buffer_unittest.cc.
Renamed video_coding/packet_buffer_unittest.cc to
video_coding/video_packet_buffer_unittest.cc

BUG=webrtc:5949
TBR=stefan@webrtc.org

Review-Url: https://codereview.webrtc.org/2049693002
Cr-Commit-Position: refs/heads/master@{#13074}
2016-06-08 19:09:45 +00:00
danilchap
2019afd0ef Replaced ACCESS_ON alias with GUARDED_BY macros
to fix projects that has own copy of base/thread_annotation.h

R=åsapersson
NOTRY=true

Review-Url: https://codereview.webrtc.org/2048113002
Cr-Commit-Position: refs/heads/master@{#13073}
2016-06-08 18:34:18 +00:00
aluebs
e8f8f6037c Only update Intelligibility Enhancer gains every 10 chunks
This reduces its complexity by a factor of 2.7x total.
The mean error introduced by this is in the 6 different noise scenarios and 6 different speech signals tested is below -52dB.

Review-Url: https://codereview.webrtc.org/2035213002
Cr-Commit-Position: refs/heads/master@{#13072}
2016-06-08 16:53:23 +00:00
henrik.lundin
919518613f NetEq: Rename Nack to NackTracker to avoid name collisions in GN
BUG=webrtc:5949
NOTRY=True
R=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2045243002
Cr-Commit-Position: refs/heads/master@{#13069}
2016-06-08 13:43:49 +00:00
peah
bbe423312d Change name of files and class in agc/histogram* in order to avoid issue file-name clash in build files
The changes are done in several patches in order to make
the review easier.

NOTRY=True
BUG=webrtc:5949

Review-Url: https://codereview.webrtc.org/2051443002
Cr-Commit-Position: refs/heads/master@{#13068}
2016-06-08 13:42:08 +00:00
kwiberg
a10740239d Fix UBSan errors (signed integer overflow)
WebRtcSpl_CrossCorrelation and WebRtcSpl_DotProductWithScale compute
the int32 sum of pairwise products from two int16 arrays. So as to
avoid overflow (which could otherwise happen when as little as two
products were summed), the products are right-shifted by an amount
specified by the caller.

This CL changes WebRtcIlbcfix_MyCorr and WebRtcIlbcfix_Smooth to give
sufficient right-shift amounts, instead of ones that may be too small
and cause overflow.

BUG=chromium:601787

Review-Url: https://codereview.webrtc.org/2014033002
Cr-Commit-Position: refs/heads/master@{#13066}
2016-06-08 12:24:47 +00:00
kjellander
3bcedd3595 GN: Add SDK tests to rtc_unittests.
In https://codereview.webrtc.org/2034923003 it was discovered
that a test binary rtc_sdk_peerconnection_objc_tests was
a dependency to rtc_unittests. Unfortunately gtest doesn't
include dependent executables into the same test executable;
only libraries (so theses tests weren't run).

This CL incorporates those tests into rtc_unittests and
does the same changes to the GN build.

BUG=webrtc:5949
TESTED=Built and ran rtc_unittests locally on Mac.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2041743003
Cr-Commit-Position: refs/heads/master@{#13060}
2016-06-08 08:14:22 +00:00
isheriff
6b4b5f3770 Add sender controlled playout delay limits
This CL adds support for an extension on RTP frames to allow the sender
to specify the minimum and maximum playout delay limits.

The receiver makes a best-effort attempt to keep the capture-to-render delay
within this range. This allows different types of application to specify
different end-to-end delay goals. For example gaming can support rendering
of frames as soon as received on receiver to minimize delay. A movie playback
application can specify a minimum playout delay to allow fixed buffering
in presence of network jitter.

There are no tests at this time and most of testing is done with chromium
webrtc prototype.

On chromoting performance tests, this extension helps bring down end-to-end
delay by about 150 ms on small frames.

BUG=webrtc:5895

Review-Url: https://codereview.webrtc.org/2007743003
Cr-Commit-Position: refs/heads/master@{#13059}
2016-06-08 07:24:30 +00:00
sergeyu
5d910286e1 Use std::unique_ptr<> to pass frame ownership in DesktopCapturer impls.
Previously raw pointers were used for owned DesktopFrame instances.
Updated all screen and window capturer implementations to use
std::unique_ptr<>.

Also includes some other cleanups in the capturers:
 - s/NULL/nullptr
 - moved default initializers to class definition.

BUG=webrtc:5950

Review-Url: https://codereview.webrtc.org/1988783003
Cr-Commit-Position: refs/heads/master@{#13058}
2016-06-07 23:42:07 +00:00
Erik Språng
6ebdf6b2cc Fix issue with parsing of incorrect (empty) Stap-A H264 NAL units.
Stap-A packets should be ignored if NAL unit size is less than one,
since that won't even fit the mandatory type header byte.

BUG=chromium:617097
R=pbos@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13057}
2016-06-07 16:01:38 +00:00
Alex Glaznev
c88f558135 Fix Android audio playback mute.
TBR=henrika@webrtc.org

BUG=b/29066336

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

Cr-Commit-Position: refs/heads/master@{#13051}
2016-06-06 17:33:55 +00:00
Alex Glaznev
080be51294 Make WebRTCAudioTrack class public.
To access its public API.

TBR=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13044}
2016-06-03 22:33:39 +00:00
mbarbella
7bf939c720 Check for out-of-bounds access on |kIntrpCoef|.
BUG=chromium:600953

Review-Url: https://codereview.webrtc.org/2025493002
Cr-Commit-Position: refs/heads/master@{#13039}
2016-06-03 17:06:05 +00:00
philipel
647998cccf Use picture id to check continuity between frames.
BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2036913003
Cr-Commit-Position: refs/heads/master@{#13038}
2016-06-03 16:40:24 +00:00
minyue
293c86d673 Re-enable UBsan on AGC.
BUG=webrtc:5530

Review-Url: https://codereview.webrtc.org/2003623003
Cr-Commit-Position: refs/heads/master@{#13034}
2016-06-03 13:07:41 +00:00
sergeyu
b4c7b8365d Revert of Use std::unique_ptr<> to pass frame ownership in DesktopCapturer impls. (patchset #7 id:140001 of https://codereview.webrtc.org/1988783003/ )
Reason for revert:
Broke chromium builder

Original issue's description:
> Use std::unique_ptr<> to pass frame ownership in DesktopCapturer impls.
>
> Previously raw pointers were used for owned DesktopFrame instances.
> Updated all screen and window capturer implementations to use
> std::unique_ptr<>.
>
> Also includes some other cleanups in the capturers:
>  - s/NULL/nullptr
>  - moved default initializers to class definition.
>
> BUG=webrtc:5950
>
> Committed: https://crrev.com/4a627a8c13554d12412cabb8f751caee6e61ee32
> Cr-Commit-Position: refs/heads/master@{#13032}

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

Review-Url: https://codereview.webrtc.org/2030333003
Cr-Commit-Position: refs/heads/master@{#13033}
2016-06-03 12:56:47 +00:00
sergeyu
4a627a8c13 Use std::unique_ptr<> to pass frame ownership in DesktopCapturer impls.
Previously raw pointers were used for owned DesktopFrame instances.
Updated all screen and window capturer implementations to use
std::unique_ptr<>.

Also includes some other cleanups in the capturers:
 - s/NULL/nullptr
 - moved default initializers to class definition.

BUG=webrtc:5950

Review-Url: https://codereview.webrtc.org/1988783003
Cr-Commit-Position: refs/heads/master@{#13032}
2016-06-03 12:15:32 +00:00
henrika
b50e84509f Adds WebRtcAudioTrack.setSpeakerMute() API
BUG=NONE

Review-Url: https://codereview.webrtc.org/2025423003
Cr-Commit-Position: refs/heads/master@{#13029}
2016-06-03 09:56:26 +00:00
stefan
fc715f584f DCHECK that the red payload type doesn't have invalid values when FEC is enabled.
Review-Url: https://codereview.webrtc.org/2036083002
Cr-Commit-Position: refs/heads/master@{#13028}
2016-06-03 08:45:46 +00:00
philipel
1a93cdeabe BitrateProber now correctly change state to kWait when the last probing
cluster has been spent.

BUG=webrtc:5859

Review-Url: https://codereview.webrtc.org/2033073002
Cr-Commit-Position: refs/heads/master@{#13027}
2016-06-03 08:41:50 +00:00
stefan
846b2d9c5c Reduce logging frequency in bwe simulations.
BUG=webrtc:5962
NOTRY=true

Review-Url: https://codereview.webrtc.org/2030903002
Cr-Commit-Position: refs/heads/master@{#13025}
2016-06-03 07:20:40 +00:00
stefan
8f4c77fea1 Always send RED headers if configured.
This shouldn't be needed, but because the receiver assumes RTX packets
contain RED if configured to receive them (due to an incompatibility
issue), we also have to make sure we send them for now.

BUG=webrtc:5675

Review-Url: https://codereview.webrtc.org/2033763002
Cr-Commit-Position: refs/heads/master@{#13024}
2016-06-03 07:16:54 +00:00
guidou
72d41aa6da Revert of Update the BWE when the network route changes. (patchset #5 id:180001 of https://codereview.webrtc.org/2000063003/ )
Reason for revert:
Speculative revert due to failure in Mac Tester FYI bot. See https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Tester/builds/30642

Will reland if the revert doesn't fix the bot.

Original issue's description:
> Update the BWE when the network route changes.
>
> BUG=
>
> Committed: https://crrev.com/2221e1cd1dd19ae16c87c14bbea92fa62d15154d
> Cr-Commit-Position: refs/heads/master@{#13021}

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

Review-Url: https://codereview.webrtc.org/2030283002
Cr-Commit-Position: refs/heads/master@{#13023}
2016-06-03 06:24:58 +00:00
honghaiz
2221e1cd1d Update the BWE when the network route changes.
BUG=

Review-Url: https://codereview.webrtc.org/2000063003
Cr-Commit-Position: refs/heads/master@{#13021}
2016-06-02 21:48:11 +00:00
Per
69b332df83 Move logic for calculating needed bitrate overhead used by NACK and FEC to VideoSender.
This cl split the class MediaOptimization into two parts. One that deals with frame dropping and stats and one new class called ProtectionBitrateCalculator that deals with  calculating the needed FEC parameters and how much of the estimated network bitrate that can be used by an encoder

Note that the logic of how FEC and the needed bitrates is not changed.

BUG=webrtc:5687
R=asapersson@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13018}
2016-06-02 13:45:53 +00:00
Peter Bostrom
58d4fe7be9 Reduce VT keyframe frequency.
Also adds data rate limit in addition to average bitrate.

BUG=webrtc:5815
R=mflodman@webrtc.org, pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13017}
2016-06-02 13:36:48 +00:00
danilchap
b684bd10be [rtcp] ExtendedJitterReports::Parse updated not to use RTCPUtility
BUG=webrtc:5260
R=åsapersson

Review-Url: https://codereview.webrtc.org/2025843002
Cr-Commit-Position: refs/heads/master@{#13016}
2016-06-02 12:07:00 +00:00
kwiberg
f882880947 AudioDecoder: Document that the sample rate and number of channels is constant
Review-Url: https://codereview.webrtc.org/2029273003
Cr-Commit-Position: refs/heads/master@{#13012}
2016-06-02 10:19:26 +00:00
kwiberg
abe95ba323 AudioDecoderIsacT: Require caller to always specify sample rate
This gets rid of the complex & icky state where the sample rate is not
yet determined.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2020353003
Cr-Commit-Position: refs/heads/master@{#13011}
2016-06-02 09:59:02 +00:00
sprang
52033d6ea1 Add H264 bitstream rewriting to limit frame reordering marker in header
The VUI part an SPS may specify max_num_reorder_frames and
max_dec_frame_buffering. These may cause a decoder to buffer a number
of frame prior allowing decode, leading to delays, even if no frames
using such references (ie B-frames) are sent.

Because of this we update any SPS block emitted by the encoder.

Also, a bunch of refactoring of H264-related code to reduce code
duplication.

BUG=

Review-Url: https://codereview.webrtc.org/1979443004
Cr-Commit-Position: refs/heads/master@{#13010}
2016-06-02 09:43:38 +00:00
kjellander
bac0412e7f GN: Add system_wrappers_unittests, tools and tools_unittests
BUG=webrtc:5949
TESTED=Built and ran the tests on Mac.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2025343002
Cr-Commit-Position: refs/heads/master@{#13007}
2016-06-02 09:18:57 +00:00
kjellander
8f4419b074 GN: Replace Windows suppressions of warning 4267 with config.
This makes the GN configurations easier to read.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2020343003
Cr-Commit-Position: refs/heads/master@{#13006}
2016-06-02 09:09:56 +00:00
nisse
69adc9c7c0 Delete unused code in webrtc_libyuv.cc.
Delete unused ConvertFromYV12, and dead prototypes ConvertRGB24ToARGB
ConvertNV12ToRGB565. Move Calc16ByteAlignedStride to the test file
where it is used.

BUG=

Review-Url: https://codereview.webrtc.org/2021843002
Cr-Commit-Position: refs/heads/master@{#13003}
2016-06-02 07:58:43 +00:00
philipel
a1ed0b3241 Revert "Revert of Propagate probing cluster id to SendTimeHistory. (patchset #5 id:80001 of https://codereview.webrtc.org/2005313003/ )"
This reverts commit 46948c17fd09e4957bebc8ea61f0a8e77ff84b48.
TBR=mflodman@webrtc.org
BUG=webrtc:5859

Review-Url: https://codereview.webrtc.org/2032473002
Cr-Commit-Position: refs/heads/master@{#12992}
2016-06-01 13:31:22 +00:00
philipel
46948c17fd Revert of Propagate probing cluster id to SendTimeHistory. (patchset #5 id:80001 of https://codereview.webrtc.org/2005313003/ )
Reason for revert:
Breaks google3 buildbot:  http://webrtc-buildbot-master.mtv.corp.google.com:21000/builders/WebRTC%20google3%20Importer/builds/8640

Original issue's description:
> Propagate probing cluster id to SendTimeHistory, both for packets and padding.
>
> BUG=webrtc:5859
>
> Committed: https://crrev.com/5be28c848b91bc6e4800eac07a3f5ac09a32ad70
> Cr-Commit-Position: refs/heads/master@{#12985}

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

Review-Url: https://codereview.webrtc.org/2032463003
Cr-Commit-Position: refs/heads/master@{#12987}
2016-06-01 11:04:49 +00:00
philipel
5be28c848b Propagate probing cluster id to SendTimeHistory, both for packets and padding.
BUG=webrtc:5859

Review-Url: https://codereview.webrtc.org/2005313003
Cr-Commit-Position: refs/heads/master@{#12985}
2016-06-01 09:49:29 +00:00
henrika
521f7a8db7 Moves ownership of OpenSL engine object to Android audio manager with the goal of adding support for OpenSL ES based audio capture.
BUG=webrtc:5925

Review-Url: https://codereview.webrtc.org/2019223004
Cr-Commit-Position: refs/heads/master@{#12975}
2016-05-31 14:03:26 +00:00
kwiberg
c0f2dcf9ed NetEq decoder database: Don't keep track of sample rate for builtin decoders
This allows us to get rid of the function that computes it, which gets
us one step closer to getting rid of the NetEqDecoder type.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2021063002
Cr-Commit-Position: refs/heads/master@{#12974}
2016-05-31 13:28:09 +00:00
danilchap
938c5ddf0b [rtcp] RapidResyncRequest::Parse updated not to use RTCPUtility
BUG=webrtc:5260
R=åsapersson

Review-Url: https://codereview.webrtc.org/2020203002
Cr-Commit-Position: refs/heads/master@{#12972}
2016-05-31 11:30:59 +00:00
kjellander
208d19845d Rename APK tests workaround to make it more generic.
We plan to add junit tests running with Robolectric
so naming these files "apk" is slightly confusing.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2020213002
Cr-Commit-Position: refs/heads/master@{#12971}
2016-05-31 11:01:47 +00:00
kwiberg
6c2eab34f8 AudioDecoder: New method SampleRateHz, + implementations for our codecs
This will let NetEq (and the factory, and every layer in between) keep
track of just the decoder, instead of decoder and sample rate.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2024633002
Cr-Commit-Position: refs/heads/master@{#12968}
2016-05-31 09:46:28 +00:00
peah
946f36ef39 Added diagnostic AEC debug logpoints for the purpose
of simplifying offline AEC issue analysis.

BUG=

Review-Url: https://codereview.webrtc.org/2016143003
Cr-Commit-Position: refs/heads/master@{#12967}
2016-05-31 09:25:24 +00:00
danilchap
0fc37d7dec [rtcp] Fir/Sli/Rpsi updated not to use RTCPUtility
BUG=webrtc:5260

Review-Url: https://codereview.webrtc.org/2023803002
Cr-Commit-Position: refs/heads/master@{#12965}
2016-05-31 08:36:44 +00:00