Commit graph

137 commits

Author SHA1 Message Date
Mirko Bonadei
05cf6be726 [clang-tidy] Apply performance-move-const-arg fixes.
This CL is a manual spin-off of [1], which tried to apply clang-tidy's
performance-move-const-arg [1] to the WebRTC codebase.

Since there are some wrong fixes to correct, this CL collects all the
fixes that could be landed as is.

[1] - https://webrtc-review.googlesource.com/c/src/+/120350
[2] - https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html

Bug: webrtc:10252
Change-Id: Ic4882213556344e65c66e27415e91ff6f89134d7
Reviewed-on: https://webrtc-review.googlesource.com/c/120814
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26515}
2019-02-01 15:02:36 +00:00
Mirko Bonadei
c84f661b10 Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.

This CL moves WebRTC to the new set of APIs.

More info in [1].

This CL has been generated with this script:

declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
  git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format

[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature

Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
2019-01-31 13:23:33 +00:00
Alex Loiko
7a3e43a5d7 Reland of Opus multistream.
This is a reland of
https://webrtc-review.googlesource.com/c/src/+/111750.

This time we don't use the multistream decoder unless we have to.
(Which is when #channels >2). Pros: don't make downstream projects
crash due to used up stack space, a few % more efficiency for the
typical case (because multistream adds some overhead). Cons: Messy
C-code with "union" types and #define MACROs, probably more
maintenance.

Bug: webrtc:8649
Change-Id: I4253a5e0c382f67ac7c6731dc6602a31e6779e63
Reviewed-on: https://webrtc-review.googlesource.com/c/120049
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26445}
2019-01-29 12:16:19 +00:00
Mirko Bonadei
649a4c2ea3 [clang-tidy] Apply performance-inefficient-vector-operation fixes.
This CL applies clang-tidy's performance-inefficient-vector-operation
[1] on the WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-inefficient-vector-operation.html

Bug: webrtc:10252
Change-Id: I824caab2a5746036852e00d714b89aa5ec030ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/120052
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26442}
2019-01-29 09:45:21 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
Minyue Li
9dac02d939 Adding text log on actual opus bitrate.
Bug: None
Change-Id: I18b117a446fb629257af31c1c12bef52ccd4f467
Reviewed-on: https://webrtc-review.googlesource.com/c/118300
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26324}
2019-01-18 15:03:55 +00:00
Amit Hilbuch
1fa51d6905 Revert "Opus multistream."
This reverts commit 83ed89a45f.

Reason for revert: breaks downstream project

Original change's description:
> Opus multistream.
> 
> This is a backwards-compatible change. It makes WebRTC use the Opus
> multistream decoder for all Opus packets. Single-stream packets are a
> special case of multistream ones (with stream=1).
> 
> The tricky parts are 'WebRtcOpus_GetMaxPlaybackRate' and
> 'WebRtcOpus_GetSurroundParameters'. GetMaxPlaybackRate is supposed to
> do what opus_encoder_ctl(encoder, OPUS_GET_MAX_BANDWIDTH(&bandwidth))
> did when we had single-stream encoders. Now there may be several
> independent encoders with possibly different BANDWIDTH. The new
> GetMaxPlaybackRate queries all of them, and returns a playback rate if
> all the encoder's rates are equal.
> 
> WebRtcOpus_GetSurroundParameters is a configuration convention. It
> maps the number of channels to a multi-stream encoder/decoder
> configuration. As described in RFC 7845
> https://tools.ietf.org/html/rfc7845#section-5.1.1, a multi-stream
> encoder/decoder needs a number of streams, number of coupled streams
> and a 255-byte mapping array. The function GetSurroundParameters
> computes all of these from the number of channels. [1, 2, 4, 6, 8]
> channels are supported.
> 
> Bug: webrtc:8649
> Change-Id: I271de8e387d738254d6aa53af7fcf8644a53edb5
> Reviewed-on: https://webrtc-review.googlesource.com/c/111750
> Commit-Queue: Alex Loiko <aleloi@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26293}

TBR=aleloi@webrtc.org,minyue@webrtc.org

Change-Id: I1002e3273b44d3cccacdba84b8c363eefd537c4b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8649
Reviewed-on: https://webrtc-review.googlesource.com/c/118201
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26306}
2019-01-17 22:38:57 +00:00
Alex Loiko
83ed89a45f Opus multistream.
This is a backwards-compatible change. It makes WebRTC use the Opus
multistream decoder for all Opus packets. Single-stream packets are a
special case of multistream ones (with stream=1).

The tricky parts are 'WebRtcOpus_GetMaxPlaybackRate' and
'WebRtcOpus_GetSurroundParameters'. GetMaxPlaybackRate is supposed to
do what opus_encoder_ctl(encoder, OPUS_GET_MAX_BANDWIDTH(&bandwidth))
did when we had single-stream encoders. Now there may be several
independent encoders with possibly different BANDWIDTH. The new
GetMaxPlaybackRate queries all of them, and returns a playback rate if
all the encoder's rates are equal.

WebRtcOpus_GetSurroundParameters is a configuration convention. It
maps the number of channels to a multi-stream encoder/decoder
configuration. As described in RFC 7845
https://tools.ietf.org/html/rfc7845#section-5.1.1, a multi-stream
encoder/decoder needs a number of streams, number of coupled streams
and a 255-byte mapping array. The function GetSurroundParameters
computes all of these from the number of channels. [1, 2, 4, 6, 8]
channels are supported.

Bug: webrtc:8649
Change-Id: I271de8e387d738254d6aa53af7fcf8644a53edb5
Reviewed-on: https://webrtc-review.googlesource.com/c/111750
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26293}
2019-01-17 12:23:23 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Niels Möller
7289906437 Delete enum NetEqDecoder.
A trimmed down version is moved to legacy_encoded_audio_frame_unittest.cc
where it's used for test parameterization.

Bug: webrtc:10185
Change-Id: I9abda22f9806b831b6ca4b27d6bcc888285f50f2
Reviewed-on: https://webrtc-review.googlesource.com/c/116961
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26218}
2019-01-11 13:52:25 +00:00
Fredrik Solenberg
41f3a43c74 Remove CodecInst pt.3
Finally remove CodecInst from common_types.h, including remaining code referencing it.

TBR=kwiberg

Bug: webrtc:7626
Change-Id: I5e6b949ae9093641e33972af8438d1126fc48556
Reviewed-on: https://webrtc-review.googlesource.com/c/114546
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26036}
2018-12-18 07:42:21 +00:00
Fredrik Solenberg
f693bfae5f Remove CodecInst pt.2
The following APIs on AudioCodingModule are deprecated with this CL:
  static int NumberOfCodecs();
  static int Codec(int, CodecInst*);
  static int Codec(const char*, CodecInst*, int, size_t);
  static int Codec(const char*, int, size_t);
  absl::optional<CodecInst> SendCodec() const;
  bool RegisterReceiveCodec(int, const SdpAudioFormat&);
  int RegisterExternalReceiveCodec(int, AudioDecoder*, int, int, const std::string&);
  int UnregisterReceiveCodec(uint8_t);
  int32_t ReceiveCodec(CodecInst*);
  absl::optional<SdpAudioFormat> ReceiveFormat();

As well as this method on RtpRtcp module:
  int32_t RegisterSendPayload(const CodecInst&);

Bug: webrtc:7626
Change-Id: I1230732136f1fe9048cf74afdeab767ca57ac9ce
Reviewed-on: https://webrtc-review.googlesource.com/c/113816
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26025}
2018-12-17 10:33:55 +00:00
Mirko Bonadei
e10b163dd4 Stop using 'using namespace'.
This CL removes all the instances of 'using namespace' from C++ code
(more info https://abseil.io/tips/153).

Bug: webrtc:9855
Change-Id: Ic940fe87c5047742cfa6d60857d2f97be380ed18
Reviewed-on: https://webrtc-review.googlesource.com/c/113948
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25985}
2018-12-12 11:08:40 +00:00
Sam Zackrisson
698d6c4f30 Change the type of indW32 back to int32_t
It was changed to size_t in https://codereview.webrtc.org/1227163003,
which makes sense if the pitch lags in the code are also guaranteed
to be non-negative. Otherwise, integer wraparounds may happen, which
causes the code to circumvent the check for too low values here:
https://cs.chromium.org/chromium/src/third_party/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c?q=webrtcisacfix_pitchfilter&sq=package:chromium&g=0&l=112



Bug: chromium:906379
Change-Id: Id88c6c38bf30059181ed593968cea29ca87adf76
Reviewed-on: https://webrtc-review.googlesource.com/c/113810
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25964}
2018-12-11 13:10:12 +00:00
Jonas Olsson
622eedaf0f Bump variable sizes in response to fuzzer bug
The fuzzers detected a possible overflow in the multiplication of sum and gainQ10.
Since gainQ10 cannot be larger than 2048000 (see WebRtcIsac_kQGain2Levels) and sum cannot be larger than 2^16, a int64 is large enough to hold the result.

Bug: chromium:904909
Change-Id: Icb12821d4006aaaaf70a5735d2abd2b96f7a2f0e
Reviewed-on: https://webrtc-review.googlesource.com/c/111921
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25787}
2018-11-26 16:16:50 +00:00
Sebastian Jansson
8ac05ccaa7 Adds trial to use link capacity estimate in Opus encoder.
Since the link capacity is designed to be a more stable value, we don't
need the smoothing. This allows us to react faster to changes in link
capacity while still avoiding to react to changes in target bitrate due
to normal control behavior.

Bug: webrtc:9718
Change-Id: I2fbf6bb882f312a7b28ea43d27057886d035ac45
Reviewed-on: https://webrtc-review.googlesource.com/c/111511
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25745}
2018-11-22 09:21:12 +00:00
tzik
254d3db59a Add missing #include to absl/memory/memory.h from audio_encoder_cng.cc
absl::make_unique is used in this file without absl/memory/memory.h
#include, that causes a build error on C++17 build of Chromium.

Bug: chromium:752720
Change-Id: I78fe9f76a6ea670a4250b4cf25c3c02cf4c4beb6
Reviewed-on: https://webrtc-review.googlesource.com/c/109540
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25514}
2018-11-06 10:57:47 +00:00
Henrik Lundin
007065522a Removing ancient and unused test scripts and data files
None of these scripts or files have been used in a very long time. They
are removed for the same reason, and since the data files add to the
weight of the resources folder.

Bug: webrtc:5289
Change-Id: Ia14a46aed180f286fa881fe5f60da6973a5fe027
Reviewed-on: https://webrtc-review.googlesource.com/c/109022
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25502}
2018-11-05 16:08:46 +00:00
Karl Wiberg
2365936b87 Hide the AudioEncoderCng class behind a create function
And put codecs/cng/webrtc_cng.h in a non-public build target while
we're at it.

Bug: webrtc:8396
Change-Id: I9f51dffadfb645cd1454617fad30e09d639ff53c
Reviewed-on: https://webrtc-review.googlesource.com/c/108782
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25486}
2018-11-02 13:00:05 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Niels Möller
2edab4c026 Delete use of STR_CASE_CMP, replaced with absl::EqualsIgnoreCase.
Bug: webrtc:5876
Change-Id: Ica2d47ca45b8ef01a548d8dbe31dbed740a0ebda
Reviewed-on: https://webrtc-review.googlesource.com/c/106820
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25306}
2018-10-23 09:24:15 +00:00
Jakob Ivarsson
83bd37cda4 Add field trials for configuring Opus encoder packet loss rate.
Add options to:
1. Bypass optimization (use reported packet loss).
2. Set a maximum value.
3. Set a coefficient.

Bug: webrtc:9866
Change-Id: I3fef43e5186a4f0f50fda3506e445860518cfbd7
Reviewed-on: https://webrtc-review.googlesource.com/c/105304
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25161}
2018-10-15 08:59:43 +00:00
Jakob Ivarsson
88b68ace17 Create field trial for setting a minimum value for Opus encoder packet loss rate
Bug: webrtc:9848
Change-Id: I0663ee3af7729a220de7aff08cd74545e1a7409a
Reviewed-on: https://webrtc-review.googlesource.com/c/104800
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25081}
2018-10-10 08:52:56 +00:00
Jonas Olsson
366a50c4ef Remove simple stringstream usages.
This CL replaces std::o?stringstream with rtc::StringBuilder where that's possible to do without changing any of the surrounding code. It also updates includes and build files as appropriate.

The CL was generated by running 'git grep -l -P std::o?stringstream | xargs perl -pi -e "s/std::o?stringstream/rtc::StringBuilder/g"'. Then I've manually updated the #includes and BUILD files, run 'git cl format' and unstaged any file that would need more complex fixes.

Bug: webrtc:8982
Change-Id: Ibc32153f4a3fd177e260b6ad05ce393972549357
Reviewed-on: https://webrtc-review.googlesource.com/98460
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24605}
2018-09-06 12:53:19 +00:00
Alessio Bazzica
d4161a3c9d Moving LappedTransform, Blocker and AudioRingBuffer.
LappedTransform is only used in BandwidthAdaptationTest and therefore it
should not be anymore a visible target under common_audio.
This CL moves LappedTransform and other two classes it depends on (and which
are not used elsewhere) to modules/audio_coding/codecs/opus/test.

Bug: webrtc:9577, webrtc:5298
Change-Id: I1aa8052c2df2b2b150c279c0c9b1001474aed47a
Reviewed-on: https://webrtc-review.googlesource.com/96440
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24509}
2018-08-31 15:27:50 +00:00
Artem Titov
75caa597a3 Untangle fft third party lib from dependon WebRTC
TBR=phoglund

Bug: webrtc:9558
Change-Id: I6cc1936549f008694c3617c1d990524c34da16e3
Reviewed-on: https://webrtc-review.googlesource.com/90411
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24115}
2018-07-26 13:44:30 +00:00
Niels Möller
a15fd0dee6 Add missing include of stdint.h in MIPS code.
Needed after cl https://webrtc-review.googlesource.com/c/src/+/90249,
which deleted the include of typedefs.h.

Bug: webrtc:6854
Change-Id: I4ab86fae40843613a76da378658343198a800d0c
Reviewed-on: https://webrtc-review.googlesource.com/90414
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24112}
2018-07-26 11:30:19 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Artem Titov
52b9000380 Move g722 to proper third_party directory
Bug: webrtc:8366
Change-Id: I81b051dd25da2d7eaa2902af284d8b669ad8e3c9
Reviewed-on: https://webrtc-review.googlesource.com/85620
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24096}
2018-07-25 11:56:59 +00:00
Artem Titov
e095b81940 Move g711 to proper third_party directory
Bug: webrtc:8366
Change-Id: Ic57bd5c5c01871aee2956b2a098a79b106f54c9e
Reviewed-on: https://webrtc-review.googlesource.com/85375
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24095}
2018-07-25 10:27:08 +00:00
Artem Titov
8a838fd207 Move fft to proper third_party directory
Bug: webrtc:8366
Change-Id: I741a381fe1cf18909baefd89743b2ff4fe0a6bae
Reviewed-on: https://webrtc-review.googlesource.com/86822
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24091}
2018-07-25 08:39:28 +00:00
Mirko Bonadei
682aac5103 Enable clang::find_bad_constructs for audio_coding (part 1/2).
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.

Bug: webrtc:9251, webrtc:163
Change-Id: I6a7d4964723a5e195189aac30a83d9e924e61dd7
Reviewed-on: https://webrtc-review.googlesource.com/89743
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24053}
2018-07-20 13:07:47 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Artem Titov
91280e4d04 Extract third party part of g722 codec into separate target
Bug: webrtc:8366
Change-Id: I7e08aa53424afd3001f4c22be270a8b0ff7af565
Reviewed-on: https://webrtc-review.googlesource.com/84744
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23725}
2018-06-25 11:30:59 +00:00
Artem Titov
3ecec176a8 Extract third party part of g711 codec into separate target
Bug: webrtc:8366
Change-Id: I34c7ea707213e0c1a50826896da01f70c072eae5
Reviewed-on: https://webrtc-review.googlesource.com/84741
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23724}
2018-06-25 11:26:59 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
b602123a5a Replace rtc::Optional with absl::optional in modules/audio_coding
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'modules/audio_coding'

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: Ic980ee605148fdb160666d4aa03cc87175e48fe8
Reviewed-on: https://webrtc-review.googlesource.com/84130
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23659}
2018-06-19 12:46:20 +00:00
Mirko Bonadei
27fe43a1aa Removing warning suppression flags from modules/audio_coding.
Bug: webrtc:9251
Change-Id: I7af3985d337082eea56164357119040383a37074
Reviewed-on: https://webrtc-review.googlesource.com/80483
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23503}
2018-06-04 08:46:01 +00:00
Karl Wiberg
e058568cc5 iLBC decoding: Ignore a signed overflow
It's always been there, and there's no security risk.

Bug: chromium:843477
Change-Id: I6121943f23b477300cf60ffc4858ef0ab43466dc
Reviewed-on: https://webrtc-review.googlesource.com/78782
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23393}
2018-05-25 08:34:44 +00:00
Ivo Creusen
c7f09ad2e0 NetEq fix for repeated audio issue.
This CL implements a fix behind a field trial for a NetEq issue. NetEq restarts audio too quickly after a buffer underrun, which can quickly lead to another underrun in some circumstances. The fix changes NetEq's behavior to wait with restarting playback until sufficient audio is buffered.

Bug: webrtc:9289
Change-Id: I5968c9478ce8d84caf77f00b8d0a39156b47fc8d
Reviewed-on: https://webrtc-review.googlesource.com/77423
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23347}
2018-05-22 12:57:58 +00:00
Gustaf Ullberg
b9fc6508c0 Add min and max allowed bitrate in Opus bitrate tests
Instead of checking for an exact bitrate check that the bitrate is between
the min and max values.
Also relax a threshold in a bandwith adaptation test.

Bug: webrtc:9280
Change-Id: I465d785a53759f73242198ee1ccd7da1a26c48b7
Reviewed-on: https://webrtc-review.googlesource.com/78041
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23330}
2018-05-21 16:41:35 +00:00
Sam Zackrisson
ae93f0412a Make an energy computation not overflow in iLBC PLC
The current implementation carefully shifts down the energy so as not to overflow.
The fuzzer audio_decoder_ilbc_fuzzer found an integer overflow anyway.
The energy is only used for a threshold check.

This fix stops the energy computation when the threshold is reached, before it can overflow.

Bug: chromium:837922
Change-Id: I45e84d2d271a37e6476b08433a2cbd5a8f6e6f26
Reviewed-on: https://webrtc-review.googlesource.com/76122
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23242}
2018-05-15 13:01:42 +00:00
Sebastian Jansson
5f83cf0c6d Replacing rtc::TimeDelta with webrtc::TimeDelta.
This removes the redundant type and replaces all usages. A slight change
in behavior is that we no longer get nanosecond resolution. This should
not matter since no current code requires nanosecond resolution.

Bug: webrtc:9155
Change-Id: I04334e08c686d95731621a6c8a7e40400d0ae3b2
Reviewed-on: https://webrtc-review.googlesource.com/71163
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23174}
2018-05-08 13:22:53 +00:00
Karl Wiberg
7ba22b8eea Break out the part of the iSAC codec that's used for Voice Activity Detection
The audio processing code is using parts of the iSAC codec to do voice
activity detection (VAD), but it's undesirable for it to pull in the
entire iSAC codec as a dependency. So this CL factors out the parts of
iSAC that's needed for VAD to a separate build target.

Bug: webrtc:8396
Change-Id: I884e25d8fd0bc815fca664352b0573b4b173880e
Reviewed-on: https://webrtc-review.googlesource.com/69640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23110}
2018-05-04 08:53:34 +00:00
Minyue Li
2a35c43779 Removing shared_ptr in a unittest in audio coding.
Bug: webrtc:9222
Change-Id: I26aee886896416af98c39511046d5cfd836cb01e
Reviewed-on: https://webrtc-review.googlesource.com/73720
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23078}
2018-05-02 13:52:28 +00:00
Karl Wiberg
6f3d01c829 "Fix" signed integer overflow in old code
It's safe to ignore this overflow since it only affects audio data,
not indices or anything like that.

Bug: chromium:835637
Change-Id: I60162e4627b08d5e3ba3a21fdae8087f098c7e46
Reviewed-on: https://webrtc-review.googlesource.com/72701
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23030}
2018-04-26 13:38:57 +00:00
Jiawei Ou
89f645ad18 Add missing header include for filterbanks_neon.c
Proper header include is missing for this file causing clang to complain about missing prototype for function `WebRtcIsacfix_AllpassFilter2FixDec16Neon`

Bug: None
Change-Id: Idb32e9fab6760a9a56f1db2d43e7c8e2e1fe5359
Reviewed-on: https://webrtc-review.googlesource.com/70370
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22967}
2018-04-21 18:21:44 +00:00
Karl Wiberg
36b096c38e Ignore overflowing left shift
It's audio data, not an index or anything like that, so the most an
overflow can do is make it sound worse.

Bug: chromium:834531
Change-Id: Icb39c1bb011219c1a6fe67bc582390daa2693379
Reviewed-on: https://webrtc-review.googlesource.com/71160
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22947}
2018-04-19 21:22:49 +00:00
Karl Wiberg
bb19fcf3bd Add explicit cast to void to silence -Wcomma warning
Bug: webrtc:9014
Change-Id: I390a8d722e40a101c29ca7a71c6429cba26c17ee
Reviewed-on: https://webrtc-review.googlesource.com/67560
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22787}
2018-04-09 10:00:09 +00:00
Karl Wiberg
338f58d95c iSAC decoder: Don't read past the end of the buffer of encoded bytes
Bug: chromium:825524
Change-Id: Iff40a9fd62a34474af71b51dd3831a16412fbf3b
Reviewed-on: https://webrtc-review.googlesource.com/66361
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22748}
2018-04-05 13:22:53 +00:00
Karl Wiberg
7aabd39b4b Move asm_defines.h to rtc_base/system/
This moves it from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.

Bug: webrtc:8445
NOPRESUBMIT=true

Change-Id: I30d01fcb9cbe1427a7703a3cdd7befae751066b5
Reviewed-on: https://webrtc-review.googlesource.com/21982
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22550}
2018-03-22 03:12:13 +00:00
Mirko Bonadei
d7573563a4 Fixing -Wstrict-prototypes warnings.
Bug: webrtc:8984
Change-Id: I9a7ffb0038f341bfec055f021fc203c7d45d72fa
Reviewed-on: https://webrtc-review.googlesource.com/60903
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22501}
2018-03-19 16:57:21 +00:00
Karl Wiberg
d6fbf2a4b1 Tests: Pass codec ID argument to audio codecs
Bug: webrtc:8941
Change-Id: Ia6d51dcbf7d69b38f3615e01d3f7031b8f5c31d0
Reviewed-on: https://webrtc-review.googlesource.com/58092
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22383}
2018-03-12 13:25:29 +00:00
Patrik Höglund
1631dc6118 Make isac_fix_test correctly parse --isolated-script-test-perf-output.
The flag is passed as --isolated-script-test-perf-output=/b/whatever
on the bots, but this code expected a blank space instead of =.

Bug: webrtc:8932
Change-Id: I9ca48c9b285e365ac23a04ea2e89d9a8e75f5540
Reviewed-on: https://webrtc-review.googlesource.com/58088
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22211}
2018-02-27 16:33:39 +00:00
Sebastian Jansson
5d436ac0bf Removed Die mock from MockAudioEncoder
MockAudioEncoder was calling a mocked Die function on itself in its
destructor. This outputs "Uninteresting mock function call" warning if
the Die call was not expected. This is true even if a NiceMock is used
to suppress the warnings.

The purpose of testing that the destructor is called might be to protect
against memory leaks when audio encoder ownership is transferred using a
raw pointer. However, this case is already covered by msan checks.

Bug: None
Change-Id: I0603c417b4b239027859228e05ebcf83ff5aaf18
Reviewed-on: https://webrtc-review.googlesource.com/56183
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22146}
2018-02-22 12:53:38 +00:00
Edward Lemur
0c15a09293 Don't use gtest-parallel when running webrtc_perf_tests.
When we run webrtc_perf_tests with gtest-parallel, each test is run
individually, and this results in the file with the perf results being
overwritten each time.

To avoid this, we won't use gtest-parallel when running webrtc_perf_tests,
so we will simply run the binary directly.

TBR=phoglund@chromium.org

Bug: chromium:755660
Change-Id: I24db36e512fcf604a3de2adf4d0b4325b2c3d1ae
Reviewed-on: https://webrtc-review.googlesource.com/49340
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21982}
2018-02-12 13:10:04 +00:00
Mirko Bonadei
96a48ef70a Reland "Removing forward headers in modules/audio_coding/codecs.""
This reverts commit 1d0b9d04bd.

Reason for revert: Downstream projects have been updated.

Original change's description:
> Revert "Removing forward headers in modules/audio_coding/codecs."
> 
> This reverts commit 2279aec00b.
> 
> Reason for revert: breaks downstream project.
> 
> Original change's description:
> > Removing forward headers in modules/audio_coding/codecs.
> > 
> > Bug: webrtc:5805
> > Change-Id: Ie0b1d1d1ef01039bcadbfe42dd67d770d93983a9
> > Reviewed-on: https://webrtc-review.googlesource.com/47382
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21870}
> 
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
> 
> Change-Id: I35dc09ec1988d3d614d8facd5378a5db70942fb4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:5805
> Reviewed-on: https://webrtc-review.googlesource.com/47520
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21875}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:5805
Change-Id: I044537655012062b2a084559e90ca799286e3994
Reviewed-on: https://webrtc-review.googlesource.com/48400
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21905}
2018-02-06 10:38:19 +00:00
Mirko Bonadei
1d0b9d04bd Revert "Removing forward headers in modules/audio_coding/codecs."
This reverts commit 2279aec00b.

Reason for revert: breaks downstream project.

Original change's description:
> Removing forward headers in modules/audio_coding/codecs.
> 
> Bug: webrtc:5805
> Change-Id: Ie0b1d1d1ef01039bcadbfe42dd67d770d93983a9
> Reviewed-on: https://webrtc-review.googlesource.com/47382
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21870}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: I35dc09ec1988d3d614d8facd5378a5db70942fb4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5805
Reviewed-on: https://webrtc-review.googlesource.com/47520
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21875}
2018-02-02 15:15:37 +00:00
Mirko Bonadei
7272453558 Using fully qualified #include paths in pcm16b code.
WebRTC internal code should always use include paths that start
from the root of the project and that clearly identify the header file.

This allows 'gn check' to actually keep dependencies under control
because 'gn check' cannot enforce anything if the include path
is not fully qualified (starting from the root of the project).

Bug: webrtc:8815
Change-Id: I8a7ab64dfecdb3da4099fdec61e5fc27af4f8ccc
Reviewed-on: https://webrtc-review.googlesource.com/47380
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21874}
2018-02-02 14:15:36 +00:00
Edward Lemur
8e2852d506 Add chartjson_result_file argument to isac_fix_test.
So we can report perf results using JSON and not parsing stdout.

I reordered the way the arguments are parsed, so that options go
at the end, and not at the middle, which is an awkward place to put them.

Regular usage specifying [-I], bottleneck_value, infile and outfile
shouldn't be affected.

Bug: chromium:807737
Change-Id: Ida863846400326c33e443d723f384971b891b6e5
Reviewed-on: https://webrtc-review.googlesource.com/47161
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21873}
2018-02-02 14:08:26 +00:00
Mirko Bonadei
06c2aa9f7b Using fully qualified #include paths in ilbc code.
WebRTC internal code should always use include paths that start
from the root of the project and that clearly identify the header file.

This allows 'gn check' to actually keep dependencies under control
because 'gn check' cannot enforce anything if the include path
is not fully qualified (starting from the root of the project).

Bug: webrtc:8815
Change-Id: I36f01784fa5f5b77eefc02db479b1f7f6ee1a8c3
Reviewed-on: https://webrtc-review.googlesource.com/46263
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21871}
2018-02-02 13:28:13 +00:00
Mirko Bonadei
2279aec00b Removing forward headers in modules/audio_coding/codecs.
Bug: webrtc:5805
Change-Id: Ie0b1d1d1ef01039bcadbfe42dd67d770d93983a9
Reviewed-on: https://webrtc-review.googlesource.com/47382
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21870}
2018-02-02 13:23:40 +00:00
Mirko Bonadei
bc3b782813 Using fully qualified #include paths in g722 code.
WebRTC internal code should always use include paths that start
from the root of the project and that clearly identify the header file.

This allows 'gn check' to actually keep dependencies under control
because 'gn check' cannot enforce anything if the include path
is not fully qualified (starting from the root of the project).

Bug: webrtc:8815
Change-Id: I1fc4cb50d81522a486888a626d4a95df7847d591
Reviewed-on: https://webrtc-review.googlesource.com/46743
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21849}
2018-02-01 15:11:25 +00:00
Mirko Bonadei
2bf82c1842 Using fully qualified #include paths in g711 code.
WebRTC internal code should always use include paths that start
from the root of the project and that clearly identify the header file.

This allows 'gn check' to actually keep dependencies under control
because 'gn check' cannot enforce anything if the include path
is not fully qualified (starting from the root of the project).

Bug: webrtc:8815
Change-Id: I6c345c38fd990f66bc1a8129e7f7cee7d161e926
Reviewed-on: https://webrtc-review.googlesource.com/47120
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21848}
2018-02-01 15:05:44 +00:00
Mirko Bonadei
08973eed36 Using fully qualified #include paths in isac code.
WebRTC internal code should always used include paths that starts
from the root of the project and that clearly identify the header file.

This allows 'gn check' to actually keep dependencies under control
because 'gn check' cannot enforce anything if the include path
is not fully qualified (starting from the root of the project).

Bug: webrtc:8815
Change-Id: I23fb4fed0c27a4d98bea360315b959af843587bc
Reviewed-on: https://webrtc-review.googlesource.com/46101
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21847}
2018-02-01 14:57:44 +00:00
Patrik Höglund
91fedfbedf Add missing iSAC headers.
Bug: webrtc:7619
Change-Id: I08df7774ca7e333e84bb5ca97805181f375af942
Reviewed-on: https://webrtc-review.googlesource.com/34647
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21467}
2018-01-02 13:01:11 +00:00
Robin Raymond
1c62ffa530 Normalize main(..) routines for WinUWP
In order to support WinUWP platform, all main(..) routines must be normalized to the formal int main(int argc, char* argv[]) form. A platform wrapper main is auto-created linking against the default main(...). This can only work if the linkage is exactly matching the proper formal definition and not a loosely defined main(...) alternative.

Bug: webrtc:8608
Change-Id: I606663aaea7df1792c7c5636279617b8926fa5cc
Reviewed-on: https://webrtc-review.googlesource.com/28721
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21229}
2017-12-12 14:32:56 +00:00
Sam Zackrisson
32c6ae249f Fix fuzzer-found undefined behavior in webrtc_cng
The computation (x-127) << 8 is undefined for x < 127.
This CL replaces the shift with a multiplication: (x-127) * (1 << 8)

Bug: chromium:793201
Change-Id: I38b40bd88300208a0bfbbd8fe144b0a5b51a48ed
Reviewed-on: https://webrtc-review.googlesource.com/31800
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21205}
2017-12-11 12:47:25 +00:00
Karl Wiberg
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
Specifically, I'm moving

  safe_compare.h
  safe_conversions.h
  safe_minmax.h

They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.

BUG=webrtc:8445

Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
2017-11-22 11:21:47 +00:00
Alex Luebs
eeb2765f6c Implement Opus bandwidth adjustment behind a FieldTrial
Bug: webrtc:8522
Change-Id: I3a32ebfecd27ff74b507c2cee9e16aab17153442
Reviewed-on: https://webrtc-review.googlesource.com/22210
Commit-Queue: Alejandro Luebs <aluebs@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20799}
2017-11-20 20:04:19 +00:00
Gustaf Ullberg
36de62e830 Avoid flagging Opus DTX frames as speech.
Background: After 20 consecutive DTX frames, Opus encodes the background
noise in a normal frame and then goes back to outputting DTX frames.

Currently all Opus frames are flagged as containing speech.

This CL is has two effects on outgoing Opus packets:
1. DTX frames are flagged as non-speech.
2. A non-DTX frame that follows 20 consecutive DTX frames is flagged as
   non-speech.

Bug: webrtc:8088
Change-Id: Ic36cf8c9d0a34f55ed4e57858362ad91e3897dda
Reviewed-on: https://webrtc-review.googlesource.com/23760
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20794}
2017-11-20 14:53:40 +00:00
Oskar Sundbom
12ab00b4d8 Optional: Use nullopt and implicit construction in /modules/audio_coding
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

R=kwiberg@webrtc.org

Bug: None
Change-Id: I055411a3e521964c81100869a197dd92f5608f1b
Reviewed-on: https://webrtc-review.googlesource.com/23619
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20728}
2017-11-17 11:58:37 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Karl Wiberg
eb254b40b3 Don't select audio codecs depending on GN vars build_with_{chromium|mozilla}
BUG=webrtc:8343

Change-Id: I5943006a4da17f72eb88eae9d7ea57574d54f680
Reviewed-on: https://webrtc-review.googlesource.com/9401
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20540}
2017-11-01 18:59:27 +00:00
Karl Wiberg
7275e18439 Hide the internal AudioEncoderOpus class by giving it an "Impl" suffix
We've done this previously with the other audio encoders, but Opus had
to wait until all external users had been updated.

BUG=webrtc:7847

Change-Id: I70422d7b6c715f32a43bee88febcf6b6155e18b3
Reviewed-on: https://webrtc-review.googlesource.com/8000
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20424}
2017-10-25 10:19:06 +00:00
Edward Lemur
c5ee987d26 Stop using std::tr1
It's all in std now.

Bug: b/67839180
Change-Id: I95fc78e87055f5f7456e4fc1a80779e29e98db3d
Reviewed-on: https://webrtc-review.googlesource.com/14642
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20400}
2017-10-23 22:11:58 +00:00
Mirko Bonadei
737e073f8d Fixing warning C4267 on Win (more_configs).
This is a follow-up of https://webrtc-review.googlesource.com/c/src/+/12921.

Bug: chromium:759980
Change-Id: Ifd39adb6541c0c7e0337f587a8b34b84a07331ed
Reviewed-on: https://webrtc-review.googlesource.com/13122
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20341}
2017-10-19 07:39:22 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
niklase@google.com
5adc73aad3 git-svn-id: http://webrtc.googlecode.com/svn/trunk@166 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-07-07 08:46:41 +00:00
tlegrand@google.com
0adca82c35 Move iLBC test and reference files to new location.
git-svn-id: http://webrtc.googlecode.com/svn/trunk@147 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-07-05 09:10:23 +00:00
leozwang@google.com
0b0c28c495 add android makefile, some modification in vpx makefile to build encoder from c source for now
Review URL: http://webrtc-codereview.appspot.com/29012

git-svn-id: http://webrtc.googlecode.com/svn/trunk@50 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-07 17:24:39 +00:00
ajm@google.com
06313d5de9 Fixing some incorrect file names in gyp files reported by an external user. See the gyp warnings at the bottom of this page: http://pastebin.com/4sdp5ivs
I'm not sure how he got the warnings; I couldn't figure out how to display them myself.
Review URL: http://webrtc-codereview.appspot.com/22022

git-svn-id: http://webrtc.googlecode.com/svn/trunk@44 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-06 16:59:21 +00:00
ajm@google.com
990a93b5c8 Removing unneeded CMake files.
http://code.google.com/p/webrtc/issues/detail?id=2
Review URL: http://webrtc-codereview.appspot.com/35001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@43 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-06-06 16:48:56 +00:00
tlegrand@google.com
9aad1d5f63 Changing the copyright information for the FFT used in iSAC.
Review URL: http://webrtc-codereview.appspot.com/20018

git-svn-id: http://webrtc.googlecode.com/svn/trunk@16 4adac7df-926f-26a2-2b94-8c16560cd09d
2011-05-30 14:47:49 +00:00
niklase@google.com
77ae29bc81 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4 4adac7df-926f-26a2-2b94-8c16560cd09d 2011-05-30 11:22:19 +00:00