Commit Graph

8774 Commits

Author SHA1 Message Date
pbos
2bad88d164 Prevent heap overflows for incorrect FEC packet lengths.
Bugs found by manual inspection of code, not by fuzzing or packet
replays. At least one of them confirmed by local fuzzing.

BUG=chromium:496094, webrtc:4771
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9542}
2015-07-06 10:09:15 +00:00
Erik Språng
468e62a974 Remove MimdRateControl and factories for RemoteBitrateEstimor.
BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9541}
2015-07-06 08:51:01 +00:00
Bjorn Volcker
d92f2674d7 audio_processing: Changed kMinDiffDelayMs from 50 to 60 ms
The UMA histograms WebRTC.Audio.AecSystemDelayJump and WebRTC.Audio.PlatformReportedStreamDelayJump triggers if the jump is larger than kMinDiffDelayMs.
Especially WebRTC.Audio.AecSystemDelayJump is sensitive around 50 ms differences, since the granularity is 4 ms and we can get a significant amount of hits at 52 ms.
Therefore, a change to 60 ms can make the logging more robust. The effect of not logging jumps in the interval 50-60 ms is of minor importance since they are not likely to affect the AEC performance. It's when we get values from ~100 ms and above that we should be worried.

Tested with a local ToT Chromium build where 52, 64 and 200 ms jumps were forced.

BUG=488124
TBR=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9540}
2015-07-05 08:46:10 +00:00
André Susano Pinto
72a8cee425 Targets should not depend on protobuf when enable_protobuf=0.
BUG=webrtc:4741
R=henrik.lundin@webrtc.org, stefan@webrtc.org, ivoc@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9539}
2015-07-03 15:53:22 +00:00
eblima
894ad94302 Fix occurrences of const typed declaration without initialization
This fixes compilation errors as the following:

error: constructor must explicitly initialize the const member

BUG=506663
R=aluebs@webrtc.org, tommi@webrtc.org

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>

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

Cr-Commit-Position: refs/heads/master@{#9538}
2015-07-03 15:34:40 +00:00
jbauch
ac8869ec5a Report metrics about negotiated ciphers.
This CL adds an API to the metrics observer interface to report negotiated
ciphers for WebRTC sessions. This can be used from Chromium for UMA metrics
later to get an idea which cipher suites are used by clients (e.g. compare
the use of DTLS 1.0 / 1.2).

BUG=428343

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

Cr-Commit-Position: refs/heads/master@{#9537}
2015-07-03 08:36:22 +00:00
henrik.lundin
366e95252a Follow-up: Remove old ReportedDelay AEC config
This is a follow-up to r9531, where the configuration ReportedDelay
was replaced by DelayAgnostic. The config was kept in the code to
avoid API breakages. In https://codereview.chromium.org/1219263003/
depending code has been updated to avoid breakages.

BUG=webrtc:4651
R=bjornv@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9536}
2015-07-03 07:50:13 +00:00
Karl Wiberg
2224294c52 iSAC: Functions for importing and exporting bandwidth est. info
They make it possible to send bandwidth estimation info from decoder
to encoder even if they are separate objects (which we want them to be
because multithreading).

R=henrik.lundin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9535}
2015-07-03 02:04:46 +00:00
pbos
cd4a9bd225 Remove decoder-thread instantiation for senders.
Reduces number of running (high-priority) threads, even though the
thread was practically blocked all the time.

Also adding DCHECKs to make sure we're not trying to use certain
sender-only methods on receivers and vice versa.

BUG=webrtc:1675, webrtc:1695
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9534}
2015-07-02 13:32:21 +00:00
pbos
db0cf7624e Add test for dropping repeated NTP timestamps.
Regression test for enforcing that frames with repeated or old NTP
timestamps are dropped.

BUG=chromium:480953, webrtc:4615
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9533}
2015-07-02 11:14:50 +00:00
kwiberg
f4eca64596 iSAC: Pad with zeros instead of random data, to make testing easier
Using random "garbage" bytes makes testing harder for no good reason.
Any deterministic sequence would do, but we choose all zeros because
it's simple.

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

Cr-Commit-Position: refs/heads/master@{#9532}
2015-07-02 09:10:11 +00:00
henrik.lundin
0f133b99c6 Rename APM Config ReportedDelay to DelayAgnostic
We use this Config struct for enabling/disabling the delay agnostic
AEC. This change renames it to DelayAgnostic for readability reasons.

NOTE: The logic is reversed in this CL. The old ReportedDelay config
turned DA-AEC off, while the new DelayAgnostic turns it on.

The old Config is kept in parallel with the new during a transition
period. This is to avoid problems with API breakages. During this
period, ReportedDelay is disabled or DelayAgnostic is enabled, DA-AEC
is engaged in APM.

BUG=webrtc:4651
R=bjornv@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9531}
2015-07-02 07:17:59 +00:00
tkchin
0d7dbde8cf Update AppRTCDemo resolution for iPhone6/6+
BUG=

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

Cr-Commit-Position: refs/heads/master@{#9530}
2015-07-02 01:26:40 +00:00
dcheng
a771bf8ee8 Fix some clang warnings with -Wmissing-braces in WebRTC.
Clang warns if there are missing braces around a subobject
initializer. The most common idiom that triggers this is:
  STRUCT s = {0};
if the first field of STRUCT is itself a struct. This can
be more simply written as:
  STRUCT s = {};
which also prevents the warning from firing.

Other instances of the warning have been fixed by adding
braces where appropriate.

BUG=505297
TBR=jiayl@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9529}
2015-07-02 00:52:18 +00:00
Zeke Chin
d830aeafe9 Add tkchin to video_coding OWNERS.
BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9528}
2015-07-01 23:01:56 +00:00
bemasc
0edd50ccb3 Support for onbufferedamountlow
Original review at https://webrtc-codereview.appspot.com/54679004/

BUG=https://code.google.com/p/chromium/issues/detail?id=496700

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

Cr-Commit-Position: refs/heads/master@{#9527}
2015-07-01 20:34:42 +00:00
pbos
545727ecce Move early-return in TimeToSendPadding.
Prevents taking send_critsect_ for checking sending status when not
actually intending to send padding.

BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9526}
2015-07-01 13:31:14 +00:00
pbos
bd2522abf7 Fail RTP parsing on excessive padding length.
BUG=webrtc:4771
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9525}
2015-07-01 12:35:56 +00:00
phoglund
8b80fb64e0 Roll chromium_revision fbf756f..3ead4bc (336289:336983)
Relevant changes:
* src/third_party/boringssl/src: 7e8f2ba..de24aad
* src/third_party/icu: c3f7916..7fe225d
* src/third_party/libvpx: db3f347..aa9b5f1
* src/tools/grit: 1f898f7..1dac9ae
Details: fbf756f..3ead4bc/DEPS

Clang version was not updated in this roll.

R=pbos@webrtc.org
BUG=chromium:506078

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

Cr-Commit-Position: refs/heads/master@{#9524}
2015-07-01 10:46:03 +00:00
pbos
4daa90eed7 Prevent size_t underflow in H264 SPS parsing.
BUG=webrtc:4771
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9523}
2015-07-01 10:00:20 +00:00
pbos
2f1509395b Prevent OOB read on truncated H264 headers.
Prevents OOB reads on truncated FU-A NAL units, StapA headers and past
truncation just after StapA headers.

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

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

Cr-Commit-Position: refs/heads/master@{#9522}
2015-06-30 15:23:42 +00:00
pbos
7ada923a94 Prevent OOB reads for zero-length H264 payloads.
Also fixes zero-length OOB reads for generic packetization.

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

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

Cr-Commit-Position: refs/heads/master@{#9521}
2015-06-30 12:09:47 +00:00
pbos
48c3839e70 Prevent depacketizer OOB reads on zero-length VP8 payload.
BUG=webrtc:4771
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9520}
2015-06-30 09:12:09 +00:00
terelius
6e355af348 Added fields for configuration information to the protobuf format
in the ACMDump. The ACMDump interface itself is not updated, so there
is no way (yet) to actually write the configuration fields.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9519}
2015-06-30 08:51:19 +00:00
pbos
2e43b26c78 Prevent OOB reads in FEC packets without complete RED headers.
BUG=webrtc:4771
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9518}
2015-06-30 08:32:47 +00:00
bloch
1adbacb19d Adding method IsInBeam to beamformer class.
This was previously reviewed at:
https://webrtc-codereview.appspot.com/53729004/

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

Cr-Commit-Position: refs/heads/master@{#9517}
2015-06-29 23:15:23 +00:00
pkasting
3c60d61463 Remove a cast again, after it was shown to worsen Windows perf.
This will hurt Linux x64 perf, but we think that's a compiler bug and we're
willing to take the hit for the better clarity of the code sans cast as well as
the better Windows perf.  Hopefully eventually the compiler will improve.

BUG=504813
TEST=none
TBR=andrew

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

Cr-Commit-Position: refs/heads/master@{#9516}
2015-06-29 22:16:48 +00:00
Zeke Chin
71f6f4405c iOS HW H264 support.
First step towards supporting H264 on iOS. More tuning/experimentation
required in future CLs. Tested using AppRTCDemo on iPhone6 + iPad Mini.
Future work to get it working on OS/X, simulator (renders black screen
currently) and with the Android AppRTCDemo. Currently protected with a
compile time guard.

BUG=4081
R=andrew@webrtc.org, haysc@webrtc.org, holmer@google.com, jiayl@webrtc.org, kjellander@webrtc.org, pbos@webrtc.org, phoglund@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9515}
2015-06-29 21:35:08 +00:00
pbos
70d5c475dd Prevent out-of-bounds reads for short FEC packets.
BUG=webrtc:4771
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9514}
2015-06-29 14:22:09 +00:00
Bjorn Volcker
1ca324f237 Adds UMA histogram for system delay jumps
Sudden platform system delay jumps can hurt AEC and we have no stats that monitor these jumps. How often do they occur, and when they are reported are they accurate?

This CL logs all jumps in both the reported and actual delay.

The histogram has been tested with a chromium build where a fake jump of 200 ms was applied after 5 seconds and it was registered correctly in chrome://histograms

BUG=488124
R=henrik.lundin@webrtc.org, peah@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9513}
2015-06-29 12:57:42 +00:00
henrik.lundin
c6891248b5 Simplify OWNERS structure in modules/audio_coding
All ownership is now handled by the top-level OWNERS file in
modules/audio_coding.

NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#9512}
2015-06-29 11:54:50 +00:00
henrik.lundin
9b9f338f44 Adding Minyue to audio_coding/OWNERS
Review URL: https://codereview.webrtc.org/1205313002

Cr-Commit-Position: refs/heads/master@{#9511}
2015-06-29 09:29:24 +00:00
phoglund
9bc2c6186a Roll chromium_revision 9729297..fbf756f (335266:336289)
Relevant changes:
* src/buildtools: fa660d4..ecc8e25
* src/third_party/android_tools: ed3dde6..21f4bcb
* src/third_party/boringssl/src: af0e32c..7e8f2ba
* src/third_party/icu: 00af1a4..c3f7916
* src/third_party/libyuv: 632c50f..6dde4f1
* src/tools/grit: c1b1591..1f898f7
Details: 9729297..fbf756f/DEPS

Clang version was not updated in this roll.

BUG=None
TBR=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9510}
2015-06-26 14:46:16 +00:00
Ivo Creusen
241338eeb7 Added support for keeping a buffer of the previous X seconds, to add to an AcmDump.
In addition, timestamps are now absolute instead of relative to LOG_START.

BUG=webrtc:4741
R=henrik.lundin@webrtc.org, kwiberg@webrtc.org, stefan@webrtc.org, terelius@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9509}
2015-06-26 08:19:33 +00:00
Peter Boström
4b91bd0897 Move frame input (ViECapturer) to webrtc/video/.
Renames ViECapturer to VideoCaptureInput and initializes several
parameters on construction instead of setters.

Also removes an old deadlock suppression.

BUG=1695, 2999
R=asapersson@webrtc.org, mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53559004.

Cr-Commit-Position: refs/heads/master@{#9508}
2015-06-26 04:58:23 +00:00
bloch
ebe7422372 Created SphericalPoint in array_util.h
Review URL: https://codereview.webrtc.org/1211703002

Cr-Commit-Position: refs/heads/master@{#9507}
2015-06-25 21:24:11 +00:00
henrik.lundin
93fb53acf5 Adding a new ChangeLogger class to handle UMA logging of bitrates
This change introduces the sub-class ChangeLogger in AudioCodingModuleImpl. The class writes values to the named UMA histogram, but only if the value has changed since the last time (and always for the first call). This is to avoid the problem with audio codecs being registered but never used. Before this change, these codecs' bitrate was also logged, even though they were never used.

BUG=chromium:488124
R=kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9506}
2015-06-25 20:03:12 +00:00
aluebs
ecf6b81644 Pull the Voice Activity Detector out from the AGC
This change generates bit-exact values when running through audioproc_f than before.

This change was originally uploaded here:
* https://codereview.webrtc.org/1181933002/
* https://codereview.webrtc.org/1177043017/

And reverted because of an ASAN problem in Chrome here:
* https://codereview.webrtc.org/1192863006/
* https://codereview.webrtc.org/1194963003/

TBR=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9505}
2015-06-25 19:28:55 +00:00
Erik Språng
0ea42d319e Send Sdes using RtcpPacket
BUG=2450
R=asapersson@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9504}
2015-06-25 12:46:23 +00:00
Bjorn Volcker
51c7cbb86a Revert "Pull the Voice Activity Detector out from the AGC"
This reverts commit 518c683f3e.

Breaks Linux-Asan bot
https://uberchromegw.corp.google.com/i/client.webrtc/builders/Linux%20Asan/builds/4348/steps/libjingle_peerconnection_unittest/logs/stdio

BUG=
TBR=aluebs@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9503}
2015-06-25 06:46:14 +00:00
aluebs
518c683f3e Pull the Voice Activity Detector out from the AGC
This change generates bit-exact values when running through audioproc_f than before.

This change was originally uploaded here:
* https://codereview.webrtc.org/1181933002/
* https://codereview.webrtc.org/1177043017/

And reverted because of an ASAN problem in Chrome here:
* https://codereview.webrtc.org/1192863006/
* https://codereview.webrtc.org/1194963003/

TBR=andrew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9502}
2015-06-25 01:46:03 +00:00
Andrew MacDonald
ac4234ccfc Add a [rtc_]build_with_neon variable to unify conditions.
Also consolidate ARM options for gn in an arm_neon_config.

R=jridges@masque.com, kjellander@webrtc.org, zhongwei.yao@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#9501}
2015-06-25 01:25:59 +00:00
andrew
1c7075f076 Ensure transient suppression is never enabled on mobile.
Review URL: https://codereview.webrtc.org/1209653002

Cr-Commit-Position: refs/heads/master@{#9500}
2015-06-25 01:14:17 +00:00
Peter Thatcher
c0c3a865f4 Prevent JS from bypassing RTP data channel bandwidth limitation.
Normally the RTP data channel is capped at 30kbps, but by mangling the
SDP string, one could get around this limitation. With this fix,
SdpDeserialize will return an error if it detects this condition.

BUG=280726
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9499}
2015-06-24 22:31:35 +00:00
Andrew MacDonald
8d3e489d01 Update deeper codereview.settings files to match the root.
R=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9498}
2015-06-24 19:40:39 +00:00
henrika
1b12cb0ef7 Enabling AudioDeviceTest.StartStopPlayout on Nexus 9
BUG=webrtc:4682

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

Cr-Commit-Position: refs/heads/master@{#9497}
2015-06-24 11:27:35 +00:00
magjed
59a677ada2 Android VideoRendererGui: Refactor GLES rendering
This CL should not change any visible behaviour. It does the following:
 * Extract GLES rendering into separate class GlRectDrawer. This class is also needed for future video encode with OES texture input.
 * Clean up current ScalingType -> display size calculation and introduce new SCALE_ASPECT_BALANCED (b/21735609) and remove unused SCALE_FILL.
 * Replace current mirror/rotation index juggling with android.opengl.Matrix operations instead.

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

Cr-Commit-Position: refs/heads/master@{#9496}
2015-06-24 10:59:43 +00:00
Erik Språng
2c4c914819 In screenshare mode, suppress VP8 bitrate overshoot and increase quality
This change includes several improvements:

* VP8 configured with new rate control
* Detection of frame dropping, with qp bump for next frame
* Increased target and TL0 bitrates
* Reworked rate control (TL allocation) in screenshare_layers

A note on performance: PSNR and SSIM is expected to get slightly worse with this cl. Frame drops and delays should however improve.

BUG=4171
R=pbos@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9495}
2015-06-24 09:24:50 +00:00
phoglund
7ab5f801dd Adding an equals method for KeyValuePair for easier testing.
With this we can write stuff like

assertThat(result.mandatory,
    hasItem(new KeyValuePair("minWidth", "1280")));

The above will currently fail because the object falls back to ==.

BUG=None

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

Cr-Commit-Position: refs/heads/master@{#9494}
2015-06-24 08:11:51 +00:00
Joachim Bauch
66f920ea57 Remove definition of non-existent method.
The private method "CreateDefaultLocalDescription" is defined in the
class, but not implemented or used anywhere.

R=juberti@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9493}
2015-06-24 07:34:41 +00:00