summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c12
-rw-r--r--modules/audio_coding/codecs/isac/fix/source/pitch_filter.c16
-rw-r--r--modules/audio_coding/main/acm2/audio_coding_module_impl.cc1
-rw-r--r--modules/audio_coding/main/source/audio_coding_module_impl.cc1
-rw-r--r--modules/audio_coding/neteq4/neteq_impl.cc11
-rw-r--r--modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc5
-rw-r--r--modules/audio_processing/aecm/aecm_core.c2
-rw-r--r--modules/audio_processing/utility/delay_estimator_wrapper.c2
-rw-r--r--modules/desktop_capture/win/cursor.cc3
-rw-r--r--modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc69
-rw-r--r--modules/video_coding/main/test/rtp_player.cc1
11 files changed, 39 insertions, 84 deletions
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
index a1dced98..9c4e5875 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.c
@@ -8,20 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-/*
- * pitch_estimator.c
- *
- * Pitch filter functions
- *
- */
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h"
#ifdef WEBRTC_ARCH_ARM_NEON
#include <arm_neon.h>
#endif
-#include "pitch_estimator.h"
-#include "signal_processing_library.h"
-#include "system_wrappers/interface/compile_assert.h"
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/system_wrappers/interface/compile_assert_c.h"
/* log2[0.2, 0.5, 0.98] in Q8 */
static const int16_t kLogLagWinQ8[3] = {
diff --git a/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c b/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c
index df961a7a..c3db01c6 100644
--- a/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c
+++ b/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c
@@ -8,18 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-/*
- * pitch_filter.c
- *
- * Pitch filter functions
- *
- */
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h"
-#include "common_audio/signal_processing/include/signal_processing_library.h"
-#include "modules/audio_coding/codecs/isac/fix/source/pitch_estimator.h"
-#include "modules/audio_coding/codecs/isac/fix/source/settings.h"
-#include "modules/audio_coding/codecs/isac/fix/source/structs.h"
-#include "system_wrappers/interface/compile_assert.h"
+#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h"
+#include "webrtc/system_wrappers/interface/compile_assert_c.h"
// Number of segments in a pitch subframe.
static const int kSegments = 5;
diff --git a/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
index 911605e8..59d5727a 100644
--- a/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
+++ b/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
@@ -140,7 +140,6 @@ AudioCodingModuleImpl::AudioCodingModuleImpl(int id)
receiver_initialized_(false),
callback_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
secondary_send_codec_inst_(),
- secondary_encoder_(NULL),
codec_timestamp_(expected_codec_ts_),
first_10ms_data_(false) {
diff --git a/modules/audio_coding/main/source/audio_coding_module_impl.cc b/modules/audio_coding/main/source/audio_coding_module_impl.cc
index 62a13c57..38027338 100644
--- a/modules/audio_coding/main/source/audio_coding_module_impl.cc
+++ b/modules/audio_coding/main/source/audio_coding_module_impl.cc
@@ -154,7 +154,6 @@ AudioCodingModuleImpl::AudioCodingModuleImpl(const int32_t id, Clock* clock)
last_detected_tone_(kACMToneEnd),
callback_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
secondary_send_codec_inst_(),
- secondary_encoder_(NULL),
initial_delay_ms_(0),
num_packets_accumulated_(0),
num_bytes_accumulated_(0),
diff --git a/modules/audio_coding/neteq4/neteq_impl.cc b/modules/audio_coding/neteq4/neteq_impl.cc
index 4ed39764..a5c45ff7 100644
--- a/modules/audio_coding/neteq4/neteq_impl.cc
+++ b/modules/audio_coding/neteq4/neteq_impl.cc
@@ -59,8 +59,7 @@ NetEqImpl::NetEqImpl(int fs,
PacketBuffer* packet_buffer,
PayloadSplitter* payload_splitter,
TimestampScaler* timestamp_scaler)
- : background_noise_(NULL),
- buffer_level_filter_(buffer_level_filter),
+ : buffer_level_filter_(buffer_level_filter),
decoder_database_(decoder_database),
delay_manager_(delay_manager),
delay_peak_detector_(delay_peak_detector),
@@ -70,14 +69,6 @@ NetEqImpl::NetEqImpl(int fs,
payload_splitter_(payload_splitter),
timestamp_scaler_(timestamp_scaler),
vad_(new PostDecodeVad()),
- algorithm_buffer_(NULL),
- sync_buffer_(NULL),
- expand_(NULL),
- normal_(NULL),
- merge_(NULL),
- accelerate_(NULL),
- preemptive_expand_(NULL),
- comfort_noise_(NULL),
last_mode_(kModeNormal),
mute_factor_array_(NULL),
decoded_buffer_length_(kMaxFrameSize),
diff --git a/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc b/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
index da16814d..c5cf137f 100644
--- a/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
+++ b/modules/audio_conference_mixer/source/audio_conference_mixer_impl.cc
@@ -124,8 +124,6 @@ AudioConferenceMixerImpl::AudioConferenceMixerImpl(int id)
_scratchMixedParticipants(),
_scratchVadPositiveParticipantsAmount(0),
_scratchVadPositiveParticipants(),
- _crit(NULL),
- _cbCrit(NULL),
_id(id),
_minimumMixingFreq(kLowestPossible),
_mixReceiver(NULL),
@@ -142,8 +140,7 @@ AudioConferenceMixerImpl::AudioConferenceMixerImpl(int id)
_timeStamp(0),
_timeScheduler(kProcessPeriodicityInMs),
_mixedAudioLevel(),
- _processCalls(0),
- _limiter(NULL)
+ _processCalls(0)
{}
bool AudioConferenceMixerImpl::Init()
diff --git a/modules/audio_processing/aecm/aecm_core.c b/modules/audio_processing/aecm/aecm_core.c
index a44ce08d..2c0a40f0 100644
--- a/modules/audio_processing/aecm/aecm_core.c
+++ b/modules/audio_processing/aecm/aecm_core.c
@@ -18,7 +18,7 @@
#include "webrtc/modules/audio_processing/aecm/include/echo_control_mobile.h"
#include "webrtc/modules/audio_processing/utility/delay_estimator_wrapper.h"
#include "webrtc/modules/audio_processing/utility/ring_buffer.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
+#include "webrtc/system_wrappers/interface/compile_assert_c.h"
#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
#include "webrtc/typedefs.h"
diff --git a/modules/audio_processing/utility/delay_estimator_wrapper.c b/modules/audio_processing/utility/delay_estimator_wrapper.c
index c358f138..b72b8ffa 100644
--- a/modules/audio_processing/utility/delay_estimator_wrapper.c
+++ b/modules/audio_processing/utility/delay_estimator_wrapper.c
@@ -16,7 +16,7 @@
#include "webrtc/modules/audio_processing/utility/delay_estimator.h"
#include "webrtc/modules/audio_processing/utility/delay_estimator_internal.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
+#include "webrtc/system_wrappers/interface/compile_assert_c.h"
// Only bit |kBandFirst| through bit |kBandLast| are processed and
// |kBandFirst| - |kBandLast| must be < 32.
diff --git a/modules/desktop_capture/win/cursor.cc b/modules/desktop_capture/win/cursor.cc
index 6e0fd4eb..11bb2dbb 100644
--- a/modules/desktop_capture/win/cursor.cc
+++ b/modules/desktop_capture/win/cursor.cc
@@ -78,7 +78,8 @@ void AddCursorOutline(int width, int height, uint32_t* data) {
// Premultiplies RGB components of the pixel data in the given image by
// the corresponding alpha components.
void AlphaMul(uint32_t* data, int width, int height) {
- COMPILE_ASSERT(sizeof(uint32_t) == kBytesPerPixel);
+ COMPILE_ASSERT(sizeof(uint32_t) == kBytesPerPixel,
+ size_of_uint32_should_be_the_bytes_per_pixel);
for (uint32_t* data_end = data + width * height; data != data_end; ++data) {
RGBQUAD* from = reinterpret_cast<RGBQUAD*>(data);
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
index bcd1d10c..1d8b2be3 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
@@ -8,19 +8,20 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-
/*
* This file includes unit tests for the VP8 packetizer.
*/
#include "testing/gtest/include/gtest/gtest.h"
-
-#include "webrtc/system_wrappers/interface/compile_assert.h"
-
#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h"
+#include "webrtc/system_wrappers/interface/compile_assert.h"
#include "webrtc/typedefs.h"
+#define CHECK_ARRAY_SIZE(expected_size, array) \
+ COMPILE_ASSERT(expected_size == sizeof(array) / sizeof(array[0]), \
+ check_array_size);
+
namespace webrtc {
class RtpFormatVp8Test : public ::testing::Test {
@@ -63,10 +64,8 @@ TEST_F(RtpFormatVp8Test, TestStrictMode) {
const bool kExpectedFragStart[] =
{true, false, true, true, false, false, false};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
@@ -91,10 +90,8 @@ TEST_F(RtpFormatVp8Test, TestAggregateMode) {
const int kExpectedPart[] = {0, 0, 0, 1};
const bool kExpectedFragStart[] = {true, false, false, true};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
@@ -119,10 +116,8 @@ TEST_F(RtpFormatVp8Test, TestAggregateModeManyPartitions1) {
const int kExpectedPart[] = {0, 0, 1, 5};
const bool kExpectedFragStart[] = {true, false, true, true};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
@@ -147,10 +142,8 @@ TEST_F(RtpFormatVp8Test, TestAggregateModeManyPartitions2) {
const int kExpectedPart[] = {0, 0, 1, 4, 4, 5};
const bool kExpectedFragStart[] = {true, false, true, true, false, true};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
@@ -175,10 +168,8 @@ TEST_F(RtpFormatVp8Test, TestAggregateModeTwoLargePartitions) {
const int kExpectedPart[] = {0, 0, 1, 1};
const bool kExpectedFragStart[] = {true, false, true, false};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
@@ -203,10 +194,8 @@ TEST_F(RtpFormatVp8Test, TestEqualSizeModeFallback) {
// Frag start only true for first packet in equal size mode.
const bool kExpectedFragStart[] = {true, false, false, false};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->set_sloppy_partitioning(true);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
@@ -232,10 +221,8 @@ TEST_F(RtpFormatVp8Test, TestNonReferenceBit) {
// Frag start only true for first packet in equal size mode.
const bool kExpectedFragStart[] = {true, false};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->set_sloppy_partitioning(true);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
@@ -265,10 +252,8 @@ TEST_F(RtpFormatVp8Test, TestTl0PicIdxAndTID) {
const int kExpectedPart[1] = {0}; // Packet starts with partition 0.
const bool kExpectedFragStart[1] = {true};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
@@ -295,10 +280,8 @@ TEST_F(RtpFormatVp8Test, TestKeyIdx) {
const int kExpectedPart[1] = {0}; // Packet starts with partition 0.
const bool kExpectedFragStart[1] = {true};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
@@ -326,10 +309,8 @@ TEST_F(RtpFormatVp8Test, TestTIDAndKeyIdx) {
const int kExpectedPart[1] = {0}; // Packet starts with partition 0.
const bool kExpectedFragStart[1] = {true};
const int kExpectedNum = sizeof(kExpectedSizes) / sizeof(kExpectedSizes[0]);
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedPart) / sizeof(kExpectedPart[0]));
- COMPILE_ASSERT(kExpectedNum ==
- sizeof(kExpectedFragStart) / sizeof(kExpectedFragStart[0]));
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedPart);
+ CHECK_ARRAY_SIZE(kExpectedNum, kExpectedFragStart);
helper_->GetAllPacketsAndCheck(&packetizer, kExpectedSizes, kExpectedPart,
kExpectedFragStart, kExpectedNum);
diff --git a/modules/video_coding/main/test/rtp_player.cc b/modules/video_coding/main/test/rtp_player.cc
index 6af43893..99651431 100644
--- a/modules/video_coding/main/test/rtp_player.cc
+++ b/modules/video_coding/main/test/rtp_player.cc
@@ -326,7 +326,6 @@ class RtpPlayerImpl : public RtpPlayerInterface {
float loss_rate, uint32_t rtt_ms, bool reordering)
: ssrc_handlers_(payload_sink_factory, payload_types),
clock_(clock),
- packet_source_(NULL),
next_rtp_time_(0),
first_packet_(true),
first_packet_rtp_time_(0),