summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-06-17 17:00:20 -0700
committerJames Dong <jdong@google.com>2011-06-26 07:42:39 -0700
commit486247017e0bfb9db9994a53a28c0dacfebf8567 (patch)
treebd524b6276e7b4b5556084555ebfd1ea2298a00f
parentc5a57efb706ec79032fc09c43b16d11ed0876604 (diff)
downloadframeworks_av-486247017e0bfb9db9994a53a28c0dacfebf8567.zip
frameworks_av-486247017e0bfb9db9994a53a28c0dacfebf8567.tar.gz
frameworks_av-486247017e0bfb9db9994a53a28c0dacfebf8567.tar.bz2
Reduce the number of output buffers and force output buffers in display order for SoftAVC decoder
Change-Id: I9ec6d8205e7a56e42d5b5799a6c2e31076d24b81
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp3
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
index 830d2e0..ec7bd1c 100644
--- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
+++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
@@ -139,7 +139,8 @@ void SoftAVC::initPorts() {
}
status_t SoftAVC::initDecoder() {
- if (H264SwDecInit(&mHandle, 1) == H264SWDEC_OK) {
+ // Force decoder to output buffers in display order.
+ if (H264SwDecInit(&mHandle, 0) == H264SWDEC_OK) {
return OK;
}
return UNKNOWN_ERROR;
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.h b/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
index 3439efd..1cc85e8 100644
--- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
+++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.h
@@ -52,7 +52,7 @@ private:
kInputPortIndex = 0,
kOutputPortIndex = 1,
kNumInputBuffers = 8,
- kNumOutputBuffers = 16,
+ kNumOutputBuffers = 2,
};
enum EOSStatus {