aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/audio_coding
AgeCommit message (Collapse)Author
2016-01-15Merge upstream SHA 04cb763Alex Luebs
* git merge 04cb763 * See all upstream changes since the previous merge in branch aosp/upstream-master: git diff cb3f9bd..04cb763 * Modify webrtc/.gitignore to keep *.mk files. * Removed old files from *.mk files: - thread.cc - thread_posix.cc * Add new files to *.mk files: - event_tracer.cc * Android relevant upstream changes: - Make Beamforming dynamically settable for Android platform builds - Remove additional channel constraints when Beamforming is enabled in AudioProcessing - Use an explicit identifier in Config Change-Id: I384a4e8f6982c31c5bc70eef521bb2d90800b9a4
2016-01-13Convert channel counts to size_t.Peter Kasting
IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan. BUG=chromium:81439 TEST=none R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org Review URL: https://codereview.webrtc.org/1316523002 . Cr-Commit-Position: refs/heads/master@{#11229}
2016-01-12NetEq: Fix a typo in a commentHenrik Lundin
TBR=minyue@webrtc.org NOTRY=true Review URL: https://codereview.webrtc.org/1578223003 . Cr-Commit-Position: refs/heads/master@{#11226}
2016-01-08Misc. small cleanups.pkasting
* Better param names * Avoid using negative values for (bogus) placeholder channel counts (mostly in tests). Since channels will be changing to size_t, negative values will be illegal; it's sufficient to use 0 in these cases. * Use arraysize() * Use size_t for counting frames, samples, blocks, buffers, and bytes -- most of these are already size_t in most places, this just fixes some stragglers * reinterpret_cast<int64_t>(void*) is not necessarily safe; use uintptr_t instead * Remove unnecessary code, e.g. dead code, needlessly long/repetitive code, or function overrides that exactly match the base definition * Fix indenting * Use uint32_t for timestamps (matching how it's already a uint32_t in most places) * Spelling * RTC_CHECK_EQ(expected, actual) * Rewrap * Use .empty() * Be more pedantic about matching int/int32_t/ * Remove pointless consts on input parameters to functions * Add missing sanity checks All this was found in the course of constructing https://codereview.webrtc.org/1316523002/ , and is being landed separately first. BUG=none TEST=none Review URL: https://codereview.webrtc.org/1534193008 Cr-Commit-Position: refs/heads/master@{#11191}
2016-01-08Cleaning neteq_unittest resource files.minyue
BUG=webrtc:2692 Review URL: https://codereview.webrtc.org/1563983003 Cr-Commit-Position: refs/heads/master@{#11189}
2016-01-08Add tracing to NetEqImpl::GetAudiohenrik.lundin
BUG=webrtc:5167 R=pbos@webrtc.org NOTRY=true Review URL: https://codereview.webrtc.org/1571693002 Cr-Commit-Position: refs/heads/master@{#11183}
2016-01-04Remove DISABLED_ON_ macros.Peter Boström
Macro incorrectly displays DISABLED_ON_ANDROID in test names for parameterized tests under --gtest_list_tests, causing tests to be disabled on all platforms since they contain the DISABLED_ prefix rather than their expanded variants. This expands the macro variants to inline if they're disabled or not, and removes building some tests under configurations where they should fail, instead of building them but disabling them by default. The change also removes gtest_disable.h as an unused include from many other files. BUG=webrtc:5387, webrtc:5400 R=kjellander@webrtc.org, phoglund@webrtc.org TBR=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1547343002 . Cr-Commit-Position: refs/heads/master@{#11150}
2015-12-22Adding bit exactness test for Opus decoding in NetEq.minyue
Opus has become the mostly used codec in WebRTC. There, however, is no bit exactness test for Opus decoding in NetEq. The new RTP file is generated by the following steps: 1. Encode a clean RTP file with Opus RTPencode resources/audio_coding/speech_mono_32_48kHz.pcm neteq_opus_raw.rtp 960 opus 1 2. Adding jitter to the clean RTP file RTPjitter neteq_opus_raw.rtp jitter.dat neteq_opus.rtp (Note: jitter.dat does not exist in WebRTC resources folder. Check the source code for RTPjitter to know how to define such a file.) BUG=webrtc:3987 TEST=observed Opus normal decoding and FEC decoding were used, listened to the reference output. Review URL: https://codereview.webrtc.org/1515113002 Cr-Commit-Position: refs/heads/master@{#11113}
2015-12-21Rename RTC_HISTOGRAM_* macros to RTC_HISTOGRAM_*_SPARSE_* to indicate that ↵asapersson
these are for infrequent updates. This implementation will be replaced by a faster one and sparse will be removed. BUG=webrtc:5283 Review URL: https://codereview.webrtc.org/1530913002 Cr-Commit-Position: refs/heads/master@{#11099}
2015-12-18iSAC: Remove unnecessary WEBRTC_LINUX define.kjellander
I can only find one use in iSAC codebase: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/webrtc/modules/audio_coding/test/iSACTest.cc&l=19 It's the prime suspect for causing a compilation error for iOS failing to include linux/net.h which is being included in webrtc/voice_engine/voice_engine_defines.h NOTRY=True Review URL: https://codereview.webrtc.org/1539883002 Cr-Commit-Position: refs/heads/master@{#11089}
2015-12-17Add tracing to NetEqImpl::InsertPackethenrik.lundin
BUG=webrtc:5167 R=pbos@webrtc.org Review URL: https://codereview.webrtc.org/1525423004 Cr-Commit-Position: refs/heads/master@{#11065}
2015-12-17Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and ↵kwiberg
rtc::ScopedVector We can now use std::move instead! This CL leaves the Pass methods in place; a follow-up CL will add deprecation annotations to them. Review URL: https://codereview.webrtc.org/1460043002 Cr-Commit-Position: refs/heads/master@{#11064}
2015-12-16Disable warnings failing when using Clang on Windows.kjellander
This makes it possible to build WebRTC using Clang on Windows. Depends on https://codereview.webrtc.org/1524703006/ BUG=webrtc:5360, webrtc:5366 NOTRY=True Review URL: https://codereview.webrtc.org/1522223002 Cr-Commit-Position: refs/heads/master@{#11058}
2015-12-16OWNERS: Add * to .gyp{i,} everywhere.kjellander@webrtc.org
Also convert DOS->Unix line endings in two of the OWNERS files. NOTRY=True NOPRESUBMIT=True R=niklas.enbom@webrtc.org Review URL: https://codereview.webrtc.org/1530003003 . Cr-Commit-Position: refs/heads/master@{#11056}
2015-12-16Update NetEq network statistics in neteq_unittest.minyue
NetEqNetworkStatistics has been updated some time ago. A bit exactness test in neteq unittests is still using the old NetEqNetworkStatistics. New neteq4_network_stats.dat generated by running TestBitExactness with flag "genref" BUG= Review URL: https://codereview.webrtc.org/1522103002 Cr-Commit-Position: refs/heads/master@{#11052}
2015-12-16AudioCodingModuleImpl: Stop failing artificially for non-Opus encoderskwiberg
All encoders already handle the "Opus-specific" requests sanely (by failing nicely), so we don't need extra checks to protect them. BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1527453005 Cr-Commit-Position: refs/heads/master@{#11051}
2015-12-16Move Rent-A-Codec out of CodecManagerkwiberg
So that the two of them sit next to each other at the top level of AudioCodingModuleImpl. CodecManager now manages the specifications for Rent-A-Codec, rather than managing encoders directly. BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1520283006 Cr-Commit-Position: refs/heads/master@{#11048}
2015-12-15Add speech encoder to the encoder stack specification structkwiberg
BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1527933002 Cr-Commit-Position: refs/heads/master@{#11037}
2015-12-15Fix incorrect commentkwiberg
Review URL: https://codereview.webrtc.org/1524663004 Cr-Commit-Position: refs/heads/master@{#11036}
2015-12-14Remove unused and rarely used LOG_ macros.solenberg
BUG= Review URL: https://codereview.webrtc.org/1522053002 Cr-Commit-Position: refs/heads/master@{#11014}
2015-12-11Special-case android-arm64 in codec bitexactness testskwiberg
We already had a special case for android, but it only worked for arm32. BUG=webrtc:4198, webrtc:4199 Review URL: https://codereview.webrtc.org/1512833003 Cr-Commit-Position: refs/heads/master@{#10989}
2015-12-11Adding Opus to RTPencode.minyue
As a step toward fixing webrtc:3987, here we update the RTPencode to allow Opus RTP payloads. BUG=webrtc:3987, webrtc:2692 Review URL: https://codereview.webrtc.org/1516653003 Cr-Commit-Position: refs/heads/master@{#10987}
2015-12-10Reduce the runtime of some ACM tests in modules_testsHenrik Lundin
By reducing the length of the audio input, the total runtime of $ out/Debug/modules_tests --gtest_filter=AudioCodingModuleTest.* is reduced by more than 10x, when run single-threaded. The PCMFile helper class is extended with a FastForward method (to skip initial silence in the test files) and a limiter on how much to read. BUG=webrtc:2463 R=ivoc@webrtc.org Review URL: https://codereview.webrtc.org/1513223002 . Cr-Commit-Position: refs/heads/master@{#10973}
2015-12-10Typo fix: Enable a bunch of tests that were accidentally disabledkwiberg
They were meant to be run if we have either iSAC float or fix, but the typo made them run for just float. BUG=webrtc:4198, webrtc:4199 Review URL: https://codereview.webrtc.org/1513483005 Cr-Commit-Position: refs/heads/master@{#10969}
2015-12-09NetEq: Add codec name and RTP timestamp rate to DecoderInfohenrik.lundin
The new fields are default-populated for built-in decoders, but for external decoders, the name can now be given when registering the decoder. BUG=webrtc:3520 Review URL: https://codereview.webrtc.org/1484343003 Cr-Commit-Position: refs/heads/master@{#10952}
2015-12-08Deletes temporary files that are generated in several ACM unittests.ivoc
This applies to AcmSwitchingOutputFrequencyOldApi.*, AcmReceiverBitExactnessOldApi.* and AcmSenderBitExactnessOldApi.*. BUG=webrtc:4647 NOTRY=true Review URL: https://codereview.webrtc.org/1503043003 Cr-Commit-Position: refs/heads/master@{#10936}
2015-12-08Add encode/decode time tracing to audio_coding.Peter Boström
Also removes virtual from VideoDecoder::Decode and updated mocks and tests accordingly to use VideoDecoder::DecodeInternal instead. BUG=webrtc:5167 R=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1512483003 . Cr-Commit-Position: refs/heads/master@{#10935}
2015-12-08There was an old scaling for CNG 48 kHz in the code, from the time where ↵Tina le Grand
Audio Coding Module didn't have full 48 kHz support. This CL removes the scaling. The bug hasn't caused us any problems, since we don't run CNG together with Opus (our only real 48 kHz codec), but would cause problems if used with PCB16b @ 48 kHz. BUG=webrtc:5303 R=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1496243002 . Cr-Commit-Position: refs/heads/master@{#10929}
2015-12-03Make the audio codecs' GN targets self-sufficientHenrik Lundin
Also running "gn format" on the file. R=kwiberg@webrtc.org Review URL: https://codereview.webrtc.org/1494993002 . Cr-Commit-Position: refs/heads/master@{#10886}
2015-12-01Simplify CodecManager::RegisterEncoder()kwiberg
BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1483963002 Cr-Commit-Position: refs/heads/master@{#10855}
2015-11-27audio_coding: Cleanup duplicated headers after "main" removal.kjellander
In https://codereview.webrtc.org/1481493004/ some duplicated headers were left to make it possible to update downstream without breakage. Now that's done and we can remove these to avoid confusion. BUG=webrtc:5095 TBR=henrik.lundin@webrtc.org, kwiberg@webrtc.org TESTED=Passing compile-trybots with --clobber flag: git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc NOTRY=True Review URL: https://codereview.webrtc.org/1477423002 Cr-Commit-Position: refs/heads/master@{#10829}
2015-11-26Clean up PlatformThread.Peter Boström
* Move PlatformThread to rtc::. * Remove ::CreateThread factory method. * Make non-scoped_ptr from a lot of invocations. * Make Start/Stop void. * Remove rtc::Thread priorities, which were unused and would collide. * Add ::IsRunning() to PlatformThread. BUG= R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/1476453002 . Cr-Commit-Position: refs/heads/master@{#10812}
2015-11-26audio_coding: remove "main" directorykjellander
This is the last piece of the old directory layout of the modules. Duplicated header files are left in audio_coding/main/include until downstream code is updated to the new location. They have pragma warnings added to them and identical header guards as the new headers to avoid breaking things. BUG=webrtc:5095 TESTED=Passing compile-trybots with --clobber flag: git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc NOTRY=True NOPRESUBMIT=True Review URL: https://codereview.webrtc.org/1481493004 Cr-Commit-Position: refs/heads/master@{#10803}
2015-11-25WIP: Changes after merge commit 'cb3f9bd'Chih-Hung Hsieh
Changes after "git merge cb3f9bd" * git mv old Android.mk from src/ to webrtc/ * Remove old unused files in src/*. * Modify webrtc/.gitignore to keep *.mk files. * Copy old files from master, lost in auto-merge. src/modules/audio_processing/test/unit_test.cc src/modules/audio_coding/codecs/isac/fix/test/{Android.mk,kenny.c} to webrtc, but most of the old test code do not compile with new webrtc API and are commented out. * Move src/modules/audio_processing/test/android/apmtest/jni/*.mk to webrtc/... but the Android.mk files does not work. Commented out its build target. * Changes to Android.mk files: * Change references of src/ to webrtc/. * Fix include path * Fix source file list, remove old non-existing files, add new source files to resolve link errors. * Add new Android.mk files to build some new static libraries to link into current Android webrtc .so files. * Remove unnecessary LOCAL_SHARED_LIBRARIES in Android.mk files that build static libraries. * Remove old unnecessary clang workarounds like -Wno-tautological-pointer-compare -no-integrated-as * Fix include path of debug.pb.h in some source files. * Add -DWEBRTC_POSIX in android-webrtc.mk * Manually merge Android specific changes in src/typedefs.h to webrtc/typedefs.h * Fix trivial syntax error in scoped_ptr.h, calling static_assert. * Use -std=c++0x in webrtc/system_wrappers/source/Android.mk * #undef getchaar in spreadsort.hpp * Verified and not to carry old Android hacks from src/... to webrtc/... src/system_wrappers/source/android/cpu-features.c src/modules/interface/module.h src/modules/audio_coding/codecs/isac/fix/source/filters_neon.c src/system_wrappers/source/trace_posix.cc src/typedefs.h More pathes from Alex Luebs: * Use new unit test kenny.cc. Delete old kenny.cc. Comment out unessential code in kenny.cc to fix link error for now. * Replace old unit test files with new ones in webrtc/modules/audio_processing/Android.mk. Delete old audio_processing/test/unit_test.cc. * Fix compilation errors in webrtc/modules/audio_processing/test/audio_processing_unittest.cc Change-Id: I7bbf776eeb9dcfa21a82dd1f2dec378235cbbc3e
2015-11-25Move the FEC enabling logic from CodecManager to Rent-A-Codeckwiberg
BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1476743002 Cr-Commit-Position: refs/heads/master@{#10785}
2015-11-25Move the stereo-disables-CNG logic from CodecManager to Rent-A-Codeckwiberg
BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1473563004 Cr-Commit-Position: refs/heads/master@{#10784}
2015-11-23Move ThreadWrapper to ProcessThread in base.pbos
Also removes all virtual methods. Permits using a thread from rtc_base_approved (namely event tracing). BUG=webrtc:5158 R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/1469013002 Cr-Commit-Position: refs/heads/master@{#10760}
2015-11-23Add new method AcmReceiver::last_packet_sample_rate_hz()henrik.lundin
This change allows us to delete AcmReceiver::last_audio_codec_id(). BUG=webrtc:3520 Review URL: https://codereview.webrtc.org/1467183002 Cr-Commit-Position: refs/heads/master@{#10756}
2015-11-23NetEq: Add new method last_output_sample_rate_hzhenrik.lundin
This change moves the logics for keeping track of the last ouput sample rate from AcmReceiver to NetEq, where it fits better. The getter function AcmReceiver::current_sample_rate_hz() is renamed to last_output_sample_rate_hz(). BUG=webrtc:3520 Review URL: https://codereview.webrtc.org/1467163002 Cr-Commit-Position: refs/heads/master@{#10754}
2015-11-23Extract the parameters for the encoder stack from the CodecManagerkwiberg
BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1459193002 Cr-Commit-Position: refs/heads/master@{#10750}
2015-11-20NetEq: Remove overly verbose logginghenrik.lundin
This change removes all LS_VERBOSE logs that will print once every packet or more often. TBR=pbos@webrtc.org BUG=webrtc:5227 Review URL: https://codereview.webrtc.org/1461903004 Cr-Commit-Position: refs/heads/master@{#10733}
2015-11-18modules/audio_coding: Remove some codec include dirskjellander@webrtc.org
Also clean up some include_dir entries and update the few references to them with absolute include paths instead. Finally fixed a few lint errors and invalid header guards. None of these are used downstream. BUG=webrtc:5095 TESTED=git cl try -c --bot=android_compile_rel --bot=linux_compile_rel --bot=win_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc R=kwiberg@webrtc.org Review URL: https://codereview.webrtc.org/1438663003 . Cr-Commit-Position: refs/heads/master@{#10700}
2015-11-18Remove dead codekwiberg
Review URL: https://codereview.webrtc.org/1452153003 Cr-Commit-Position: refs/heads/master@{#10692}
2015-11-18Move CNG/RED payload type extraction to Rent-A-Codeckwiberg
BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1450883002 Cr-Commit-Position: refs/heads/master@{#10691}
2015-11-16Adding stddef.h to opus_inst.h.minyue
This is to prevent size_t from undefined. This does not happen in current WebRTC since the sources that opus_inst.h gets used have proper definitions. But it would be good to add the definition in itself. Review URL: https://codereview.webrtc.org/1446093003 Cr-Commit-Position: refs/heads/master@{#10653}
2015-11-16Move CNG and RED management into the Rent-A-Codeckwiberg
This leaves CodecOwner without a job, so we eliminate it. BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1443653004 Cr-Commit-Position: refs/heads/master@{#10650}
2015-11-11AcmReceiver::InsertPacket and NetEq::InsertPacket: Take ArrayView argumentskwiberg
Instead of separate pointer and size arguments. Review URL: https://codereview.webrtc.org/1429943004 Cr-Commit-Position: refs/heads/master@{#10606}
2015-11-11CodecManager::RegisterEncoder: Call SetFec on new encoder, not oldkwiberg
BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1416633011 Cr-Commit-Position: refs/heads/master@{#10604}
2015-11-10Rename Maybe to OptionalKarl Wiberg
And add examples of good and bad usage to the documentation. R=aluebs@webrtc.org, henrik.lundin@webrtc.org, pthatcher@webrtc.org Review URL: https://codereview.webrtc.org/1432553007 . Cr-Commit-Position: refs/heads/master@{#10588}
2015-11-10CodecManager: Eliminate the stereo_send_ memberkwiberg
It can be computed from other members, notably the current encoder's number of channels. BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1423803007 Cr-Commit-Position: refs/heads/master@{#10585}