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
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
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
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
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
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
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
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
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
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
362a55e7b0
Address Windows 64-bits warnings.
...
R=henrik.lundin@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2203004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4803 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-20 16:25:28 +00:00
0d5da25e6c
NetEq4: Making a few more members scoped_ptrs
...
This CL converts a few members in NetEqImpl form regular pointers
to scoped_ptrs.
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2245004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4783 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-18 21:12:38 +00:00
40d3fc65f5
NetEq4: Make some DSP operation classes member variables
...
This CL reduces the memory allocations by making the instances of
Accelerate, PreemptiveExpand, Normal and Merge member variables in
NetEqImpl.
This change reduced the allocation count by 20,000 in the bit-exactness
test.
BUG=Issue 1363
TEST=out/Debug/modules_unittests
--gtest_filter=NetEqDecodingTest.TestBitExactness
R=andrew@webrtc.org , minyue@webrtc.org , turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2158004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4776 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-18 12:19:50 +00:00
036b7436df
Adding APIs. These APIs are not implemented yet, they are to help developement of ACM.
...
Un-implemented APIs.
TBR=henrik.lundin@webrtc.org
BUG=
Review URL: https://webrtc-codereview.appspot.com/2191008
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4725 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-11 18:45:02 +00:00
b3e905cd91
Disable all LS_VERBOSE logging in NetEq4
...
This reduces exectution time of NetEqDecodingTest.TestBitExactness
with almost 30% and reduces the allocation count (from valgrind)
with almost 50% for the same test.
An issue has been created to re-enable logs when logging performance
is improved; see https://code.google.com/p/webrtc/issues/detail?id=2317 .
BUG=1363
TEST=out/Release/modules_unittests --gtest_filter=NetEqDecodingTest.TestBitExactness
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2136004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4652 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-02 09:41:06 +00:00
c487c6abb0
NetEq4: Make the algorithm buffer a member variable
...
This reduces the alloc count by more than 100,000 for
NetEqDecodingTest.TestBitExactness.
BUG=1363
TEST=out/Release/modules_unittests --gtest_filter=NetEqDecodingTest.TestBitExactness
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2119004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4651 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-02 07:59:30 +00:00
3170b5750f
Reorder and add critical section to the public method NetEqImpl::PacketBufferStatistics().
...
R=henrik.lundin@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2107005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4644 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-30 15:36:53 +00:00
d7301775f5
update neteq 4 to facilitate NACK
...
BUG=
R=turaj@webrtc.org , turajs@google.com
Review URL: https://webrtc-codereview.appspot.com/2008004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4637 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-29 00:58:14 +00:00
f1efc57139
Implementing APIs to set maximum and minimum for latency.
...
cpplint warnning fixed
Ready for review
BUG=
R=minyue@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1971004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4563 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-16 23:44:24 +00:00
db1cefc14e
To allow the propagation of under-run in NetEq.
...
BUG=
R=tina.legrand@webrtc.org , turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1974004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4537 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-13 01:39:21 +00:00
7bb5436e5d
Better error treatment in NetEqImpl::InsertPacketInternal()
...
BUG=webrtc:1364
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1844004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4493 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 05:40:57 +00:00
9721db799c
removed NetEq::EnableDtmf()
...
BUG=webrtc:1373
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1822005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4492 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 05:36:26 +00:00
7df9706a01
Add one API for implementing Initial delay.
...
R=minyue@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1939004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4475 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 18:07:13 +00:00
0946a56023
WebRtc_Word32 => int32_t etc. in audio_coding/
...
BUG=314
Review URL: https://webrtc-codereview.appspot.com/1271006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3789 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-09 00:28:06 +00:00
4d06db557a
NetEq4 fails if the first packets inserted in are out-of-band DTMFs.
...
I had to take few steps to solve this issue. I have comments on places I made cahanges to clarify why I did the change.
Review URL: https://webrtc-codereview.appspot.com/1195004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3733 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-03-27 18:31:42 +00:00
73deaadd0e
Removing a hack for CNG
...
However, two other "hacks" had to be added to maintain bit-exactness
with legacy.
Note that this change requires a new version of the universal.rtp test
input, although the output reference stays the same.
Moving reference files, and using a new input vector for NetEq4.
The new input vector neteq_universal_new.rtp is identical to the old
neteq_universal.rtp, except that the payload type for CNG packets that
follows a wideband codec is changed to 98.
Update to resources revision 15 where the new reference files are.
Also changing a faulty log error.
Review URL: https://webrtc-codereview.appspot.com/1078009
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3442 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-31 13:32:51 +00:00
63464a9354
Enabling unit tests for NetEq4 in the bots
...
The unit tests for NetEq4 are made a part of audio_coding_unittests.
The bit-exactness tests are disabled due to problems in iLBC. See
https://code.google.com/p/webrtc/issues/detail?id=281 .
A few smaller fixes for valgrind errors and bot failures are included.
Some of the fixes are adpted from
http://webrtc-codereview.appspot.com/1072008/ .
Review URL: https://webrtc-codereview.appspot.com/1063012
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3432 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-30 09:41:56 +00:00
e1d468c019
Fix a few small nits in NetEq4
...
TEST=try bots
Review URL: https://webrtc-codereview.appspot.com/1061010
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3431 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-30 07:37:20 +00:00
d94659dc27
Initial upload of NetEq4
...
This is the first public upload of the new NetEq, version 4.
It has been through extensive internal review during the course of
the project.
TEST=trybots
Review URL: https://webrtc-codereview.appspot.com/1073005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3425 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-29 12:09:21 +00:00