Commit Graph

226 Commits

Author SHA1 Message Date
d9faa46d57 Changing to using factory methods for some classes in NetEq
In this CL, the Expand, Accelerate and PreemptiveExpand objects are
created using factory methods. The factory methods are injected into
NetEqImpl on creation. This is a step towards implementing a no-decode
operation.

BUG=2776
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6999005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5382 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-14 10:18:45 +00:00
d0b436a935 Revert "Activate ACM test for Android in modules_tests." (rev5364).
TBR=turaj@webrtc.org,tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6999006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5372 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-13 13:15:59 +00:00
2c03bf1641 Increasing simulation time for NetEqPerformanceTest
This is to get better "signal-to-noise ratio" in the performance bots.
The neteq4-runtime metric is expected to increase by a factor of 10.

BUG=2397
TBR=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6989005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5369 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-13 09:04:23 +00:00
7cc64b3747 Activate ACM test for Android in modules_tests.
TEST=local on Nexus 7.
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6589004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5364 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-10 22:35:09 +00:00
a366e810a9 Adding NetEq performance test to webrtc_perf_tests
The performance test is based on the neteq4_speed_test application. The
bulk of the test code is extracted into a test class, and included into
the neteq_unittest_tools target. The actual gtest that runs the
performance test is implemented in neteq_performance_unittest.cc, and
built as a part of webrtc_perf_tests.

The old stand-alone test application is now made dependent on the new
test class, to avoid code duplication.

BUG=2397
R=andrew@webrtc.org, kjellander@webrtc.org, turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6749004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5362 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-10 08:24:04 +00:00
e7ce437333 Fixing lint errors in NetEq4
Just taking care of a few old lint errors.

R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6799004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5359 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-09 14:01:55 +00:00
60730cfe3c Remove the requirement to call set_sample_rate_hz and friends.
Instead have ProcessStream transparently handle changes to the stream
audio parameters (sample rate and channels). This removes two locks
per 10 ms ProcessStream call taken by VoiceEngine (four total with the
audio level indicator.)

Also, prepare future improvements by having the splitting filter take
a length parameter. This will allow it to work at different sample
rates. Remove the useless splitting_filter wrapper.

TESTED=voe_cmd_test with audio processing enabled and switching between
codecs; unit tests.

R=aluebs@webrtc.org, bjornv@webrtc.org, turaj@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/3949004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5346 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-07 17:45:09 +00:00
24301a67c6 Update talk to 58174641 together with http://review.webrtc.org/4319005/.
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/5809004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5287 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-13 19:17:43 +00:00
a92baead39 ACM 2 compatibility with ACM 1.
Removing an unregisterd codec from ACM 1 does not result in an error, so should be for ACM 2. Also ACM 1 has post-decode VAD on and AMC 2 needs to have it on by default.

BUG=
Test=trybits

R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/5549005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5276 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-13 00:10:44 +00:00
f9bdbe3619 Roll chromium_revision 232627:238260
This brings us the updated swarming_client
that has moved out from Chromium into a standalone
project.
Because of this, all .isolate files needed to be
updated as well, similar to the changes in
https://codereview.chromium.org/29993003

TEST=trybots passing
BUG=none
R=andrew@webrtc.org, perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4859004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5260 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-11 13:37:12 +00:00
917306d3fd Change uses of the obsolete armv7 setting to arm_version==7.
BUG=http://crbug.com/234135
R=andrew@webrtc.org, fischman@webrtc.org, kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/5369004

Patch from Mostyn Bramley-Moore <mostynb@opera.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5250 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-10 09:26:07 +00:00
eb7def234e Fix compilation errors on Fedora 20.
peerconnection_jni.cc: syscall() comes from <unistd.h>
RTPtimeshift.cc: char* being compared to 0 instead of the atoi() of it
rtp_payload_registry_unittest.cc: avoid narrowing int to uint32.

BUG=2700
R=andrew@webrtc.org, fischman@webrtc.org, henrik.lundin@webrtc.org, henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/5019004

Patch from Victor Costan <costan@gmail.com>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5248 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-09 21:34:30 +00:00
b477fa6d21 Small fixes to plot_neteq_delay.m
Fixing problems with wrap-arounds and other small things. Adding an
extra output value.

Review URL: https://webrtc-codereview.appspot.com/4929004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5210 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-04 12:28:47 +00:00
9523b55826 Fix a typo in neteq.gypi
This CL is for NetEq3. The #define for iSAC-fb was wrong on one
line. It did not affect the defualt use case, but resulted in
errors if 48 kHz mode was enabled.

TBR=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4909004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5208 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-04 08:24:49 +00:00
5ecdef11cc Do not use recursive calling in NetEq test tools
This CL removes recursive calling in:
- NETEQTEST_DummyRTPpacket::readFromFile,
- NETEQTEST_RTPpacket::readFromFile.

The files currently exist for both NetEq3 and NetEq4, and all are
changed with this CL.

R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4699004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5200 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-03 08:26:49 +00:00
8418e9696b Fixing NetEq tests for new Opus version
The new version of Opus doesn't generate the same number of bytes encoding the test vectors in audio_decoder_unittest. Therefore the test was updated not to check the length of the encoded packet, to prepare for the coming roll of Opus. Same change was applied to iSAC, which can also generate different number of bytes on different platforms.

BUG=1459
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4609004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5195 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-29 09:30:43 +00:00
5272eb8d83 Don't register iSAC-swb and iSAC-fb in NetEqDecodingTest.
Android bots break due to r5164. This CL patches that issue.

BUG=
TEST=modules_unittests on local device.
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4309004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5166 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-23 00:11:32 +00:00
78b41a09bd Fix issues with sequence number wrap-around in jitter statistics.
Related CL for NetEq 3 is https://code.google.com/p/webrtc/source/detail?r=5150

Jitter statistics was not very sensitive to timestamp warp-around, and NetEqDecodingTest.TimestampWrap *DID NOT* fail before fixes applied. However, we still keep the test.

The criteria for the tests are not satisfied for first few packets, before any wrap-around happens. We could either relax the bound or ignore the first few packets. We chose the latter.

BUG=2662
TEST=modules_unittests,trybots
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4219004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5164 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-22 20:27:07 +00:00
1e8c93c953 Distinguish instances of ACM1 from ACM2 by a version string. This is fpr testing purposes and will be removed when the experiment is done and ACM1 is fade out.
BUG=
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4069006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5161 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-22 17:04:49 +00:00
6f6ba6edee Fix issues with sequence number wrap-around in jitter statistics
Wrap-arounds in sequence numbers (and in timestamps) were not always
treated correctly. This is fixed by introducing two helper functions
for correct comparisons, and by casting to the right word size.

Also added a new member variable to AutomodeInst_t. The new member keeps
track of when the first packet has been registered in the automode code.
This was previously done implicitly (and not very good) using the fact
that the lastSeqNo and lastTimestamp members were initialized to zero.

Two new unit tests were added as part of this CL.
NetEqDecodingTest.SequenceNumberWrap was failing before the fixes were
made; now it is ok.

BUG=2654
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4139004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5150 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-21 13:17:29 +00:00
7a05ae5c69 Adding back main() to the test. Now it is possible to choose between ACM1 and ACM2, furthermore, the test can simulate a channel with packet loss and FEC can be activated. Packet loss pattern is based on channel implementation in Channel{.cc,.h}, which currently is a determenistic pattern with 1 every 3rd packet is discarded.
The main() was deleted in r4731.

BUG=
R=andrew@webrtc.org, minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2370004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5132 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-18 18:16:53 +00:00
e8433eb115 Reimplementing NetEq4's AudioVector
The current implementation using std::vector is too slow.
This CL introduces a new implementation, using a regular
array as data container.

In AudioMultiVector::ReadInterleavedFromIndex, a special case for
1 channel was implemented, to further reduce runtime. Finally,
AudioMultiVector::Channels was reimplemented.

The changes in this CL reduces the runtime of neteq4_speed_test
by 33%.

BUG=1363
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/3509004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5115 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-12 13:15:02 +00:00
3e427263ee Reducing opus_test runtime to pass Android test
BUG=2609
R=solenberg@webrtc.org, tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/3639004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5111 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-11 22:03:52 +00:00
57eb858698 Remove ".." from include_dirs in build/common.
BUG=1662
TEST=compile on trybots
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2332004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5107 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-11 10:20:27 +00:00
58cd31665c Address Clag Analyzer issues.
Following are the issues related to NetEq 4, discovered by Clang Analyzer.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-b44b95.html#EndPath
Valid; perhaps unlikely, addressed.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-6beef6.html#EndPath
Valid, addressed.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-2e3883.html#EndPath
Valid; Addressed

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-293659.html#EndPath
Valid; Addressed.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-b875cd.html#EndPath
Valid; Addressed.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/index.html
Not valid;

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-86f2ed.html#EndPath
Not Valid; the assert statement will be short-circuited, however I also added a check of nullity of |packet|.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-3a5669.html#EndPath
Not Valid: |energy_input| and |energy_expand| are both non-negative, therefore if-statement condition on line 226 is not satisfied unless |energy_input| >= 1. Therefore |energy_input| cannot be zero after normalization to 14-bits, i.e. operations on lines 228 & 229.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-2f914f.html#EndPath
Valid; addressed.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-2332b1.html#EndPath
Valid; addressed.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-de8dea.html#EndPath
Not valid; |out_len| is set when Process() is called, however, it makes sense to initialize to zero when declaring |out_len|.

https://x20web.corp.google.com/~pbos/scan-build-2013-10-10-1/report-b671a3.html#EndPath
Valid; addressed.

BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2729005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5064 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-31 15:15:55 +00:00
55e1723713 Avoid a leak in AudioCodingModuleTest.TestIsac. The leak was caught by LSAN.
BUG=2515
TEST=reproduced locally on linux and verified the fix resolves the issue.
R=henrik.lundin@webrtc.org, kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2499004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5048 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-29 04:40:09 +00:00
fe5d36b6fe Move RtcpStatistics to webrtc/common_types.h, to be used by vie as well.
We will do some refactoring of video engine and would like to use the
same rtcp stats struct there. Both video and audio seem to use 8bit
fraction lost, so that is changed in the struct as well.

BUG=
R=henrik.lundin@webrtc.org, kjellander@webrtc.org, mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2959004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5039 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-28 09:21:07 +00:00
31628aae7e Upgrade scoped_ptr to Chromium's latest version.
Analogous to the recent libjingle change: http://cl/54929753-p10.
This supports scoped_ptr<T[]> and scoped_ptr<C, FreeDeleter> rather
than scoped_array and scoped_ptr_malloc respectively.

- Add Chromium's template-based COMPILE_ASSERT. We didn't have this
previously in order to support the macro in C. Instead, move the
existing macro to compile_assert_c.h.
- Additionally copy the move.h and template_util.h depedencies and add
the WARN_UNUSED_RESULT macro.
- Leave scoped_array and scoped_ptr_malloc for now, but mark as
deprecated.
- Remove scoped_ptr foo(NULL) use. The default constructor handles it.
- Remove the now redundant COMPILE_ASSERT from peerconnection_jni.cc.
- Add a CHECK_ARRAY_SIZE macro to rtp_format_vp8_unittest.cc to remove
some repeated code.

TESTED=trybots
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2449005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5015 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-22 12:50:00 +00:00
621df678c8 WEBRTC_{BIG, LITTLE}_ENDIAN -> WEBRTC_ARCH_{BIG, LITTLE}_ENDIAN.
Mostly to remove a long-standing TODO...

TESTED=trybots
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2369005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5013 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-22 10:27:23 +00:00
1871dd2fb7 NetEq4: Removing templatization for AudioVector
This is the last CL for removing templates in Audio(Multi)Vector.

BUG=1363
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2341004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4960 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-14 20:33:25 +00:00
6d5d248075 Wrap ACM2 code inside acm2 namespace. This gurantees that one ACM would not use components of others by accident.
BUG=
R=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2344004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4933 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-06 04:47:28 +00:00
f31639612d Accounting for wrap-around of timestamps.
BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2340006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4932 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-06 02:21:24 +00:00
3f9288f987 Add APK and isolate target for video_engine_tests
Add .isolate file and _run target for video_engine_tests.

Move tools/swarm_client to be untracked in all .isolate file,
so refactorings in swarm_client doesn't require us updating
all our .isolate files (similar to the changes for the
Chromium tests done in:
https://src.chromium.org/viewvc/chrome?view=rev&revision=218844)

Update modules_unittests.isolate with new NetEq4 reference files
needed.

TEST=trybots passing
I also setup a Chromium workspace where I patched third_party/webrtc
with the changes in this CL, followed by compiling with the settings
described in
https://code.google.com/p/webrtc/issues/detail?id=1882#c11
I then verified that the video_engine_tests_apk dir was created
in the output folder.
BUG=1916,2462
R=andrew@webrtc.org, henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2344007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4925 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-04 18:20:38 +00:00
7ee3efb0d8 Disable Receiver unittests on Android.
BUG=
TBR=minyue@google.com

Review URL: https://webrtc-codereview.appspot.com/2344005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4909 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-03 00:05:15 +00:00
6ea3d1cc9e ACM test are modified to run with both ACM1 and ACM2.
Beside the changes in test files. acm2/acm_generic_codec.cc and acm2/audio_coding_module_impl.cc are modified to fix a bug.

Also, nack{.cc, .h, _unittest.cc} are removed form main/sourc as nack files in both ACM1 and ACM2 are essentially identical.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2192005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4908 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-02 21:44:33 +00:00
2a97317953 Fix include of isolate.gypi
Recent changes in GYP seem to have broken our previous
"hack" for getting the GYP rule for .isolate files
imported from the Chromium build/isolate.gypi.

The best solution for now is to remove the hack
and check in a copy of Chromium's src/build/isolate.gypi
in WebRTC's build/ dir instead. A similar approach is
used for our build/protoc.gypi file.

TEST=On Linux, I successfully ran:
gclient runhooks
ninja -C out/Release
and verified a bunch of .isolated files were created in
out/Release (which didn't happen before this patch).

I also renamed the build/isolate.gypi from Chromium to
ensure that our own is used and not that one (in case any
paths would be incorrect).

I also ran build/gyp_chromium in a Chromium checkout
with WebRTC in third_party/webrtc having this patch applied
to ensure GYP processing was still working.

Finally, I verified that the same project generation and
compilation from a Chromium checkout worked the way we build
our Android native tests, using:
. build/android/envsetup.sh
GYP_DEFINES="$GYP_DEFINES include_tests=1 enable_tracing=1" gclient runhooks
ninja -C out/Release android_builder_webrtc

BUG=1916
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2338004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4907 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-02 19:31:16 +00:00
4887114af7 Remove templatization of the AudioVector test
This CL converts the unit tests for AudioVector from typed tests to
regular tests. It is in preparation for removing templatization for
AudioVector in an upcoming CL.

BUG=1363
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2319005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4903 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-02 15:07:28 +00:00
a6101d76f4 Update sampling rate and number of channels of NetEq4 if decoder is changed.
We encounter a sample-underrun if NetEq is initialized with a sampling rate fs =16000 and receive Opus packets with frame-size less than 5 ms. The reason is as follows.

Let say NetEq buffer has 4 packets of Opus each of size 2.5ms this means that internally timestamp of packets incremented by 80 (internally Opus treated as 32 kHz codec). Given the initial sampling rate of NetEq, at the first time that it wants to fetch packets, it targets to fetch 160 samples. Therefore, it will only extracts 2 packets. Decoding these packets give us exactly 160 samples (5 ms at 32 kHz), however, upon decoding the first packet the internal sampling rate will be updated to 32 kHz. So it is expected that sync buffer to deliver 320 samples while it does only have 160 samples (or maybe few more as it starts with some zeros). And we encounter and under-run.

Even if we ignore the under-run  "assert(sync_buffer_->FutureLength() >= expand_->overlap_length())" (neteq_impl.cc::811) is trigered. I'm not sure what happens if we remove this assert perhaps NetEq will work fine in subsequent calls. However the first under-run is blocking ACM2 test to pass.

Here I have a solution to update sample rate as soon as a packet is inserted, if required. It not a very efficient approach as we do the same reset in NetEqImpl::Decode().

It is a bit tricky to reproduce this because the TOT ACM tests do not run ACM2. In https://webrtc-codereview.appspot.com/2192005/ I have a patch to run both ACMs. To reproduce the problem, one can patch that CL and run

$ out/Debug/modules_tests --gtest_filter=AudioCodingModuleTest.TestOpus

Note that we would not encounter any problem if NetEq4 is initiated with 32000 Hz sampling rate. You can test this by setting |kNeteqInitSampleRateHz| to 32000 in webrtc/modules/audio_coding/main/acm2/acm_receiver.cc

BUG=
R=andrew@webrtc.org, henrik.lundin@webrtc.org, kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2306004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4896 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-01 22:01:09 +00:00
522227012d Reset audio bufer if codec changes, b/10835525.
If there is audio in a codec's audio buffer and sample-rate or number of channels change the audio buffer has to reset. Otherwise, the amount of audio in the buffer is misinterpreted any syncronization between 10ms audio blocks and their associated timestamps is lost.

For instance, assume changing from stereo to mono when there is 10ms stereo in the buffer. The "new" codec will interpret this as 20 ms audio, therefore, 2 blocks of 10 ms, but there is only one timestamp. This will results in  ACMGenericCodec::in_timestamp_ix_write_ updated to a negative number after an encode is performed.

The drawback with this solution is that if packet-size of the codec is changed then audio buffer is reset wich is not necessary. We accept this as it is a rare case in practice that clients of ACM re-register send codecs to change packet-size.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2151006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4887 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-01 01:17:37 +00:00
fd11bbfb56 NetEq4: Removing templatization for AudioMultiVector
This saves approx 6% runtime for neteq4_speed_test.
$ time out/Release/neteq4_speed_test --runtime_ms=50000000

BUG=1363
R=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2320006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4885 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-30 20:38:44 +00:00
6ad6a07fd3 Support for CELT in NetEq4.
BUG=1359
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2291004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4884 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-30 20:07:39 +00:00
4cd76221dc Revert 4876 "Support for CELT in NetEq4."
> Support for CELT in NetEq4.
> 
> BUG=1359
> R=henrik.lundin@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/2291004

TBR=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2320007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4879 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-30 12:25:45 +00:00
a20a22a0bd Support for CELT in NetEq4.
BUG=1359
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2291004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4876 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-28 16:31:25 +00:00
137b3793d9 Only use -lm on Linux in ISAC.
Remove unneeded WEBRTC_LINUX define.

BUG=crbug.com/298656
TESTED=Passed trybots.
R=wjia@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2313004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4865 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-27 18:16:28 +00:00
7b75ac6756 Sync-packet insertion into NetEq4. This is related to r3883 & r4052 for NetEq 3.
BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2099004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4850 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-26 00:27:56 +00:00
3fdeddb59a Disable a NetEq unittest on Android. The test tries to register iSAC-swb as send codec and fails.
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2303004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4845 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 22:19:22 +00:00
3e7703640f Remove unused constants, so chrome can enable a warning for that. Patch from thakis@
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2296006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4844 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 22:05:05 +00:00
0c0fae8a5e Re-enable verbose logging in NetEq4.
Using neteq4_speed_test there no complexity penalty is observed when verbose
logging is enabled.

BUG=2317
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2293004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4841 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 17:42:17 +00:00
d6a7a5f385 Small fixes to run ACM2 tests.
BUG=
R=minyue@google.com

Review URL: https://webrtc-codereview.appspot.com/2238004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4836 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 01:09:23 +00:00
ff43c85ef1 API add to set background noise mode.
Background noise mode.

BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2194005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4835 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 00:07:27 +00:00