mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-16 23:30:48 +01:00
Format /modules
git ls-files | grep -e "\(\.h\|\.cc\)$" | grep -e "^modules/" | xargs clang-format -i ; git cl format after landing: add to .git-blame-ignore-revs Bug: webrtc:15082 Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Jared Siskin <jtsiskin@meta.com> Cr-Commit-Position: refs/heads/main@{#39901}
This commit is contained in:
parent
2080dacfb7
commit
c018bae807
134 changed files with 422 additions and 441 deletions
|
@ -103,11 +103,7 @@ TEST(AudioDecoderFactoryTest, MaxNrOfChannels) {
|
||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
"ilbc",
|
"ilbc",
|
||||||
#endif
|
#endif
|
||||||
"pcmu",
|
"pcmu", "pcma", "l16", "G722", "G711",
|
||||||
"pcma",
|
|
||||||
"l16",
|
|
||||||
"G722",
|
|
||||||
"G711",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto codec : codecs) {
|
for (auto codec : codecs) {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
#include "modules/audio_coding/codecs/opus/opus_interface.h"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace {
|
||||||
static const size_t kMaxNumSamples = 48 * 10 * 2; // 10 ms @ 48 kHz stereo.
|
static const size_t kMaxNumSamples = 48 * 10 * 2; // 10 ms @ 48 kHz stereo.
|
||||||
static const size_t kRedLastHeaderLength =
|
static const size_t kRedLastHeaderLength =
|
||||||
1; // 1 byte RED header for the last element.
|
1; // 1 byte RED header for the last element.
|
||||||
}
|
} // namespace
|
||||||
|
|
||||||
class AudioEncoderCopyRedTest : public ::testing::Test {
|
class AudioEncoderCopyRedTest : public ::testing::Test {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/accelerate.h"
|
#include "modules/audio_coding/neteq/accelerate.h"
|
||||||
|
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_vector.h"
|
#include "modules/audio_coding/neteq/audio_vector.h"
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/comfort_noise.h"
|
#include "modules/audio_coding/neteq/comfort_noise.h"
|
||||||
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#ifndef MODULES_AUDIO_CODING_NETEQ_EXPAND_H_
|
#ifndef MODULES_AUDIO_CODING_NETEQ_EXPAND_H_
|
||||||
#define MODULES_AUDIO_CODING_NETEQ_EXPAND_H_
|
#define MODULES_AUDIO_CODING_NETEQ_EXPAND_H_
|
||||||
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/audio_vector.h"
|
#include "modules/audio_coding/neteq/audio_vector.h"
|
||||||
|
|
|
@ -160,7 +160,6 @@ TEST_F(NetEqDecodingTestFaxMode, TestFrameWaitingTimeStatistics) {
|
||||||
EXPECT_EQ(-1, stats.max_waiting_time_ms);
|
EXPECT_EQ(-1, stats.max_waiting_time_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(NetEqDecodingTest, LongCngWithNegativeClockDrift) {
|
TEST_F(NetEqDecodingTest, LongCngWithNegativeClockDrift) {
|
||||||
// Apply a clock drift of -25 ms / s (sender faster than receiver).
|
// Apply a clock drift of -25 ms / s (sender faster than receiver).
|
||||||
const double kDriftFactor = 1000.0 / (1000.0 + 25.0);
|
const double kDriftFactor = 1000.0 / (1000.0 + 25.0);
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/red_payload_splitter.h"
|
#include "modules/audio_coding/neteq/red_payload_splitter.h"
|
||||||
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility> // pair
|
#include <utility> // pair
|
||||||
|
|
||||||
|
|
|
@ -313,8 +313,7 @@ NetEqLifetimeStatistics NetEqTest::LifetimeStats() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
NetEqTest::DecoderMap NetEqTest::StandardDecoderMap() {
|
NetEqTest::DecoderMap NetEqTest::StandardDecoderMap() {
|
||||||
DecoderMap codecs = {
|
DecoderMap codecs = {{0, SdpAudioFormat("pcmu", 8000, 1)},
|
||||||
{0, SdpAudioFormat("pcmu", 8000, 1)},
|
|
||||||
{8, SdpAudioFormat("pcma", 8000, 1)},
|
{8, SdpAudioFormat("pcma", 8000, 1)},
|
||||||
#ifdef WEBRTC_CODEC_ILBC
|
#ifdef WEBRTC_CODEC_ILBC
|
||||||
{102, SdpAudioFormat("ilbc", 8000, 1)},
|
{102, SdpAudioFormat("ilbc", 8000, 1)},
|
||||||
|
@ -335,8 +334,7 @@ NetEqTest::DecoderMap NetEqTest::StandardDecoderMap() {
|
||||||
{13, SdpAudioFormat("cn", 8000, 1)},
|
{13, SdpAudioFormat("cn", 8000, 1)},
|
||||||
{98, SdpAudioFormat("cn", 16000, 1)},
|
{98, SdpAudioFormat("cn", 16000, 1)},
|
||||||
{99, SdpAudioFormat("cn", 32000, 1)},
|
{99, SdpAudioFormat("cn", 32000, 1)},
|
||||||
{100, SdpAudioFormat("cn", 48000, 1)}
|
{100, SdpAudioFormat("cn", 48000, 1)}};
|
||||||
};
|
|
||||||
return codecs;
|
return codecs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,7 @@ std::unique_ptr<Packet> RtpFileSource::NextPacket() {
|
||||||
}
|
}
|
||||||
|
|
||||||
RtpFileSource::RtpFileSource(absl::optional<uint32_t> ssrc_filter)
|
RtpFileSource::RtpFileSource(absl::optional<uint32_t> ssrc_filter)
|
||||||
: PacketSource(),
|
: PacketSource(), ssrc_filter_(ssrc_filter) {}
|
||||||
ssrc_filter_(ssrc_filter) {}
|
|
||||||
|
|
||||||
bool RtpFileSource::OpenFile(absl::string_view file_name) {
|
bool RtpFileSource::OpenFile(absl::string_view file_name) {
|
||||||
rtp_reader_.reset(RtpFileReader::Create(RtpFileReader::kRtpDump, file_name));
|
rtp_reader_.reset(RtpFileReader::Create(RtpFileReader::kRtpDump, file_name));
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/audio_coding/neteq/tools/rtp_generator.h"
|
#include "modules/audio_coding/neteq/tools/rtp_generator.h"
|
||||||
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace test {
|
namespace test {
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/audio_device/linux/audio_device_alsa_linux.h"
|
#include "modules/audio_device/linux/audio_device_alsa_linux.h"
|
||||||
|
|
||||||
|
|
||||||
#include "modules/audio_device/audio_device_config.h"
|
#include "modules/audio_device/audio_device_config.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
#include "rtc_base/system/arch.h"
|
#include "rtc_base/system/arch.h"
|
||||||
|
|
|
@ -29,12 +29,11 @@
|
||||||
#include "modules/audio_device/win/audio_device_core_win.h"
|
#include "modules/audio_device/win/audio_device_core_win.h"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <comdef.h>
|
#include <comdef.h>
|
||||||
#include <dmo.h>
|
#include <dmo.h>
|
||||||
#include <functiondiscoverykeys_devpkey.h>
|
#include <functiondiscoverykeys_devpkey.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
#include <string.h>
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
#include <uuids.h>
|
#include <uuids.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -3256,8 +3255,9 @@ DWORD AudioDeviceWindowsCore::DoCaptureThread() {
|
||||||
QueryPerformanceCounter(&t1);
|
QueryPerformanceCounter(&t1);
|
||||||
|
|
||||||
// Get the current recording and playout delay.
|
// Get the current recording and playout delay.
|
||||||
uint32_t sndCardRecDelay = (uint32_t)(
|
uint32_t sndCardRecDelay =
|
||||||
((((UINT64)t1.QuadPart * _perfCounterFactor) - recTime) / 10000) +
|
(uint32_t)(((((UINT64)t1.QuadPart * _perfCounterFactor) - recTime) /
|
||||||
|
10000) +
|
||||||
(10 * syncBufIndex) / _recBlockSize - 10);
|
(10 * syncBufIndex) / _recBlockSize - 10);
|
||||||
uint32_t sndCardPlayDelay = static_cast<uint32_t>(_sndCardPlayDelay);
|
uint32_t sndCardPlayDelay = static_cast<uint32_t>(_sndCardPlayDelay);
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,9 @@
|
||||||
|
|
||||||
#if (_MSC_VER >= 1400) // only include for VS 2005 and higher
|
#if (_MSC_VER >= 1400) // only include for VS 2005 and higher
|
||||||
|
|
||||||
#include "rtc_base/win32.h"
|
|
||||||
|
|
||||||
#include "modules/audio_device/audio_device_generic.h"
|
|
||||||
|
|
||||||
#include <wmcodecdsp.h> // CLSID_CWMAudioAEC
|
#include <wmcodecdsp.h> // CLSID_CWMAudioAEC
|
||||||
//(must be before audioclient.h)
|
//(must be before audioclient.h)
|
||||||
|
|
||||||
#include <audioclient.h> // WASAPI
|
#include <audioclient.h> // WASAPI
|
||||||
#include <audiopolicy.h>
|
#include <audiopolicy.h>
|
||||||
#include <avrt.h> // Avrt
|
#include <avrt.h> // Avrt
|
||||||
|
@ -27,8 +24,10 @@
|
||||||
#include <mmdeviceapi.h> // MMDevice
|
#include <mmdeviceapi.h> // MMDevice
|
||||||
|
|
||||||
#include "api/scoped_refptr.h"
|
#include "api/scoped_refptr.h"
|
||||||
|
#include "modules/audio_device/audio_device_generic.h"
|
||||||
#include "rtc_base/synchronization/mutex.h"
|
#include "rtc_base/synchronization/mutex.h"
|
||||||
#include "rtc_base/win/scoped_com_initializer.h"
|
#include "rtc_base/win/scoped_com_initializer.h"
|
||||||
|
#include "rtc_base/win32.h"
|
||||||
|
|
||||||
// Use Multimedia Class Scheduler Service (MMCSS) to boost the thread priority
|
// Use Multimedia Class Scheduler Service (MMCSS) to boost the thread priority
|
||||||
#pragma comment(lib, "avrt.lib")
|
#pragma comment(lib, "avrt.lib")
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/audio_device/win/core_audio_utility_win.h"
|
#include "modules/audio_device/win/core_audio_utility_win.h"
|
||||||
|
|
||||||
#include "rtc_base/arraysize.h"
|
#include "rtc_base/arraysize.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
#include "rtc_base/win/scoped_com_initializer.h"
|
#include "rtc_base/win/scoped_com_initializer.h"
|
||||||
|
|
|
@ -8,10 +8,9 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
|
|
||||||
|
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
|
#include "modules/audio_processing/aec3/adaptive_fir_filter.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/audio_processing/aec3/adaptive_fir_filter_erl.h"
|
|
||||||
|
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
|
#include "modules/audio_processing/aec3/adaptive_fir_filter_erl.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
namespace aec3 {
|
namespace aec3 {
|
||||||
|
|
|
@ -14,11 +14,7 @@
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
struct EchoPathVariability {
|
struct EchoPathVariability {
|
||||||
enum class DelayAdjustment {
|
enum class DelayAdjustment { kNone, kBufferFlush, kNewDetectedDelay };
|
||||||
kNone,
|
|
||||||
kBufferFlush,
|
|
||||||
kNewDetectedDelay
|
|
||||||
};
|
|
||||||
|
|
||||||
EchoPathVariability(bool gain_change,
|
EchoPathVariability(bool gain_change,
|
||||||
DelayAdjustment delay_change,
|
DelayAdjustment delay_change,
|
||||||
|
|
|
@ -8,11 +8,10 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/audio_processing/aec3/fft_data.h"
|
|
||||||
|
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
|
#include "modules/audio_processing/aec3/fft_data.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
|
|
|
@ -453,18 +453,21 @@ TEST(MultiChannelContentDetectorMetrics, ReportsMetrics) {
|
||||||
"PersistentMultichannelContentEverDetected"));
|
"PersistentMultichannelContentEverDetected"));
|
||||||
EXPECT_METRIC_EQ(
|
EXPECT_METRIC_EQ(
|
||||||
1, metrics::NumEvents("WebRTC.Audio.EchoCanceller."
|
1, metrics::NumEvents("WebRTC.Audio.EchoCanceller."
|
||||||
"PersistentMultichannelContentEverDetected", 1));
|
"PersistentMultichannelContentEverDetected",
|
||||||
|
1));
|
||||||
|
|
||||||
// Check periodic metric.
|
// Check periodic metric.
|
||||||
EXPECT_METRIC_EQ(
|
EXPECT_METRIC_EQ(
|
||||||
2, metrics::NumSamples("WebRTC.Audio.EchoCanceller."
|
2, metrics::NumSamples("WebRTC.Audio.EchoCanceller."
|
||||||
"ProcessingPersistentMultichannelContent"));
|
"ProcessingPersistentMultichannelContent"));
|
||||||
EXPECT_METRIC_EQ(
|
EXPECT_METRIC_EQ(1,
|
||||||
1, metrics::NumEvents("WebRTC.Audio.EchoCanceller."
|
metrics::NumEvents("WebRTC.Audio.EchoCanceller."
|
||||||
"ProcessingPersistentMultichannelContent", 0));
|
"ProcessingPersistentMultichannelContent",
|
||||||
EXPECT_METRIC_EQ(
|
0));
|
||||||
1, metrics::NumEvents("WebRTC.Audio.EchoCanceller."
|
EXPECT_METRIC_EQ(1,
|
||||||
"ProcessingPersistentMultichannelContent", 1));
|
metrics::NumEvents("WebRTC.Audio.EchoCanceller."
|
||||||
|
"ProcessingPersistentMultichannelContent",
|
||||||
|
1));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
|
@ -49,7 +49,6 @@ class ReverbModel {
|
||||||
float reverb_decay);
|
float reverb_decay);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::array<float, kFftLengthBy2Plus1> reverb_;
|
std::array<float, kFftLengthBy2Plus1> reverb_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,11 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/audio_processing/aec3/vector_math.h"
|
|
||||||
|
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
|
#include "modules/audio_processing/aec3/vector_math.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -123,7 +123,6 @@ const int16_t WebRtcAecm_kSinTable[] = {
|
||||||
-2667, -2531, -2395, -2258, -2120, -1981, -1842, -1703, -1563, -1422, -1281,
|
-2667, -2531, -2395, -2258, -2120, -1981, -1842, -1703, -1563, -1422, -1281,
|
||||||
-1140, -998, -856, -713, -571, -428, -285, -142};
|
-1140, -998, -856, -713, -571, -428, -285, -142};
|
||||||
|
|
||||||
|
|
||||||
// Moves the pointer to the next entry and inserts `far_spectrum` and
|
// Moves the pointer to the next entry and inserts `far_spectrum` and
|
||||||
// corresponding Q-domain in its buffer.
|
// corresponding Q-domain in its buffer.
|
||||||
//
|
//
|
||||||
|
|
|
@ -185,8 +185,9 @@ static void WindowAndFFT(AecmCore* aecm,
|
||||||
int16_t scaled_time_signal = time_signal[i] * (1 << time_signal_scaling);
|
int16_t scaled_time_signal = time_signal[i] * (1 << time_signal_scaling);
|
||||||
fft[i] = (int16_t)((scaled_time_signal * WebRtcAecm_kSqrtHanning[i]) >> 14);
|
fft[i] = (int16_t)((scaled_time_signal * WebRtcAecm_kSqrtHanning[i]) >> 14);
|
||||||
scaled_time_signal = time_signal[i + PART_LEN] * (1 << time_signal_scaling);
|
scaled_time_signal = time_signal[i + PART_LEN] * (1 << time_signal_scaling);
|
||||||
fft[PART_LEN + i] = (int16_t)(
|
fft[PART_LEN + i] = (int16_t)((scaled_time_signal *
|
||||||
(scaled_time_signal * WebRtcAecm_kSqrtHanning[PART_LEN - i]) >> 14);
|
WebRtcAecm_kSqrtHanning[PART_LEN - i]) >>
|
||||||
|
14);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do forward FFT, then take only the first PART_LEN complex samples,
|
// Do forward FFT, then take only the first PART_LEN complex samples,
|
||||||
|
@ -644,18 +645,18 @@ int RTC_NO_SANITIZE("signed-integer-overflow") // bugs.webrtc.org/8200
|
||||||
}
|
}
|
||||||
|
|
||||||
// multiply with Wiener coefficients
|
// multiply with Wiener coefficients
|
||||||
efw[i].real = (int16_t)(
|
efw[i].real = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real,
|
||||||
WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real, hnl[i], 14));
|
hnl[i], 14));
|
||||||
efw[i].imag = (int16_t)(
|
efw[i].imag = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag,
|
||||||
WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag, hnl[i], 14));
|
hnl[i], 14));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// multiply with Wiener coefficients
|
// multiply with Wiener coefficients
|
||||||
for (i = 0; i < PART_LEN1; i++) {
|
for (i = 0; i < PART_LEN1; i++) {
|
||||||
efw[i].real = (int16_t)(
|
efw[i].real = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real,
|
||||||
WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real, hnl[i], 14));
|
hnl[i], 14));
|
||||||
efw[i].imag = (int16_t)(
|
efw[i].imag = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag,
|
||||||
WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag, hnl[i], 14));
|
hnl[i], 14));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -569,8 +569,8 @@ static void InverseFFTAndWindow(AecmCore* aecm,
|
||||||
[paecm_buf] "+r"(paecm_buf), [i] "=&r"(i),
|
[paecm_buf] "+r"(paecm_buf), [i] "=&r"(i),
|
||||||
[pp_kSqrtHanning] "+r"(pp_kSqrtHanning),
|
[pp_kSqrtHanning] "+r"(pp_kSqrtHanning),
|
||||||
[p_kSqrtHanning] "+r"(p_kSqrtHanning)
|
[p_kSqrtHanning] "+r"(p_kSqrtHanning)
|
||||||
: [out_aecm] "r"(out_aecm),
|
: [out_aecm] "r"(out_aecm), [WebRtcAecm_kSqrtHanning] "r"(
|
||||||
[WebRtcAecm_kSqrtHanning] "r"(WebRtcAecm_kSqrtHanning)
|
WebRtcAecm_kSqrtHanning)
|
||||||
: "hi", "lo", "memory");
|
: "hi", "lo", "memory");
|
||||||
|
|
||||||
// Copy the current block to the old position
|
// Copy the current block to the old position
|
||||||
|
@ -1334,10 +1334,10 @@ int WebRtcAecm_ProcessBlock(AecmCore* aecm,
|
||||||
} else {
|
} else {
|
||||||
// multiply with Wiener coefficients
|
// multiply with Wiener coefficients
|
||||||
for (i = 0; i < PART_LEN1; i++) {
|
for (i = 0; i < PART_LEN1; i++) {
|
||||||
efw[i].real = (int16_t)(
|
efw[i].real = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real,
|
||||||
WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].real, hnl[i], 14));
|
hnl[i], 14));
|
||||||
efw[i].imag = (int16_t)(
|
efw[i].imag = (int16_t)(WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag,
|
||||||
WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(dfw[i].imag, hnl[i], 14));
|
hnl[i], 14));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1424,8 +1424,8 @@ static void ComfortNoise(AecmCore* aecm,
|
||||||
"srav %[tmp32], %[tmp32], %[minTrackShift] \n\t"
|
"srav %[tmp32], %[tmp32], %[minTrackShift] \n\t"
|
||||||
"subu %[tnoise], %[tnoise], %[tmp32] \n\t"
|
"subu %[tnoise], %[tnoise], %[tmp32] \n\t"
|
||||||
: [tmp32] "=&r"(tmp32), [tnoise] "+r"(tnoise)
|
: [tmp32] "=&r"(tmp32), [tnoise] "+r"(tnoise)
|
||||||
:
|
: [outLShift32] "r"(outLShift32), [minTrackShift] "r"(
|
||||||
[outLShift32] "r"(outLShift32), [minTrackShift] "r"(minTrackShift));
|
minTrackShift));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Reset "too high" counter
|
// Reset "too high" counter
|
||||||
|
@ -1497,8 +1497,8 @@ static void ComfortNoise(AecmCore* aecm,
|
||||||
"srav %[tmp32], %[tmp32], %[minTrackShift] \n\t"
|
"srav %[tmp32], %[tmp32], %[minTrackShift] \n\t"
|
||||||
"subu %[tnoise1], %[tnoise1], %[tmp32] \n\t"
|
"subu %[tnoise1], %[tnoise1], %[tmp32] \n\t"
|
||||||
: [tmp32] "=&r"(tmp32), [tnoise1] "+r"(tnoise1)
|
: [tmp32] "=&r"(tmp32), [tnoise1] "+r"(tnoise1)
|
||||||
:
|
: [outLShift32] "r"(outLShift32), [minTrackShift] "r"(
|
||||||
[outLShift32] "r"(outLShift32), [minTrackShift] "r"(minTrackShift));
|
minTrackShift));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Reset "too high" counter
|
// Reset "too high" counter
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#ifndef MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
|
#ifndef MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
|
||||||
#define MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
|
#define MODULES_AUDIO_PROCESSING_AGC_LEGACY_ANALOG_AGC_H_
|
||||||
|
|
||||||
|
|
||||||
#include "modules/audio_processing/agc/legacy/digital_agc.h"
|
#include "modules/audio_processing/agc/legacy/digital_agc.h"
|
||||||
#include "modules/audio_processing/agc/legacy/gain_control.h"
|
#include "modules/audio_processing/agc/legacy/gain_control.h"
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,11 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "modules/audio_processing/agc2/rnn_vad/rnn_fc.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
#include "modules/audio_processing/agc2/rnn_vad/rnn_fc.h"
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/numerics/safe_conversions.h"
|
#include "rtc_base/numerics/safe_conversions.h"
|
||||||
#include "third_party/rnnoise/src/rnn_activations.h"
|
#include "third_party/rnnoise/src/rnn_activations.h"
|
||||||
|
|
|
@ -8,11 +8,10 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/audio_processing/agc2/rnn_vad/vector_math.h"
|
|
||||||
|
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
|
#include "modules/audio_processing/agc2/rnn_vad/vector_math.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "rtc_base/numerics/safe_conversions.h"
|
#include "rtc_base/numerics/safe_conversions.h"
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,6 @@ int GainControlImpl::ProcessCaptureAudio(AudioBuffer* audio,
|
||||||
return AudioProcessing::kNoError;
|
return AudioProcessing::kNoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO(ajm): ensure this is called under kAdaptiveAnalog.
|
// TODO(ajm): ensure this is called under kAdaptiveAnalog.
|
||||||
int GainControlImpl::set_stream_analog_level(int level) {
|
int GainControlImpl::set_stream_analog_level(int level) {
|
||||||
data_dumper_->DumpRaw("gain_control_set_stream_analog_level", 1, &level);
|
data_dumper_->DumpRaw("gain_control_set_stream_analog_level", 1, &level);
|
||||||
|
@ -287,7 +286,6 @@ int GainControlImpl::set_mode(Mode mode) {
|
||||||
return AudioProcessing::kNoError;
|
return AudioProcessing::kNoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GainControlImpl::set_analog_level_limits(int minimum, int maximum) {
|
int GainControlImpl::set_analog_level_limits(int minimum, int maximum) {
|
||||||
if (minimum < 0 || maximum > 65535 || maximum < minimum) {
|
if (minimum < 0 || maximum > 65535 || maximum < minimum) {
|
||||||
return AudioProcessing::kBadParameterError;
|
return AudioProcessing::kBadParameterError;
|
||||||
|
@ -302,7 +300,6 @@ int GainControlImpl::set_analog_level_limits(int minimum, int maximum) {
|
||||||
return AudioProcessing::kNoError;
|
return AudioProcessing::kNoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GainControlImpl::set_target_level_dbfs(int level) {
|
int GainControlImpl::set_target_level_dbfs(int level) {
|
||||||
if (level > 31 || level < 0) {
|
if (level > 31 || level < 0) {
|
||||||
return AudioProcessing::kBadParameterError;
|
return AudioProcessing::kBadParameterError;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "modules/audio_processing/ns/fast_math.h"
|
#include "modules/audio_processing/ns/fast_math.h"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "modules/audio_processing/ns/prior_signal_model_estimator.h"
|
#include "modules/audio_processing/ns/prior_signal_model_estimator.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "modules/audio_processing/ns/fast_math.h"
|
#include "modules/audio_processing/ns/fast_math.h"
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#define MODULES_AUDIO_PROCESSING_NS_QUANTILE_NOISE_ESTIMATOR_H_
|
#define MODULES_AUDIO_PROCESSING_NS_QUANTILE_NOISE_ESTIMATOR_H_
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "modules/audio_processing/ns/speech_probability_estimator.h"
|
#include "modules/audio_processing/ns/speech_probability_estimator.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "modules/audio_processing/ns/fast_math.h"
|
#include "modules/audio_processing/ns/fast_math.h"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "modules/audio_processing/ns/fast_math.h"
|
#include "modules/audio_processing/ns/fast_math.h"
|
||||||
|
|
|
@ -9,9 +9,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "absl/flags/flag.h"
|
#include "absl/flags/flag.h"
|
||||||
#include "absl/flags/parse.h"
|
#include "absl/flags/parse.h"
|
||||||
|
|
|
@ -968,9 +968,7 @@ TEST(GoogCcScenario, FallbackToLossBasedBweWithoutPacketFeedback) {
|
||||||
EXPECT_GE(client->target_rate().kbps(), 500);
|
EXPECT_GE(client->target_rate().kbps(), 500);
|
||||||
|
|
||||||
// Update the network to create high loss ratio
|
// Update the network to create high loss ratio
|
||||||
net->UpdateConfig([](NetworkSimulationConfig* c) {
|
net->UpdateConfig([](NetworkSimulationConfig* c) { c->loss_rate = 0.15; });
|
||||||
c->loss_rate = 0.15;
|
|
||||||
});
|
|
||||||
s.RunFor(TimeDelta::Seconds(20));
|
s.RunFor(TimeDelta::Seconds(20));
|
||||||
|
|
||||||
// Bandwidth decreases thanks to loss based bwe v0.
|
// Bandwidth decreases thanks to loss based bwe v0.
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace pcc {
|
namespace pcc {
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,6 @@ bool InFlightBytesTracker::NetworkRouteComparator::operator()(
|
||||||
|
|
||||||
TransportFeedbackAdapter::TransportFeedbackAdapter() = default;
|
TransportFeedbackAdapter::TransportFeedbackAdapter() = default;
|
||||||
|
|
||||||
|
|
||||||
void TransportFeedbackAdapter::AddPacket(const RtpPacketSendInfo& packet_info,
|
void TransportFeedbackAdapter::AddPacket(const RtpPacketSendInfo& packet_info,
|
||||||
size_t overhead_bytes,
|
size_t overhead_bytes,
|
||||||
Timestamp creation_time) {
|
Timestamp creation_time) {
|
||||||
|
@ -213,13 +212,13 @@ TransportFeedbackAdapter::ProcessTransportFeedbackInner(
|
||||||
size_t failed_lookups = 0;
|
size_t failed_lookups = 0;
|
||||||
size_t ignored = 0;
|
size_t ignored = 0;
|
||||||
|
|
||||||
feedback.ForAllPackets([&](uint16_t sequence_number,
|
feedback.ForAllPackets(
|
||||||
TimeDelta delta_since_base) {
|
[&](uint16_t sequence_number, TimeDelta delta_since_base) {
|
||||||
int64_t seq_num = seq_num_unwrapper_.Unwrap(sequence_number);
|
int64_t seq_num = seq_num_unwrapper_.Unwrap(sequence_number);
|
||||||
|
|
||||||
if (seq_num > last_ack_seq_num_) {
|
if (seq_num > last_ack_seq_num_) {
|
||||||
// Starts at history_.begin() if last_ack_seq_num_ < 0, since any valid
|
// Starts at history_.begin() if last_ack_seq_num_ < 0, since any
|
||||||
// sequence number is >= 0.
|
// valid sequence number is >= 0.
|
||||||
for (auto it = history_.upper_bound(last_ack_seq_num_);
|
for (auto it = history_.upper_bound(last_ack_seq_num_);
|
||||||
it != history_.upper_bound(seq_num); ++it) {
|
it != history_.upper_bound(seq_num); ++it) {
|
||||||
in_flight_.RemoveInFlightPacketBytes(it->second);
|
in_flight_.RemoveInFlightPacketBytes(it->second);
|
||||||
|
@ -244,9 +243,10 @@ TransportFeedbackAdapter::ProcessTransportFeedbackInner(
|
||||||
PacketFeedback packet_feedback = it->second;
|
PacketFeedback packet_feedback = it->second;
|
||||||
if (delta_since_base.IsFinite()) {
|
if (delta_since_base.IsFinite()) {
|
||||||
packet_feedback.receive_time =
|
packet_feedback.receive_time =
|
||||||
current_offset_ + delta_since_base.RoundDownTo(TimeDelta::Millis(1));
|
current_offset_ +
|
||||||
// Note: Lost packets are not removed from history because they might be
|
delta_since_base.RoundDownTo(TimeDelta::Millis(1));
|
||||||
// reported as received by a later feedback.
|
// Note: Lost packets are not removed from history because they might
|
||||||
|
// be reported as received by a later feedback.
|
||||||
history_.erase(it);
|
history_.erase(it);
|
||||||
}
|
}
|
||||||
if (packet_feedback.network_route == network_route_) {
|
if (packet_feedback.network_route == network_route_) {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
#include "modules/congestion_controller/rtp/transport_feedback_demuxer.h"
|
#include "modules/congestion_controller/rtp/transport_feedback_demuxer.h"
|
||||||
|
|
||||||
#include "absl/algorithm/container.h"
|
#include "absl/algorithm/container.h"
|
||||||
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
|
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ void RunTest(const TestData& test) {
|
||||||
auto dest_frame = CreateTestFrame(test.dest_frame_rect, 0);
|
auto dest_frame = CreateTestFrame(test.dest_frame_rect, 0);
|
||||||
auto src_frame = CreateTestFrame(test.src_frame_rect, 0xff);
|
auto src_frame = CreateTestFrame(test.src_frame_rect, 0xff);
|
||||||
|
|
||||||
dest_frame->CopyIntersectingPixelsFrom(
|
dest_frame->CopyIntersectingPixelsFrom(*src_frame, test.horizontal_scale,
|
||||||
*src_frame, test.horizontal_scale, test.vertical_scale);
|
test.vertical_scale);
|
||||||
|
|
||||||
// Translate the expected overlap rect to be relative to the dest frame/rect.
|
// Translate the expected overlap rect to be relative to the dest frame/rect.
|
||||||
DesktopVector dest_frame_origin = test.dest_frame_rect.top_left();
|
DesktopVector dest_frame_origin = test.dest_frame_rect.top_left();
|
||||||
|
@ -105,6 +105,7 @@ TEST(DesktopFrameTest, FrameDataSwitchesBetweenNonBlackAndBlack) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsMatchingRects) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsMatchingRects) {
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"0 origin",
|
{"0 origin",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -118,6 +119,7 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsMatchingRects) {
|
||||||
1.0, 1.0,
|
1.0, 1.0,
|
||||||
DesktopRect::MakeXYWH(-1, -1, 2, 2)}
|
DesktopRect::MakeXYWH(-1, -1, 2, 2)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
@ -125,6 +127,7 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsMatchingRects) {
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsMatchingRectsScaled) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsMatchingRectsScaled) {
|
||||||
// The scale factors shouldn't affect matching rects (they're only applied
|
// The scale factors shouldn't affect matching rects (they're only applied
|
||||||
// to any difference between the origins)
|
// to any difference between the origins)
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"0 origin 2x",
|
{"0 origin 2x",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -150,11 +153,13 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsMatchingRectsScaled) {
|
||||||
0.5, 0.5,
|
0.5, 0.5,
|
||||||
DesktopRect::MakeXYWH(-1, -1, 2, 2)}
|
DesktopRect::MakeXYWH(-1, -1, 2, 2)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsFullyContainedRects) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsFullyContainedRects) {
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"0 origin top left",
|
{"0 origin top left",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -174,11 +179,13 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsFullyContainedRects) {
|
||||||
1.0, 1.0,
|
1.0, 1.0,
|
||||||
DesktopRect::MakeXYWH(-1, 0, 1, 1)}
|
DesktopRect::MakeXYWH(-1, 0, 1, 1)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsFullyContainedRectsScaled) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsFullyContainedRectsScaled) {
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"0 origin top left 2x",
|
{"0 origin top left 2x",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -222,12 +229,14 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsFullyContainedRectsScaled) {
|
||||||
0.5, 0.5,
|
0.5, 0.5,
|
||||||
DesktopRect::MakeXYWH(-1, -1, 1, 1)}
|
DesktopRect::MakeXYWH(-1, -1, 1, 1)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsPartiallyContainedRects) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsPartiallyContainedRects) {
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"Top left",
|
{"Top left",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -253,11 +262,13 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsPartiallyContainedRects) {
|
||||||
1.0, 1.0,
|
1.0, 1.0,
|
||||||
DesktopRect::MakeXYWH(0, 1, 1, 1)}
|
DesktopRect::MakeXYWH(0, 1, 1, 1)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsPartiallyContainedRectsScaled) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsPartiallyContainedRectsScaled) {
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"Top left 2x",
|
{"Top left 2x",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -283,12 +294,14 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsPartiallyContainedRectsScaled) {
|
||||||
0.5, 0.5,
|
0.5, 0.5,
|
||||||
DesktopRect::MakeXYWH(0, 1, 1, 1)}
|
DesktopRect::MakeXYWH(0, 1, 1, 1)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsUncontainedRects) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsUncontainedRects) {
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"Left",
|
{"Left",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -315,11 +328,13 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsUncontainedRects) {
|
||||||
1.0, 1.0,
|
1.0, 1.0,
|
||||||
DesktopRect::MakeXYWH(0, 0, 0, 0)}
|
DesktopRect::MakeXYWH(0, 0, 0, 0)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DesktopFrameTest, CopyIntersectingPixelsUncontainedRectsScaled) {
|
TEST(DesktopFrameTest, CopyIntersectingPixelsUncontainedRectsScaled) {
|
||||||
|
// clang-format off
|
||||||
const TestData tests[] = {
|
const TestData tests[] = {
|
||||||
{"Left 2x",
|
{"Left 2x",
|
||||||
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
DesktopRect::MakeXYWH(0, 0, 2, 2),
|
||||||
|
@ -346,6 +361,7 @@ TEST(DesktopFrameTest, CopyIntersectingPixelsUncontainedRectsScaled) {
|
||||||
0.5, 0.5,
|
0.5, 0.5,
|
||||||
DesktopRect::MakeXYWH(0, 0, 0, 0)}
|
DesktopRect::MakeXYWH(0, 0, 0, 0)}
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
RunTests(tests, arraysize(tests));
|
RunTests(tests, arraysize(tests));
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/desktop_capture/full_screen_application_handler.h"
|
#include "modules/desktop_capture/full_screen_application_handler.h"
|
||||||
|
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/desktop_capture/full_screen_window_detector.h"
|
#include "modules/desktop_capture/full_screen_window_detector.h"
|
||||||
|
|
||||||
#include "modules/desktop_capture/full_screen_application_handler.h"
|
#include "modules/desktop_capture/full_screen_application_handler.h"
|
||||||
#include "rtc_base/time_utils.h"
|
#include "rtc_base/time_utils.h"
|
||||||
|
|
||||||
|
|
|
@ -24,12 +24,12 @@ namespace {
|
||||||
using xdg_portal::kScreenCastInterfaceName;
|
using xdg_portal::kScreenCastInterfaceName;
|
||||||
using xdg_portal::PrepareSignalHandle;
|
using xdg_portal::PrepareSignalHandle;
|
||||||
using xdg_portal::RequestResponse;
|
using xdg_portal::RequestResponse;
|
||||||
|
using xdg_portal::RequestResponseFromPortalResponse;
|
||||||
using xdg_portal::RequestSessionProxy;
|
using xdg_portal::RequestSessionProxy;
|
||||||
using xdg_portal::SetupRequestResponseSignal;
|
using xdg_portal::SetupRequestResponseSignal;
|
||||||
using xdg_portal::SetupSessionRequestHandlers;
|
using xdg_portal::SetupSessionRequestHandlers;
|
||||||
using xdg_portal::StartSessionRequest;
|
using xdg_portal::StartSessionRequest;
|
||||||
using xdg_portal::TearDownSession;
|
using xdg_portal::TearDownSession;
|
||||||
using xdg_portal::RequestResponseFromPortalResponse;
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
|
@ -449,8 +449,8 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream(
|
||||||
PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_);
|
PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_);
|
||||||
|
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
pw_core_ = pw_context_connect_fd(
|
pw_core_ = pw_context_connect_fd(pw_context_, fcntl(fd, F_DUPFD_CLOEXEC),
|
||||||
pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0);
|
nullptr, 0);
|
||||||
} else {
|
} else {
|
||||||
pw_core_ = pw_context_connect(pw_context_, nullptr, 0);
|
pw_core_ = pw_context_connect(pw_context_, nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
#include "modules/desktop_capture/linux/x11/x_error_trap.h"
|
#include "modules/desktop_capture/linux/x11/x_error_trap.h"
|
||||||
|
|
||||||
#include <atomic>
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#define MODULES_DESKTOP_CAPTURE_MAC_FULL_SCREEN_MAC_APPLICATION_HANDLER_H_
|
#define MODULES_DESKTOP_CAPTURE_MAC_FULL_SCREEN_MAC_APPLICATION_HANDLER_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "modules/desktop_capture/full_screen_application_handler.h"
|
#include "modules/desktop_capture/full_screen_application_handler.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -36,8 +36,7 @@ class DisplayStreamManager;
|
||||||
// A class to perform video frame capturing for mac.
|
// A class to perform video frame capturing for mac.
|
||||||
class ScreenCapturerMac final : public DesktopCapturer {
|
class ScreenCapturerMac final : public DesktopCapturer {
|
||||||
public:
|
public:
|
||||||
ScreenCapturerMac(
|
ScreenCapturerMac(rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor,
|
||||||
rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor,
|
|
||||||
bool detect_updated_region,
|
bool detect_updated_region,
|
||||||
bool allow_iosurface);
|
bool allow_iosurface);
|
||||||
~ScreenCapturerMac() override;
|
~ScreenCapturerMac() override;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "api/function_view.h"
|
#include "api/function_view.h"
|
||||||
#include "modules/desktop_capture/desktop_capture_types.h"
|
#include "modules/desktop_capture/desktop_capture_types.h"
|
||||||
#include "modules/desktop_capture/desktop_capturer.h"
|
#include "modules/desktop_capture/desktop_capturer.h"
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/desktop_capture/screen_capturer_helper.h"
|
#include "modules/desktop_capture/screen_capturer_helper.h"
|
||||||
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
void ScreenCapturerHelper::ClearInvalidRegion() {
|
void ScreenCapturerHelper::ClearInvalidRegion() {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#define MODULES_DESKTOP_CAPTURE_WIN_FULL_SCREEN_WIN_APPLICATION_HANDLER_H_
|
#define MODULES_DESKTOP_CAPTURE_WIN_FULL_SCREEN_WIN_APPLICATION_HANDLER_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "modules/desktop_capture/full_screen_application_handler.h"
|
#include "modules/desktop_capture/full_screen_application_handler.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -75,7 +75,6 @@ TEST_F(PacketRouterTest, Sanity_NoModuleRegistered_GeneratePadding) {
|
||||||
EXPECT_TRUE(packet_router_.GeneratePadding(bytes).empty());
|
EXPECT_TRUE(packet_router_.GeneratePadding(bytes).empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(PacketRouterTest, Sanity_NoModuleRegistered_SendRemb) {
|
TEST_F(PacketRouterTest, Sanity_NoModuleRegistered_SendRemb) {
|
||||||
const std::vector<uint32_t> ssrcs = {1, 2, 3};
|
const std::vector<uint32_t> ssrcs = {1, 2, 3};
|
||||||
constexpr uint32_t bitrate_bps = 10000;
|
constexpr uint32_t bitrate_bps = 10000;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h"
|
#include "modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.h"
|
||||||
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,8 @@ constexpr int64_t kStatisticsProcessIntervalMs = 1000;
|
||||||
|
|
||||||
StreamStatistician::~StreamStatistician() {}
|
StreamStatistician::~StreamStatistician() {}
|
||||||
|
|
||||||
StreamStatisticianImpl::StreamStatisticianImpl(uint32_t ssrc, Clock* clock,
|
StreamStatisticianImpl::StreamStatisticianImpl(uint32_t ssrc,
|
||||||
|
Clock* clock,
|
||||||
int max_reordering_threshold)
|
int max_reordering_threshold)
|
||||||
: ssrc_(ssrc),
|
: ssrc_(ssrc),
|
||||||
clock_(clock),
|
clock_(clock),
|
||||||
|
|
|
@ -549,8 +549,7 @@ TEST(RtcpReceiverTest,
|
||||||
|
|
||||||
EXPECT_THAT(
|
EXPECT_THAT(
|
||||||
receiver.GetLatestReportBlockData(),
|
receiver.GetLatestReportBlockData(),
|
||||||
UnorderedElementsAre(
|
UnorderedElementsAre(Property(
|
||||||
Property(
|
|
||||||
&ReportBlockData::report_block,
|
&ReportBlockData::report_block,
|
||||||
AllOf(Field(&RTCPReportBlock::source_ssrc, kReceiverMainSsrc),
|
AllOf(Field(&RTCPReportBlock::source_ssrc, kReceiverMainSsrc),
|
||||||
Field(&RTCPReportBlock::sender_ssrc, kSenderSsrc2),
|
Field(&RTCPReportBlock::sender_ssrc, kSenderSsrc2),
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
#include "api/transport/rtp/dependency_descriptor.h"
|
#include "api/transport/rtp/dependency_descriptor.h"
|
||||||
#include "common_video/generic_frame_descriptor/generic_frame_info.h"
|
#include "common_video/generic_frame_descriptor/generic_frame_info.h"
|
||||||
|
|
||||||
#include "test/gmock.h"
|
#include "test/gmock.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include "api/video/video_layers_allocation.h"
|
#include "api/video/video_layers_allocation.h"
|
||||||
#include "rtc_base/bit_buffer.h"
|
#include "rtc_base/bit_buffer.h"
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
|
|
||||||
#include "test/gmock.h"
|
#include "test/gmock.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -259,8 +259,7 @@ IBaseFilter* DeviceInfoDS::GetDeviceFilter(const char* deviceUniqueIdUTF8,
|
||||||
deviceFound = true;
|
deviceFound = true;
|
||||||
hr =
|
hr =
|
||||||
pM->BindToObject(0, 0, IID_IBaseFilter, (void**)&captureFilter);
|
pM->BindToObject(0, 0, IID_IBaseFilter, (void**)&captureFilter);
|
||||||
if
|
if FAILED (hr) {
|
||||||
FAILED(hr) {
|
|
||||||
RTC_LOG(LS_ERROR) << "Failed to bind to the selected "
|
RTC_LOG(LS_ERROR) << "Failed to bind to the selected "
|
||||||
"capture device "
|
"capture device "
|
||||||
<< hr;
|
<< hr;
|
||||||
|
|
|
@ -518,7 +518,6 @@ void VideoCodecTestFixtureImpl::AnalyzeAllFrames(
|
||||||
const std::vector<RateControlThresholds>* rc_thresholds,
|
const std::vector<RateControlThresholds>* rc_thresholds,
|
||||||
const std::vector<QualityThresholds>* quality_thresholds,
|
const std::vector<QualityThresholds>* quality_thresholds,
|
||||||
const BitstreamThresholds* bs_thresholds) {
|
const BitstreamThresholds* bs_thresholds) {
|
||||||
|
|
||||||
for (size_t rate_profile_idx = 0; rate_profile_idx < rate_profiles.size();
|
for (size_t rate_profile_idx = 0; rate_profile_idx < rate_profiles.size();
|
||||||
++rate_profile_idx) {
|
++rate_profile_idx) {
|
||||||
const size_t first_frame_num = rate_profiles[rate_profile_idx].frame_num;
|
const size_t first_frame_num = rate_profiles[rate_profile_idx].frame_num;
|
||||||
|
@ -799,8 +798,7 @@ bool VideoCodecTestFixtureImpl::SetUpAndInitObjects(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task_queue->SendTask(
|
task_queue->SendTask([this]() {
|
||||||
[this]() {
|
|
||||||
processor_ = std::make_unique<VideoProcessor>(
|
processor_ = std::make_unique<VideoProcessor>(
|
||||||
encoder_.get(), &decoders_, source_frame_reader_.get(), config_,
|
encoder_.get(), &decoders_, source_frame_reader_.get(), config_,
|
||||||
&stats_, &encoded_frame_writers_,
|
&stats_, &encoded_frame_writers_,
|
||||||
|
|
|
@ -51,8 +51,7 @@ class VideoProcessorTest : public ::testing::Test {
|
||||||
decoders_.push_back(std::unique_ptr<VideoDecoder>(decoder_mock_));
|
decoders_.push_back(std::unique_ptr<VideoDecoder>(decoder_mock_));
|
||||||
|
|
||||||
ExpectInit();
|
ExpectInit();
|
||||||
q_.SendTask(
|
q_.SendTask([this] {
|
||||||
[this] {
|
|
||||||
video_processor_ = std::make_unique<VideoProcessor>(
|
video_processor_ = std::make_unique<VideoProcessor>(
|
||||||
&encoder_mock_, &decoders_, &frame_reader_mock_, config_, &stats_,
|
&encoder_mock_, &decoders_, &frame_reader_mock_, config_, &stats_,
|
||||||
&encoded_frame_writers_, /*decoded_frame_writers=*/nullptr);
|
&encoded_frame_writers_, /*decoded_frame_writers=*/nullptr);
|
||||||
|
|
|
@ -145,8 +145,7 @@ T& RtpFrameReferenceFinderImpl::GetRefFinderAs() {
|
||||||
RtpFrameReferenceFinder::RtpFrameReferenceFinder()
|
RtpFrameReferenceFinder::RtpFrameReferenceFinder()
|
||||||
: RtpFrameReferenceFinder(0) {}
|
: RtpFrameReferenceFinder(0) {}
|
||||||
|
|
||||||
RtpFrameReferenceFinder::RtpFrameReferenceFinder(
|
RtpFrameReferenceFinder::RtpFrameReferenceFinder(int64_t picture_id_offset)
|
||||||
int64_t picture_id_offset)
|
|
||||||
: picture_id_offset_(picture_id_offset),
|
: picture_id_offset_(picture_id_offset),
|
||||||
impl_(std::make_unique<internal::RtpFrameReferenceFinderImpl>()) {}
|
impl_(std::make_unique<internal::RtpFrameReferenceFinderImpl>()) {}
|
||||||
|
|
||||||
|
|
|
@ -157,8 +157,7 @@ class HasFrameMatcher : public MatcherInterface<const FrameVector&> {
|
||||||
public:
|
public:
|
||||||
explicit HasFrameMatcher(int64_t frame_id,
|
explicit HasFrameMatcher(int64_t frame_id,
|
||||||
const std::vector<int64_t>& expected_refs)
|
const std::vector<int64_t>& expected_refs)
|
||||||
: frame_id_(frame_id),
|
: frame_id_(frame_id), expected_refs_(expected_refs) {}
|
||||||
expected_refs_(expected_refs) {}
|
|
||||||
|
|
||||||
bool MatchAndExplain(const FrameVector& frames,
|
bool MatchAndExplain(const FrameVector& frames,
|
||||||
MatchResultListener* result_listener) const override {
|
MatchResultListener* result_listener) const override {
|
||||||
|
|
|
@ -97,8 +97,7 @@ class BandwidthQualityScalerTest
|
||||||
: scoped_field_trial_(GetParam()),
|
: scoped_field_trial_(GetParam()),
|
||||||
task_queue_("BandwidthQualityScalerTestQueue"),
|
task_queue_("BandwidthQualityScalerTestQueue"),
|
||||||
handler_(std::make_unique<FakeBandwidthQualityScalerHandler>()) {
|
handler_(std::make_unique<FakeBandwidthQualityScalerHandler>()) {
|
||||||
task_queue_.SendTask(
|
task_queue_.SendTask([this] {
|
||||||
[this] {
|
|
||||||
bandwidth_quality_scaler_ =
|
bandwidth_quality_scaler_ =
|
||||||
std::unique_ptr<BandwidthQualityScalerUnderTest>(
|
std::unique_ptr<BandwidthQualityScalerUnderTest>(
|
||||||
new BandwidthQualityScalerUnderTest(handler_.get()));
|
new BandwidthQualityScalerUnderTest(handler_.get()));
|
||||||
|
@ -150,8 +149,7 @@ class BandwidthQualityScalerTest
|
||||||
|
|
||||||
void TriggerBandwidthQualityScalerTest(
|
void TriggerBandwidthQualityScalerTest(
|
||||||
const std::vector<FrameConfig>& frame_configs) {
|
const std::vector<FrameConfig>& frame_configs) {
|
||||||
task_queue_.SendTask(
|
task_queue_.SendTask([frame_configs, this] {
|
||||||
[frame_configs, this] {
|
|
||||||
RTC_CHECK(!frame_configs.empty());
|
RTC_CHECK(!frame_configs.empty());
|
||||||
|
|
||||||
int total_frame_nums = 0;
|
int total_frame_nums = 0;
|
||||||
|
@ -159,16 +157,15 @@ class BandwidthQualityScalerTest
|
||||||
total_frame_nums += frame_config.frame_num;
|
total_frame_nums += frame_config.frame_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(kFramerateFps * kDefaultBitrateStateUpdateInterval.seconds(),
|
||||||
kFramerateFps * kDefaultBitrateStateUpdateInterval.seconds(),
|
|
||||||
total_frame_nums);
|
total_frame_nums);
|
||||||
|
|
||||||
uint32_t time_send_to_scaler_ms_ = rtc::TimeMillis();
|
uint32_t time_send_to_scaler_ms_ = rtc::TimeMillis();
|
||||||
for (size_t i = 0; i < frame_configs.size(); ++i) {
|
for (size_t i = 0; i < frame_configs.size(); ++i) {
|
||||||
const FrameConfig& config = frame_configs[i];
|
const FrameConfig& config = frame_configs[i];
|
||||||
absl::optional<VideoEncoder::ResolutionBitrateLimits>
|
absl::optional<VideoEncoder::ResolutionBitrateLimits> suitable_bitrate =
|
||||||
suitable_bitrate = GetDefaultSuitableBitrateLimit(
|
GetDefaultSuitableBitrateLimit(config.actual_width *
|
||||||
config.actual_width * config.actual_height);
|
config.actual_height);
|
||||||
EXPECT_TRUE(suitable_bitrate);
|
EXPECT_TRUE(suitable_bitrate);
|
||||||
for (int j = 0; j <= config.frame_num; ++j) {
|
for (int j = 0; j <= config.frame_num; ++j) {
|
||||||
time_send_to_scaler_ms_ += kDefaultEncodeTime.ms();
|
time_send_to_scaler_ms_ += kDefaultEncodeTime.ms();
|
||||||
|
@ -176,8 +173,8 @@ class BandwidthQualityScalerTest
|
||||||
GetFrameSizeBytes(config, suitable_bitrate.value());
|
GetFrameSizeBytes(config, suitable_bitrate.value());
|
||||||
RTC_CHECK(frame_size_bytes > 0);
|
RTC_CHECK(frame_size_bytes > 0);
|
||||||
bandwidth_quality_scaler_->ReportEncodeInfo(
|
bandwidth_quality_scaler_->ReportEncodeInfo(
|
||||||
frame_size_bytes, time_send_to_scaler_ms_,
|
frame_size_bytes, time_send_to_scaler_ms_, config.actual_width,
|
||||||
config.actual_width, config.actual_height);
|
config.actual_height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "modules/video_coding/utility/ivf_file_reader.h"
|
#include "modules/video_coding/utility/ivf_file_reader.h"
|
||||||
#include "modules/video_coding/utility/ivf_file_writer.h"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "modules/video_coding/utility/ivf_file_writer.h"
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
#include "test/testsupport/file_utils.h"
|
#include "test/testsupport/file_utils.h"
|
||||||
|
|
||||||
|
|
|
@ -72,8 +72,7 @@ class QualityScalerTest : public ::testing::Test,
|
||||||
: scoped_field_trial_(GetParam()),
|
: scoped_field_trial_(GetParam()),
|
||||||
task_queue_("QualityScalerTestQueue"),
|
task_queue_("QualityScalerTestQueue"),
|
||||||
handler_(std::make_unique<FakeQpUsageHandler>()) {
|
handler_(std::make_unique<FakeQpUsageHandler>()) {
|
||||||
task_queue_.SendTask(
|
task_queue_.SendTask([this] {
|
||||||
[this] {
|
|
||||||
qs_ = std::unique_ptr<QualityScaler>(new QualityScalerUnderTest(
|
qs_ = std::unique_ptr<QualityScaler>(new QualityScalerUnderTest(
|
||||||
handler_.get(), VideoEncoder::QpThresholds(kLowQp, kHighQp)));
|
handler_.get(), VideoEncoder::QpThresholds(kLowQp, kHighQp)));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue