summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-10-01 14:04:31 -0700
committerGlenn Kasten <gkasten@google.com>2012-10-04 09:44:04 -0700
commita6d41334d25ffde12484eb28301352560a063ef6 (patch)
tree4d8df3822f93824ada324d5038ab0b4cd27ce77b /libvideoeditor
parent95f24dacbde69295fd21bbf683281b277e097bb1 (diff)
downloadframeworks_av-a6d41334d25ffde12484eb28301352560a063ef6.zip
frameworks_av-a6d41334d25ffde12484eb28301352560a063ef6.tar.gz
frameworks_av-a6d41334d25ffde12484eb28301352560a063ef6.tar.bz2
Integrate improved coefficient sinc resampler: VHQ
Summary: Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1, and uses low quality for all other use cases. Track estimated CPU load and throttles the quality based on load; as currently configured it should allow up to 2 instances of very high quality. Medium quality and high quality are currently disabled unless explicitly requested. Details: Only load .so the first time it is needed. Cleanup code style: formatting, indentation, whitespace. Restore medium quality resampler, but it is not used (see next line). Fix memory leak for sinc resampler. Check sample rate in resampler constructor. Add logs for debugging. Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels. Renumber VERY_HIGH_QUALITY from 255 to 4. Use enum src_quality consistently. Improve parsing of property af.resampler.quality. Fix reentrancy bug - allow an instance of high quality and an instance of very high quality to both be active concurrently. Bug: 7229644 Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorSRC.cpp3
-rwxr-xr-xlibvideoeditor/vss/src/VideoEditorResampler.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/libvideoeditor/lvpp/VideoEditorSRC.cpp b/libvideoeditor/lvpp/VideoEditorSRC.cpp
index 4753dd4..36d0812 100755
--- a/libvideoeditor/lvpp/VideoEditorSRC.cpp
+++ b/libvideoeditor/lvpp/VideoEditorSRC.cpp
@@ -321,8 +321,7 @@ void VideoEditorSRC::checkAndSetResampler() {
mResampler = AudioResampler::create(
16 /* bit depth */,
mChannelCnt,
- mOutputSampleRate,
- AudioResampler::DEFAULT);
+ mOutputSampleRate);
CHECK(mResampler);
mResampler->setSampleRate(mSampleRate);
mResampler->setVolume(kUnityGain, kUnityGain);
diff --git a/libvideoeditor/vss/src/VideoEditorResampler.cpp b/libvideoeditor/vss/src/VideoEditorResampler.cpp
index 38dffb7..1129c3c 100755
--- a/libvideoeditor/vss/src/VideoEditorResampler.cpp
+++ b/libvideoeditor/vss/src/VideoEditorResampler.cpp
@@ -80,7 +80,7 @@ M4OSA_Context LVAudioResamplerCreate(M4OSA_Int32 bitDepth, M4OSA_Int32 inChanne
VideoEditorResampler *context = new VideoEditorResampler();
context->mResampler = AudioResampler::create(
- bitDepth, inChannelCount, sampleRate, AudioResampler::DEFAULT);
+ bitDepth, inChannelCount, sampleRate);
if (context->mResampler == NULL) {
return NULL;
}