Commit graph

715 commits

Author SHA1 Message Date
Minyue Li
28a2c63526 Adding packetsDiscarded to RTCReceivedRtpStreamStats.
Bug: webrtc:12532, webrtc:7065, webrtc:8199
Change-Id: I3ba62ec65e5660e98787f629aec3ee7a0889207a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225261
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34468}
2021-07-13 20:34:45 +00:00
Mirko Bonadei
25ab3228f3 Replace assert() with RTC_DCHECK().
CL partially auto-generated with:

git grep -l "\bassert(" | grep "\.[c|h]" | \
  xargs sed -i 's/\bassert(/RTC_DCHECK(/g'

And with:

git grep -l "RTC_DCHECK(false)" |  \
  xargs sed -i 's/RTC_DCHECK(false)/RTC_NOTREACHED()/g'

With some manual changes to include "rtc_base/checks.h" where
needed.

A follow-up CL will remove assert() from Obj-C code as well
and remove the #include of <assert.h>.

The choice to replace with RTC_DCHECK is because assert()
is because RTC_DCHECK has similar behavior as assert()
based on NDEBUG.

This CL also contains manual changes to switch from
basic RTC_DCHECK to other (preferred) versions like
RTC_DCHECK_GT (and similar).

Bug: webrtc:6779
Change-Id: I00bed8886e03d685a2f42324e34aef2c9b7a63b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224846
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34442}
2021-07-09 07:49:43 +00:00
Mirko Bonadei
6d92fcd364 Roll chromium_revision ba5ff58b6c..94a136c73d (898571:898790)
This CL also includes updates to bit-exactness tests that started
to fail on linux_x86 after the update of clang that is part of
the Chromium Roll CL.

Change log: ba5ff58b6c..94a136c73d
Full diff: ba5ff58b6c..94a136c73d

Changed dependencies
* src/base: ecfc5939e4..da70c03d5c
* src/build: 6f773f2fd2..b11e004f56
* src/buildtools/linux64: git_revision:4d207c94eab41f09c9a8505eb47f3d2919e47943..git_revision:31f2bba8aafa8015ca5761100a21f17c2d741062
* src/buildtools/mac: git_revision:4d207c94eab41f09c9a8505eb47f3d2919e47943..git_revision:31f2bba8aafa8015ca5761100a21f17c2d741062
* src/buildtools/win: git_revision:4d207c94eab41f09c9a8505eb47f3d2919e47943..git_revision:31f2bba8aafa8015ca5761100a21f17c2d741062
* src/ios: 837dc401ee..2d44844c9e
* src/testing: 537028df55..7ec8dcae8b
* src/third_party: ddfda49030..326e9a8fc7
* src/third_party/perfetto: f4ffdc1c0d..1f54e94bc3
* src/tools: b3f11721ed..0587b769f6
* src/tools/luci-go: git_revision:40f945205c8670537d14901c310374774f589254..git_revision:a5505c14c78e1a27562164fb55f7d2d8190a0a9b
* src/tools/luci-go: git_revision:40f945205c8670537d14901c310374774f589254..git_revision:a5505c14c78e1a27562164fb55f7d2d8190a0a9b
* src/tools/luci-go: git_revision:40f945205c8670537d14901c310374774f589254..git_revision:a5505c14c78e1a27562164fb55f7d2d8190a0a9b
DEPS diff: ba5ff58b6c..94a136c73d/DEPS

Clang version changed llvmorg-13-init-14086-ge1b8fde1:llvmorg-13-init-14563-gbcaf57ca
Details: ba5ff58b6c..94a136c73d/tools/clang/scripts/update.py

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,
BUG=webrtc:12941

Change-Id: Ibbbb25952bc6f33f418fec37b189c0068d3a6928
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225141
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34423}
2021-07-06 17:04:38 +00:00
Niels Möller
6832ee25c0 Delete unneeded references to string_encode.h
Bug: webrtc:6424
Change-Id: Ia521bcdfa8b887447ca9ed6f9d89f3ddb0e1dd15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223665
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34400}
2021-07-01 09:35:23 +00:00
Christoffer Jansson
2ae4ed223a Fix the last checksum
This should be the last checksum CL for audio tests.

Bug: webrtc:12882
Change-Id: Ie7033434e920a2f923c521cca00d1c270c406370
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224086
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/master@{#34391}
2021-06-30 07:32:00 +00:00
Christoffer Jansson
46d002cb36 Add M1 Mac expected results for AudioDecoderIsacFixTest
Bug: webrtc:12882
Change-Id: I56c1fcdd85fab88924b9a9f53a1a20485633f840
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223660
Commit-Queue: Christoffer Jansson <jansson@google.com>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34389}
2021-06-30 07:03:52 +00:00
Christoffer Jansson
7208457e80 Same length for all ARM64 platforms
Update more audio checksums for M1

Bug: webrtc:12882
Change-Id: I527a43a01afe2b2e4af137852174159bf3111652
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224081
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/master@{#34372}
2021-06-28 11:18:40 +00:00
Christoffer Jansson
2b3a10e62d Add MAC arm64 platform and update checksums for acm unittest
Bug: webrtc:12882
Change-Id: Ie820746dd66d28a2a57c2e2a3b9f12b4c43f56a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223668
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/master@{#34370}
2021-06-28 08:18:07 +00:00
Jared Siskin
f2ed401679 Fix unscaled timestamps passed to nack_tracker
If timestamp_scaler_ is used, then rtp_header.timestamp, passed to UpdateLastDecodedPacket, will advance at a different rate than the scaled timestamp packet->timestamp, passed to UpdateLastDecodedPacket.

NackTracker::EstimateTimestamp uses timestamp_last_received_rtp_, and NackTracker::TimeToPlay uses timestamp_last_decoded_rtp_.

This difference causes TimeToPlay to continuously increase to huge values, so that every missing packet will be returned from GetNackList, even if RTT > real time to play.

Change-Id: Ie6ca347972edea98a202c9cdd26c6ab3f45a73c4
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222841
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34361}
2021-06-23 08:41:50 +00:00
Ivo Creusen
c6d76489e3 Add jakobi to modules/audio_coding OWNERS
Bug: None
Change-Id: I299f38126dc1bb419448dcf6f61d3d0323e33885
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223040
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34331}
2021-06-18 11:52:58 +00:00
Danil Chapovalov
b4100ad06a Avoid using legacy rtp parser in neteq test::Packet
Bug: None
Change-Id: I9184954d9c99f0a34ae335d03843171864071e5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222648
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34316}
2021-06-17 08:38:14 +00:00
Tommi
3cc68ec32e Report stats from ChannelReceive::GetAudioFrameWithInfo at 1Hz.
This is a change from the previous 100Hz frequency.
Also changing the  locks slightly in AcmReceiver so that grabbing the
neteq lock right after we've let it go, isn't necessary inside of
AcmReceiver::GetAudio and also to avoid grabbing the neteq lock while
holding the AcmReceiver lock.

Bug: webrtc:12868
Change-Id: If6ee35f3dca20eb5bdbc615123aa099ccecf57c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221371
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34258}
2021-06-09 18:41:47 +00:00
Danil Chapovalov
36b7d10a1f Delete unused test method in neteq that uses RtcpStatistics
Bug: webrtc:10678
Change-Id: I759b635037ab7d2d113fbf8359cdbc46e7712ea5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218843
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34018}
2021-05-17 12:43:44 +00:00
Jesús de Vicente Peña
d674ec77af Not dropping the refresh DTX packets but substituting them by 1 byte packets.
Bug: webrtc:12380
Change-Id: I27029c591ac2555d6ae61b706adcf97c9498a9fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217880
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33983}
2021-05-11 19:47:34 +00:00
Philipp Hancke
b1606a3352 red: make amount of redundancy controllable via field trial parameter
BUG=webrtc:11640

Change-Id: If46e3e6c84fa8781affaa400028b73571dae9108
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217384
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33975}
2021-05-11 08:36:14 +00:00
Markus Handell
ad5037b4a8 Reland "Refactor the PlatformThread API."
This reverts commit 793bac569f.

Reason for revert: rare compilation error fixed

Original change's description:
> Revert "Refactor the PlatformThread API."
>
> This reverts commit c89fdd716c.
>
> Reason for revert: Causes rare compilation error on win-libfuzzer-asan trybot.
> See https://ci.chromium.org/p/chromium/builders/try/win-libfuzzer-asan-rel/713745?
>
> Original change's description:
> > Refactor the PlatformThread API.
> >
> > PlatformThread's API is using old style function pointers, causes
> > casting, is unintuitive and forces artificial call sequences, and
> > is additionally possible to misuse in release mode.
> >
> > Fix this by an API face lift:
> > 1. The class is turned into a handle, which can be empty.
> > 2. The only way of getting a non-empty PlatformThread is by calling
> > SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
> > code reader.
> > 3. Handles can be Finalized, which works differently for joinable and
> > detached threads:
> >   a) Handles for detached threads are simply closed where applicable.
> >   b) Joinable threads are joined before handles are closed.
> > 4. The destructor finalizes handles. No explicit call is needed.
> >
> > Fixed: webrtc:12727
> > Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
> > Commit-Queue: Markus Handell <handellm@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33923}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=handellm@webrtc.org
>
> Bug: webrtc:12727
> Change-Id: Ic0146be8866f6dd3ad9c364fb8646650b8e07419
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217583
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33936}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:12727
Change-Id: Ifd6f44eac72fed84474277a1be03eb84d2f4376e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217881
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33950}
2021-05-07 14:14:43 +00:00
Guido Urdaneta
793bac569f Revert "Refactor the PlatformThread API."
This reverts commit c89fdd716c.

Reason for revert: Causes rare compilation error on win-libfuzzer-asan trybot.
See https://ci.chromium.org/p/chromium/builders/try/win-libfuzzer-asan-rel/713745?

Original change's description:
> Refactor the PlatformThread API.
>
> PlatformThread's API is using old style function pointers, causes
> casting, is unintuitive and forces artificial call sequences, and
> is additionally possible to misuse in release mode.
>
> Fix this by an API face lift:
> 1. The class is turned into a handle, which can be empty.
> 2. The only way of getting a non-empty PlatformThread is by calling
> SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
> code reader.
> 3. Handles can be Finalized, which works differently for joinable and
> detached threads:
>   a) Handles for detached threads are simply closed where applicable.
>   b) Joinable threads are joined before handles are closed.
> 4. The destructor finalizes handles. No explicit call is needed.
>
> Fixed: webrtc:12727
> Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
> Commit-Queue: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33923}

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

TBR=handellm@webrtc.org

Bug: webrtc:12727
Change-Id: Ic0146be8866f6dd3ad9c364fb8646650b8e07419
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217583
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33936}
2021-05-06 14:22:57 +00:00
Markus Handell
c89fdd716c Refactor the PlatformThread API.
PlatformThread's API is using old style function pointers, causes
casting, is unintuitive and forces artificial call sequences, and
is additionally possible to misuse in release mode.

Fix this by an API face lift:
1. The class is turned into a handle, which can be empty.
2. The only way of getting a non-empty PlatformThread is by calling
SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
code reader.
3. Handles can be Finalized, which works differently for joinable and
detached threads:
  a) Handles for detached threads are simply closed where applicable.
  b) Joinable threads are joined before handles are closed.
4. The destructor finalizes handles. No explicit call is needed.

Fixed: webrtc:12727
Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33923}
2021-05-05 09:59:07 +00:00
Johannes Kron
f7de74c58c Use Timestamp to represent packet receive timestamps
Before this CL, timestamps of received packets were rounded
to the nearest millisecond and stored as int64_t. Due to the
rounding it sometimes happened that timestamps later in the
pipeline that are not rounded seem to occur even before the
video frame was received.

Change-Id: I92d8f3540b23baae2d4a1dc6a7cb3f58bcdaad18
Bug: webrtc:12722
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216398
Reviewed-by: Chen Xing <chxg@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33916}
2021-05-04 13:16:54 +00:00
Philipp Hancke
b3bb13c572 red: make red encoder more generic
potentially allowing distances of more than 2.

BUG=webrtc:11640

Change-Id: I0d8c831218285d57cf07f0a8e5829810afd4ab3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188383
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33913}
2021-05-04 10:51:36 +00:00
Andrey Logvin
1a5f36b9b9 Make isac_fix_test an rtc_test
NOPRESUBMIT=true

Bug: None
Change-Id: Idc23110859a3a0a11c2635ac3bf74560c0b985b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216390
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33865}
2021-04-28 15:06:11 +00:00
Tommi
87f7090fd9 Replace more instances of rtc::RefCountedObject with make_ref_counted.
This is essentially replacing `new rtc::RefCountedObject` with
`rtc::make_ref_counted` in many files. In a couple of places I
made minor tweaks to make things compile such as adding parenthesis
when they were missing.

Bug: webrtc:12701
Change-Id: I3828dbf3ee0eb0232f3a47067474484ac2f4aed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215973
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33852}
2021-04-27 17:01:59 +00:00
Artem Titov
dbcf8afbcd Fix documentation owners formating
Bug: None
Change-Id: I8f52c08d14b826192830b395f8e63e24809224f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215972
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33817}
2021-04-23 11:07:28 +00:00
Markus Handell
97c4458c8f PlatformThread: add support for detached threads.
The change introduces support for detachable PlatformThreads, for which
the Stop() call doesn't wait until the thread has finished executing.

The change also introduces rtc::ThreadAttributes that carries priority
and detachability thread attributes. It additionally refactors all
known use to use the new semantics.

Bug: b:181572711, webrtc:12659
Change-Id: Id96e87c2a0dafabc8047767d241fd5da4505d14c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214704
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33796}
2021-04-21 07:44:31 +00:00
Yura Yaroshevich
d46a174f0c Expose adaptive_ptime from iOS SDK.
Bug: None
Change-Id: I48fd0937f51dc972b3eccd66f99ae80378e32fe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214968
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33766}
2021-04-18 21:53:32 +00:00
Jakob Ivarsson
8181b4f1e0 Add conceptual documentation for NetEq.
Many things are omitted in this doc and it can definitely be improved,
but I hope it captures the most important parts.

Bug: webrtc:12568
Change-Id: I13097d633ca19cecc9dd43bdb777b0ca48f151dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215142
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33724}
2021-04-14 09:17:05 +00:00
Minyue Li
0498519844 Add g3doc for audio coding module.
Bug: webrtc:12567
Change-Id: I553ba45fe9d95f3471b2134c3631a74ed600dc3d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215079
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33720}
2021-04-14 07:45:56 +00:00
Philipp Hancke
883fea1548 red: pass through calls to underlying encoder
BUG=webrtc:11640

Change-Id: I87e6f7c91c80d61e64127574485bbdcaedc8120c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181063
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#33595}
2021-03-30 13:51:51 +00:00
Jakob Ivarsson
213dc2cfc5 Temporarily disable Opus decode test.
Bug: webrtc:12518, webrtc:12543
Change-Id: I5481ee96fe2a3f9fd549e17cd9424441223a8b63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211245
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33417}
2021-03-10 12:47:18 +00:00
Jakob Ivarsson
854d59f750 Temporarily disable remaining Opus bit exactness tests.
Bug: webrtc:12518
Change-Id: Ia006c4258404a6e124101cd4ebfd399008f82227
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209645
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33383}
2021-03-04 13:02:17 +00:00
Jakob Ivarsson
e7a55813f9 Temporarily disable some Opus bit exactness tests.
This is required to be able to update the Opus version and will be
rolled back after.

Bug: webrtc:12518
Change-Id: Icc649039787db44bd55a0dc8e5ba4089df3a9566
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209363
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33375}
2021-03-03 15:30:46 +00:00
Danil Chapovalov
e904161cec Replace RTC_DEPRECATED with ABSL_DEPRECATED
This remove webrtc-specific macro that has no reason to be webrtc specific
ABSL_DEPRECATED takes a message parameter encouraging to write text how class or function is deprecated.

Bug: webrtc:12484
Change-Id: I89f1398f91dacadc37f7db469dcd985e3724e444
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208282
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33314}
2021-02-22 12:53:23 +00:00
Pablo Barrera González
ff0e01f689 Implement audio_interruption metric for kCodecPlc
Audio interruption metric is not implemented for codecs doing their own PLC.

R=ivoc@webrtc.org, jakobi@webrtc.org

Bug: b/177523033 webrtc:12456
Change-Id: I0aca6fa5c0ff617e76ee1e4ed8d95703c7097223
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206561
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Pablo Barrera González <barrerap@google.com>
Cr-Commit-Position: refs/heads/master@{#33229}
2021-02-11 09:37:24 +00:00
Ivo Creusen
1142e0bfb2 Avoid crashing on error code 6450 in isac.
Isac is not able to effectively compress all types of signals. This
should be extremely rare with real audio signals, but mostly happens
with artificially created test signals. When this happens, we should
avoid crashing and just carry on.

Bug: chromium:1170167
Change-Id: I97b551fbbdcccb0186f3e6497991ac52d2301f68
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205626
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33193}
2021-02-08 16:16:55 +00:00
Jesús de Vicente Peña
3b9abd8dee Avoiding the noise pumping during DTX regions by just forwarding the refresh DTX packets that decrease the comfort noise level at the decoder.
Bug: webrtc:12380
Change-Id: I60e4684150cb4880224f402a9bf42a72811863b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202920
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33174}
2021-02-05 10:05:25 +00:00
Jakob Ivarsson
e7ded686d5 Fix integer overflow.
Bug: chromium:1172583
Change-Id: I72c6c07f6f5702311c1a73eb4551e92a34c87e47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205007
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33127}
2021-02-01 17:37:19 +00:00
Andrey Logvin
e7c79fd3d6 Remove from chromium build targets that are not compatible with it.
We need to be able build chromium with rtc_include_tests = true. It
reveals a lot of targets that are not compatible with chromium but
aren't marked so.

`rtc_include_tests=true` has been considered a way to disable targets for the Chromium build, causing an overload on rtc_include_tests while the meaning of the two GN args (rtc_include_tests and build_with_chromium) should be kept separated.

Bug: webrtc:12404
Change-Id: I2f72825445916eae7c20ef9338672d6a07a9b9ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203890
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33124}
2021-02-01 13:46:19 +00:00
Andrey Logvin
7864600a6e Add absl_deps field for rtc_test and rtc_executable
To be able to build these targets in chromium we need to replace all abseil dependencies with "//third_party/abseil-cpp:absl".

Bug: webrtc:12404
Change-Id: Ie0f6af73f2abc73e5744520cfd9a6414e2f948e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202762
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33108}
2021-01-29 16:40:49 +00:00
Ivo Creusen
6031b74664 Implement a Neon optimized function to find the argmax element in an array.
Finding the array element with the largest argmax is a fairly common
operation, so it makes sense to have a Neon optimized version. The
implementation is done by first finding both the min and max value, and
then returning whichever has the largest argmax.

Bug: chromium:12355
Change-Id: I088bd4f7d469b2424a7265de10fffb42764567a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201622
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33052}
2021-01-21 13:42:34 +00:00
Ivo Creusen
812c73cdc2 Another ilbc cross correlation fix
To determine the appropriate amount of shifting to prevent overflow in a
cross correlation, it is necessary to have the max value of both
sequences. However, only one was calculated in the ilbc code. This CL
calculates the max of the other sequence and correctly takes both into
account.

Bug: chromium:1161837
Change-Id: I3ba8eee0814bb5eda3769c0ce6caf2681c7525e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202253
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33043}
2021-01-20 12:50:20 +00:00
Jakob Ivarsson
d723da1943 Reland "Default enable delay adaptation during DTX."
This is a reland of 59bdcbe3c9

Original change's description:
> Default enable delay adaptation during DTX.
>
> Bug: webrtc:10736
> Change-Id: I5dcc431211c6c1c89b4d7d1ab07b23d63c0550d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201385
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32999}

Bug: webrtc:10736
Change-Id: I8fc83e8b3fa6c122dcf706f0cae1b1a2e28555aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202033
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33004}
2021-01-15 18:26:35 +00:00
Jakob Ivarsson
79d9c373c5 Revert "Default enable delay adaptation during DTX."
This reverts commit 59bdcbe3c9.

Reason for revert: Breaks downstream test.

Original change's description:
> Default enable delay adaptation during DTX.
>
> Bug: webrtc:10736
> Change-Id: I5dcc431211c6c1c89b4d7d1ab07b23d63c0550d3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201385
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32999}

TBR=ivoc@webrtc.org,jakobi@webrtc.org

Change-Id: Iac9eb5e1b8dd76523d841135160dbf547ae153cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10736
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202031
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33000}
2021-01-15 16:34:47 +00:00
Jakob Ivarsson
59bdcbe3c9 Default enable delay adaptation during DTX.
Bug: webrtc:10736
Change-Id: I5dcc431211c6c1c89b4d7d1ab07b23d63c0550d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201385
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32999}
2021-01-15 15:29:57 +00:00
Danil Chapovalov
a86cef7e2c Replace RTC_WARN_UNUSED_RESULT with ABSL_MUST_USE_RESULT in audio_coding
Bug: webrtc:12336
Change-Id: Icae229b957c2bfcc410788179a504c576cfde151
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201736
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32995}
2021-01-15 10:58:20 +00:00
Ivo Creusen
fe06dbdfa2 Correction for the calculation of the abs max value
The abs max of a 16 bit integer cannot be represented as a 16 bit integer, because abs(-2^16) is too large. To work around this, we can instead use the index of the max element, convert it to a 32-bit int and then take the absolute value.

Bug: chromium:1158070, chromium:1146835, chromium:1161837
Change-Id: If56177c55ec62b4bd578986a5deae38a91bbc821
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198123
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32950}
2021-01-12 16:28:00 +00:00
Timothy Gu
3111783aa1 Organize iLBC headers as per style guide
Prior to this commit, most .c files in modules/audio_coding/codecs/ilbc
don't include their corresponding headers, nor do they order #includes
as per the Google Style Guide [1]. The former is especially harmful,
since in C it can silently allow the function signature to diverge from
its prototype, thus causing disaster at runtime.

This CL fixes both issues. In effect, this allows the common_audio and
modules/audio_coding:ilbc targets to be compiled with Clang's
-Wmissing-prototypes, though this CL does not add that change.

[1]: https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

Bug: webrtc:12314
Change-Id: I8299968ed3cc86ff35d9de045072b846298043af
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198362
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Timothy Gu <timothygu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#32896}
2020-12-31 20:57:18 +00:00
Ivo Creusen
0ff2b4cd42 Fix for overflow in iLBC code.
The calculation of the necessary number of shifts is not correct, leading to an overflow.

Bug: chromium:1158070
Change-Id: I6545e9da46debf33ce169c33d762915fe755d606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197981
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32855}
2020-12-17 11:06:01 +00:00
Mirko Bonadei
5686e3457e Optimize calls to std::string::find() and friends for a single char.
The character literal overload is more efficient.

No-Presubmit: True
No-Try: True
Bug: None
Change-Id: Ice0b8478accd8a252ab81a0496d46c0f71db3db6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/197810
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32841}
2020-12-16 09:01:44 +00:00
Henrik Lundin
6c80aebd00 Remove kwiberg@webrtc.org from OWNERS files
Bug: none
Change-Id: I7f399449026de58dee28abcede2630269c6b95b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196505
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32774}
2020-12-04 15:11:26 +00:00
Ivo Creusen
f65a003f7f Fix for 3 NetEq fuzzer issues.
I was not able to reproduce chromium:1146676 locally, so the change in merge.cc is a speculative fix.

Bug: chromium:1146835, chromium:1146676, chromium:1137226
Change-Id: I14472ba5b41e58b2d5f27d9833249c14505af18f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194264
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32759}
2020-12-03 14:50:18 +00:00