summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/test-resample.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve resampler speed for floating point and arm64Andy Hung2015-03-031-0/+8
| | | | | | | | Add floating point intrinsics for arm32 and arm64 devices. Add integer intrinsics for arm64 devices. Bug: 17366024 Change-Id: Id4240f549033deb262815c7145d69820e5fd7b92
* Add floating point volume handling to AudioMixerAndy Hung2014-07-081-16/+5
| | | | | | | | | | | | | | | Use floating point volume in AudioMixer mixing when floating point input is used with the new mixer engine. AudioResampler is updated to take floating point volume to match. Both legacy integer and floating point mixer engines work. For now, integer volume is used when the new mixer engine runs in integer input mode, for backward compatibility with the legacy mixer. The new mixer engine will generally run in floating point input mode. When the legacy path is removed, the integer volumes will be removed. Change-Id: I79e80c292ae7c8b8bdd0aa371a1b2c3a1b618290
* Replace int bitDepth with audio_format_t in ResamplerAndy Hung2014-07-071-5/+5
| | | | | | | | Remove mBitDepth from class (not used). Replace with audio_format_t in factory method to distinguish between float and pcm 16-bit. Change-Id: I166860796c68285077ef4458d8758d19b82523f9
* Update test-resample to handle multichannelAndy Hung2014-04-101-57/+48
| | | | | | | | | Option -c # specifies number of channels (mono default). Option -s to specify stereo is removed (-c 2 replaces). Option -h to specify WAV header is removed (WAV is now default). Change-Id: Iba4b83806028a8a9c1ddba6f555182d214ef73ff Signed-off-by: Andy Hung <hunga@google.com>
* Update test-resample to handle floating pointAndy Hung2014-04-081-17/+54
| | | | | Change-Id: Ib34d716fbabcd5eb70f8a5ffcf362e242671d916 Signed-off-by: Andy Hung <hunga@google.com>
* Fix 64-bit build warningsGlenn Kasten2014-04-081-10/+11
| | | | Change-Id: I667401522cb4ccd41013e2883a4c75ddeca08ef6
* Change references of Q19.12 to Q4.27 for clarityAndy Hung2014-04-021-2/+3
| | | | | Change-Id: I5beb7daf6ff9bc123ff3582f7c294edcaf8652f6 Signed-off-by: Andy Hung <hunga@google.com>
* The -O option now takes a CSV instead of a single valueGlenn Kasten2014-02-211-12/+81
| | | | | | Also added -P option to provide a CSV list of provided values. Change-Id: I4e0d6fe8b062d27d95d33493f80bd8f1c510d2c8
* Allow specifying frames per call to resample()Glenn Kasten2014-02-191-3/+15
| | | | | Bug: 13073201 Change-Id: Id2f0fcd7562d9ba5a58c128d71bbba42dfea86cc
* Improve dynamic audio resampler filter generationAndy Hung2014-01-081-21/+118
| | | | | | | | | | | | | | Improve dynamic audio resampler filter generation speed by 2x. The resulting filters should be the same (excepting roundoff). Also added check for upsampling sample rate changes to share previously generated filters. Modify the profiling to improve output format and sampling result reliability. Change-Id: I9aa6b914fd552a63f79dd4a95945df2f8275772a Signed-off-by: Andy Hung <hunga@google.com>
* Audio resampler update to add S16 filtersAndy Hung2013-12-271-29/+41
| | | | | | | | | | | | This does not affect the existing resamplers. New resampler accessed through additional quality settings: DYN_LOW_QUALITY = 5 DYN_MED_QUALITY = 6 DYN_HIGH_QUALITY = 7 Change-Id: Iebbd31871e808a4a6dee3f3abfd7e9dcf77c48e1 Signed-off-by: Andy Hung <hunga@google.com>
* Fix bug in test-resample's AudioBufferProviderGlenn Kasten2013-12-171-0/+2
| | | | | | | The contract for AudioBufferProvider::releaseBuffer() was missing. Bug: 12194314 Change-Id: I2fcf75e7b8eaf6db34f360206d79457a04a73565
* Add ability to read .wav files to test-resampleGlenn Kasten2013-12-171-19/+14
| | | | | | | | | | | | Previously test-resample could only read .raw files, and the input sample rate had to be specified. Now the input sample rate is derived from the input file. This also allows us to read 8-bit PCM files, and other formats such as floating-point in the future. However, the ability to read raw files is lost. A workaround is to use sox or equivalent on the host. Change-Id: Icd06b4d02482b3ad07bf03979f46860e68d38ad9
* Use libsndfile to write .wav filesGlenn Kasten2013-12-171-45/+23
| | | | | | | This will reduce code duplication, and allow us take advantage of more advanced capabilities of libsndfile in the future. Change-Id: I25fa2b6d0c21e325aeaf05bda62cf7aab0c5deb4
* Fix several test-resample BufferProvider bugsGlenn Kasten2013-12-171-10/+61
| | | | | | | | | | | | | | | | | | | | | | | Previously getNextBuffer always returned the same data address over and over. Now it correctly returns the right portion of the input buffer. Previously getNextBuffer always returned the total number of frames in the input, which might be larger than the size requested by the caller, and/or larger than the number of remaining input frames. It also always returned successfully, even when there should be no frames available. This violates the contract for getNextBuffer. Now getNextBuffer will return the maximum of the number of frames requested, and the number of remaining frames available. If that maximum is zero, getNextBuffer will return an error instead. Previously releaseBuffer would silently allow releasing more frames than were actually gotten, which violates the contract for releaseBuffer. Now releaseBuffer checks for this and logs a message if it happens. Add 'v' (verbose) option to log buffer provider calls. Bug: 12194314 Change-Id: I9b915e954b3612a07ef271da8652486b8875e0fd
* Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONICGlenn Kasten2013-05-101-2/+2
| | | | | Bug: 8895727 Change-Id: I0abf6da941965e9e29e232943184dbc72b95d03c
* Fix build warningsGlenn Kasten2012-11-141-1/+1
| | | | Change-Id: Ic43bcca166a529a6431711b05a7fa21849b6a38b
* NEON optimized SINC resamplerMathias Agopian2012-11-081-1/+1
| | | | | | | this currently gives us a 60% to 80% boost depending on the quality level selected. Change-Id: I7db385007e811ed7bffe5fd3403b44e300894f5b
* improve resample testMathias Agopian2012-11-051-61/+102
| | | | | | | | | - handle stereo input - input file can now be ommited, in this case a linear chirp will be used automatically - better usage information Change-Id: I5d62a6c26a9054a1c1a517a065b4df5a2cdcda22
* Line length 100Glenn Kasten2012-11-011-1/+2
| | | | Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
* test-resample: clip instead of overflowingMathias Agopian2012-10-291-1/+4
| | | | Change-Id: I550e5a59e51c11e1095ca338222b094f92b96878
* a test app for the resamplersMathias Agopian2012-10-261-0/+229
Change-Id: I66852d90d384f1d9e77b51ad1a1ebdbaf61d0607