2018-02-14 15:12:00 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef API_AUDIO_ECHO_CANCELLER3_CONFIG_H_
|
|
|
|
|
#define API_AUDIO_ECHO_CANCELLER3_CONFIG_H_
|
|
|
|
|
|
2018-02-14 15:19:04 +01:00
|
|
|
#include <stddef.h> // size_t
|
|
|
|
|
|
Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a524a136f71660a114d0b03ef501f10.
Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.
Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1fe0be0ebed13c5eba7e1e42059bc5a.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > This reverts commit b49520bfc08f5c5832dda1d642125f0bb898f974.
> >
> > Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398.
> >
> > Original change's description:
> > > Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
> > >
> > > This reverts commit 588f4642d1a29f7beaf28265dbd08728191b4c52.
> > >
> > > Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
> > > lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
> > > [...]
> > >
> > > Original change's description:
> > > > Reland "Export symbols needed by the Chromium component build (part 1)."
> > > >
> > > > This reverts commit 2ea9af227517556136fd629dd2663c0d75d77c7b.
> > > >
> > > > Reason for revert: The problem will be fixed by
> > > > https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> > > >
> > > > Original change's description:
> > > > > Revert "Export symbols needed by the Chromium component build (part 1)."
> > > > >
> > > > > This reverts commit 9e24dcff167c4eb3555bf0ce6eaba090c10fbe53.
> > > > >
> > > > > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > > > >
> > > > > Original change's description:
> > > > > > Export symbols needed by the Chromium component build (part 1).
> > > > > >
> > > > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > > > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > > > > mean these symbols are part of the public API (please continue to refer
> > > > > > to [1] for info about what is considered public WebRTC API).
> > > > > >
> > > > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > > > >
> > > > > > Bug: webrtc:9419
> > > > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > > > > 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@{#24969}
> > > > >
> > > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > > >
> > > > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:9419
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#24974}
> > > >
> > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > >
> > > > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: webrtc:9419
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#24980}
> > >
> > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > >
> > > Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9419
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103801
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24983}
> >
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:9419
> > Change-Id: Id986a0a03cdc2818690337784396882af067f7fa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104602
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25049}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
2018-10-11 10:50:45 +02:00
|
|
|
#include "rtc_base/system/rtc_export.h"
|
|
|
|
|
|
2018-02-14 15:12:00 +01:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
// Configuration struct for EchoCanceller3
|
Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a524a136f71660a114d0b03ef501f10.
Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.
Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1fe0be0ebed13c5eba7e1e42059bc5a.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > This reverts commit b49520bfc08f5c5832dda1d642125f0bb898f974.
> >
> > Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398.
> >
> > Original change's description:
> > > Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
> > >
> > > This reverts commit 588f4642d1a29f7beaf28265dbd08728191b4c52.
> > >
> > > Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
> > > lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
> > > [...]
> > >
> > > Original change's description:
> > > > Reland "Export symbols needed by the Chromium component build (part 1)."
> > > >
> > > > This reverts commit 2ea9af227517556136fd629dd2663c0d75d77c7b.
> > > >
> > > > Reason for revert: The problem will be fixed by
> > > > https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> > > >
> > > > Original change's description:
> > > > > Revert "Export symbols needed by the Chromium component build (part 1)."
> > > > >
> > > > > This reverts commit 9e24dcff167c4eb3555bf0ce6eaba090c10fbe53.
> > > > >
> > > > > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > > > >
> > > > > Original change's description:
> > > > > > Export symbols needed by the Chromium component build (part 1).
> > > > > >
> > > > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > > > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > > > > mean these symbols are part of the public API (please continue to refer
> > > > > > to [1] for info about what is considered public WebRTC API).
> > > > > >
> > > > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > > > >
> > > > > > Bug: webrtc:9419
> > > > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > > > > 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@{#24969}
> > > > >
> > > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > > >
> > > > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:9419
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#24974}
> > > >
> > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > >
> > > > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: webrtc:9419
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#24980}
> > >
> > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > >
> > > Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9419
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103801
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24983}
> >
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:9419
> > Change-Id: Id986a0a03cdc2818690337784396882af067f7fa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104602
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25049}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
2018-10-11 10:50:45 +02:00
|
|
|
struct RTC_EXPORT EchoCanceller3Config {
|
2018-10-23 14:17:38 +02:00
|
|
|
// Checks and updates the config parameters to lie within (mostly) reasonable
|
2018-10-10 10:44:43 +02:00
|
|
|
// ranges. Returns true if and only of the config did not need to be changed.
|
|
|
|
|
static bool Validate(EchoCanceller3Config* config);
|
|
|
|
|
|
2018-02-20 22:18:27 +01:00
|
|
|
EchoCanceller3Config();
|
2018-03-28 16:31:57 +02:00
|
|
|
EchoCanceller3Config(const EchoCanceller3Config& e);
|
2019-12-03 11:13:26 +01:00
|
|
|
EchoCanceller3Config& operator=(const EchoCanceller3Config& other);
|
2018-10-15 13:40:29 +02:00
|
|
|
|
|
|
|
|
struct Buffering {
|
|
|
|
|
size_t excess_render_detection_interval_blocks = 250;
|
|
|
|
|
size_t max_allowed_excess_render_blocks = 8;
|
|
|
|
|
} buffering;
|
|
|
|
|
|
2018-02-14 15:12:00 +01:00
|
|
|
struct Delay {
|
2018-08-23 11:38:27 +02:00
|
|
|
Delay();
|
|
|
|
|
Delay(const Delay& e);
|
2019-12-03 11:13:26 +01:00
|
|
|
Delay& operator=(const Delay& e);
|
2018-02-14 15:12:00 +01:00
|
|
|
size_t default_delay = 5;
|
2018-06-04 19:04:40 +02:00
|
|
|
size_t down_sampling_factor = 4;
|
2018-10-15 13:40:29 +02:00
|
|
|
size_t num_filters = 5;
|
2019-03-14 11:24:54 +01:00
|
|
|
size_t delay_headroom_samples = 32;
|
|
|
|
|
size_t hysteresis_limit_blocks = 1;
|
2018-08-23 11:38:27 +02:00
|
|
|
size_t fixed_capture_delay_samples = 0;
|
2018-09-07 00:13:03 +02:00
|
|
|
float delay_estimate_smoothing = 0.7f;
|
2021-05-19 14:26:31 +02:00
|
|
|
float delay_estimate_smoothing_delay_found = 0.7f;
|
2018-09-07 00:13:03 +02:00
|
|
|
float delay_candidate_detection_threshold = 0.2f;
|
|
|
|
|
struct DelaySelectionThresholds {
|
|
|
|
|
int initial;
|
|
|
|
|
int converged;
|
2018-10-30 23:44:40 +01:00
|
|
|
} delay_selection_thresholds = {5, 20};
|
2019-04-05 16:23:50 +02:00
|
|
|
bool use_external_delay_estimator = false;
|
2019-10-15 13:43:02 +02:00
|
|
|
bool log_warning_on_delay_changes = false;
|
2019-12-03 11:24:59 +01:00
|
|
|
struct AlignmentMixing {
|
|
|
|
|
bool downmix;
|
|
|
|
|
bool adaptive_selection;
|
|
|
|
|
float activity_power_threshold;
|
|
|
|
|
bool prefer_first_two_channels;
|
|
|
|
|
};
|
|
|
|
|
AlignmentMixing render_alignment_mixing = {false, true, 10000.f, true};
|
|
|
|
|
AlignmentMixing capture_alignment_mixing = {false, true, 10000.f, false};
|
2018-02-14 15:12:00 +01:00
|
|
|
} delay;
|
|
|
|
|
|
|
|
|
|
struct Filter {
|
2020-03-20 11:20:39 +01:00
|
|
|
struct RefinedConfiguration {
|
2018-02-14 15:12:00 +01:00
|
|
|
size_t length_blocks;
|
|
|
|
|
float leakage_converged;
|
|
|
|
|
float leakage_diverged;
|
|
|
|
|
float error_floor;
|
2018-10-09 15:02:39 +02:00
|
|
|
float error_ceil;
|
2018-02-14 15:12:00 +01:00
|
|
|
float noise_gate;
|
|
|
|
|
};
|
|
|
|
|
|
2020-03-20 11:26:48 +01:00
|
|
|
struct CoarseConfiguration {
|
2018-02-14 15:12:00 +01:00
|
|
|
size_t length_blocks;
|
|
|
|
|
float rate;
|
|
|
|
|
float noise_gate;
|
|
|
|
|
};
|
|
|
|
|
|
2020-03-20 11:20:39 +01:00
|
|
|
RefinedConfiguration refined = {13, 0.00005f, 0.05f,
|
|
|
|
|
0.001f, 2.f, 20075344.f};
|
2020-03-20 11:26:48 +01:00
|
|
|
CoarseConfiguration coarse = {13, 0.7f, 20075344.f};
|
2018-02-14 15:12:00 +01:00
|
|
|
|
2020-03-20 11:20:39 +01:00
|
|
|
RefinedConfiguration refined_initial = {12, 0.005f, 0.5f,
|
|
|
|
|
0.001f, 2.f, 20075344.f};
|
2020-03-20 11:26:48 +01:00
|
|
|
CoarseConfiguration coarse_initial = {12, 0.9f, 20075344.f};
|
2018-03-08 15:54:41 +01:00
|
|
|
|
|
|
|
|
size_t config_change_duration_blocks = 250;
|
2018-08-17 00:09:15 +02:00
|
|
|
float initial_state_seconds = 2.5f;
|
2020-12-08 13:03:55 +01:00
|
|
|
int coarse_reset_hangover_blocks = 25;
|
2018-08-21 16:09:49 +02:00
|
|
|
bool conservative_initial_phase = false;
|
2020-03-20 11:26:48 +01:00
|
|
|
bool enable_coarse_filter_output_usage = true;
|
2019-04-11 14:43:17 +02:00
|
|
|
bool use_linear_filter = true;
|
2021-02-19 13:03:14 +01:00
|
|
|
bool high_pass_filter_echo_reference = false;
|
2019-11-13 11:12:29 +01:00
|
|
|
bool export_linear_aec_output = false;
|
2018-02-14 15:12:00 +01:00
|
|
|
} filter;
|
|
|
|
|
|
|
|
|
|
struct Erle {
|
|
|
|
|
float min = 1.f;
|
2018-03-22 00:29:25 +01:00
|
|
|
float max_l = 4.f;
|
2018-02-14 15:12:00 +01:00
|
|
|
float max_h = 1.5f;
|
2018-08-28 14:27:45 +02:00
|
|
|
bool onset_detection = true;
|
2018-11-20 12:54:23 +01:00
|
|
|
size_t num_sections = 1;
|
2019-10-11 23:02:26 +02:00
|
|
|
bool clamp_quality_estimate_to_zero = true;
|
|
|
|
|
bool clamp_quality_estimate_to_one = true;
|
2018-02-14 15:12:00 +01:00
|
|
|
} erle;
|
|
|
|
|
|
|
|
|
|
struct EpStrength {
|
2019-03-14 11:29:39 +01:00
|
|
|
float default_gain = 1.f;
|
2018-10-09 01:11:15 +02:00
|
|
|
float default_len = 0.83f;
|
2018-02-14 15:12:00 +01:00
|
|
|
bool echo_can_saturate = true;
|
|
|
|
|
bool bounded_erl = false;
|
2021-04-20 13:48:57 +02:00
|
|
|
bool erle_onset_compensation_in_dominant_nearend = false;
|
2018-02-14 15:12:00 +01:00
|
|
|
} ep_strength;
|
|
|
|
|
|
|
|
|
|
struct EchoAudibility {
|
|
|
|
|
float low_render_limit = 4 * 64.f;
|
|
|
|
|
float normal_render_limit = 64.f;
|
2018-04-17 11:52:17 +02:00
|
|
|
float floor_power = 2 * 64.f;
|
|
|
|
|
float audibility_threshold_lf = 10;
|
|
|
|
|
float audibility_threshold_mf = 10;
|
|
|
|
|
float audibility_threshold_hf = 10;
|
2019-04-16 12:32:15 +02:00
|
|
|
bool use_stationarity_properties = false;
|
2018-11-14 16:01:45 +01:00
|
|
|
bool use_stationarity_properties_at_init = false;
|
2018-02-14 15:12:00 +01:00
|
|
|
} echo_audibility;
|
|
|
|
|
|
|
|
|
|
struct RenderLevels {
|
|
|
|
|
float active_render_limit = 100.f;
|
|
|
|
|
float poor_excitation_render_limit = 150.f;
|
2018-06-01 11:22:05 +02:00
|
|
|
float poor_excitation_render_limit_ds8 = 20.f;
|
2019-10-29 22:54:05 +01:00
|
|
|
float render_power_gain_db = 0.f;
|
2018-02-14 15:12:00 +01:00
|
|
|
} render_levels;
|
|
|
|
|
|
2018-02-20 22:18:27 +01:00
|
|
|
struct EchoRemovalControl {
|
2018-02-27 01:59:37 +01:00
|
|
|
bool has_clock_drift = false;
|
2018-05-28 22:57:17 +02:00
|
|
|
bool linear_and_stable_echo_path = false;
|
2018-02-20 22:18:27 +01:00
|
|
|
} echo_removal_control;
|
2018-03-28 16:31:57 +02:00
|
|
|
|
|
|
|
|
struct EchoModel {
|
2018-05-25 16:55:11 +02:00
|
|
|
EchoModel();
|
|
|
|
|
EchoModel(const EchoModel& e);
|
2019-12-03 11:13:26 +01:00
|
|
|
EchoModel& operator=(const EchoModel& e);
|
2018-03-28 16:31:57 +02:00
|
|
|
size_t noise_floor_hold = 50;
|
|
|
|
|
float min_noise_floor_power = 1638400.f;
|
|
|
|
|
float stationary_gate_slope = 10.f;
|
|
|
|
|
float noise_gate_power = 27509.42f;
|
|
|
|
|
float noise_gate_slope = 0.3f;
|
|
|
|
|
size_t render_pre_window_size = 1;
|
2018-03-28 16:19:47 +02:00
|
|
|
size_t render_post_window_size = 1;
|
2020-10-02 21:13:13 +02:00
|
|
|
bool model_reverb_in_nonlinear_mode = true;
|
2018-03-28 16:31:57 +02:00
|
|
|
} echo_model;
|
2018-04-24 12:44:29 +02:00
|
|
|
|
2020-03-25 07:31:47 +01:00
|
|
|
struct ComfortNoise {
|
|
|
|
|
float noise_floor_dbfs = -96.03406f;
|
|
|
|
|
} comfort_noise;
|
|
|
|
|
|
2018-04-24 12:44:29 +02:00
|
|
|
struct Suppressor {
|
2018-08-24 22:48:49 +02:00
|
|
|
Suppressor();
|
|
|
|
|
Suppressor(const Suppressor& e);
|
2019-12-03 11:13:26 +01:00
|
|
|
Suppressor& operator=(const Suppressor& e);
|
2018-08-24 22:48:49 +02:00
|
|
|
|
2018-06-19 12:31:33 +02:00
|
|
|
size_t nearend_average_blocks = 4;
|
2018-07-03 13:48:32 +02:00
|
|
|
|
|
|
|
|
struct MaskingThresholds {
|
2018-08-24 22:48:49 +02:00
|
|
|
MaskingThresholds(float enr_transparent,
|
|
|
|
|
float enr_suppress,
|
|
|
|
|
float emr_transparent);
|
|
|
|
|
MaskingThresholds(const MaskingThresholds& e);
|
2019-12-03 11:13:26 +01:00
|
|
|
MaskingThresholds& operator=(const MaskingThresholds& e);
|
2018-07-03 13:48:32 +02:00
|
|
|
float enr_transparent;
|
|
|
|
|
float enr_suppress;
|
|
|
|
|
float emr_transparent;
|
|
|
|
|
};
|
2018-08-24 22:48:49 +02:00
|
|
|
|
|
|
|
|
struct Tuning {
|
|
|
|
|
Tuning(MaskingThresholds mask_lf,
|
|
|
|
|
MaskingThresholds mask_hf,
|
|
|
|
|
float max_inc_factor,
|
|
|
|
|
float max_dec_factor_lf);
|
|
|
|
|
Tuning(const Tuning& e);
|
2019-12-03 11:13:26 +01:00
|
|
|
Tuning& operator=(const Tuning& e);
|
2018-08-24 22:48:49 +02:00
|
|
|
MaskingThresholds mask_lf;
|
|
|
|
|
MaskingThresholds mask_hf;
|
|
|
|
|
float max_inc_factor;
|
|
|
|
|
float max_dec_factor_lf;
|
|
|
|
|
};
|
|
|
|
|
|
2018-10-10 00:25:16 +02:00
|
|
|
Tuning normal_tuning = Tuning(MaskingThresholds(.3f, .4f, .3f),
|
2018-08-24 22:48:49 +02:00
|
|
|
MaskingThresholds(.07f, .1f, .3f),
|
|
|
|
|
2.0f,
|
|
|
|
|
0.25f);
|
2018-10-09 23:33:00 +02:00
|
|
|
Tuning nearend_tuning = Tuning(MaskingThresholds(1.09f, 1.1f, .3f),
|
|
|
|
|
MaskingThresholds(.1f, .3f, .3f),
|
2018-08-24 22:48:49 +02:00
|
|
|
2.0f,
|
|
|
|
|
0.25f);
|
|
|
|
|
|
2021-05-07 23:17:28 +00:00
|
|
|
bool lf_smoothing_during_initial_phase = true;
|
|
|
|
|
int last_permanent_lf_smoothing_band = 0;
|
|
|
|
|
int last_lf_smoothing_band = 5;
|
|
|
|
|
int last_lf_band = 5;
|
|
|
|
|
int first_hf_band = 8;
|
|
|
|
|
|
2018-08-24 22:48:49 +02:00
|
|
|
struct DominantNearendDetection {
|
2018-11-28 09:44:50 +01:00
|
|
|
float enr_threshold = .25f;
|
|
|
|
|
float enr_exit_threshold = 10.f;
|
2018-10-22 15:15:36 +02:00
|
|
|
float snr_threshold = 30.f;
|
|
|
|
|
int hold_duration = 50;
|
|
|
|
|
int trigger_threshold = 12;
|
2018-10-23 21:21:37 +02:00
|
|
|
bool use_during_initial_phase = true;
|
2018-08-24 22:48:49 +02:00
|
|
|
} dominant_nearend_detection;
|
|
|
|
|
|
2019-11-25 16:13:58 +01:00
|
|
|
struct SubbandNearendDetection {
|
|
|
|
|
size_t nearend_average_blocks = 1;
|
|
|
|
|
struct SubbandRegion {
|
|
|
|
|
size_t low;
|
|
|
|
|
size_t high;
|
|
|
|
|
};
|
|
|
|
|
SubbandRegion subband1 = {1, 1};
|
|
|
|
|
SubbandRegion subband2 = {1, 1};
|
|
|
|
|
float nearend_threshold = 1.f;
|
|
|
|
|
float snr_threshold = 1.f;
|
|
|
|
|
} subband_nearend_detection;
|
|
|
|
|
|
|
|
|
|
bool use_subband_nearend_detection = false;
|
|
|
|
|
|
2018-08-27 14:19:35 +02:00
|
|
|
struct HighBandsSuppression {
|
|
|
|
|
float enr_threshold = 1.f;
|
|
|
|
|
float max_gain_during_echo = 1.f;
|
2020-10-04 00:39:49 +02:00
|
|
|
float anti_howling_activation_threshold = 400.f;
|
|
|
|
|
float anti_howling_gain = 1.f;
|
2018-08-27 14:19:35 +02:00
|
|
|
} high_bands_suppression;
|
|
|
|
|
|
2018-08-24 22:48:49 +02:00
|
|
|
float floor_first_increase = 0.00001f;
|
2020-10-22 14:36:37 +02:00
|
|
|
bool conservative_hf_suppression = false;
|
2018-04-24 12:44:29 +02:00
|
|
|
} suppressor;
|
2018-02-14 15:12:00 +01:00
|
|
|
};
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // API_AUDIO_ECHO_CANCELLER3_CONFIG_H_
|