summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-05-10 16:43:19 -0700
committerAndreas Huber <andih@google.com>2012-05-11 10:12:45 -0700
commiteb61431af13741aa8b7e57a39f69bba5a6c190dc (patch)
tree160d4951d23a4ee5cb7d7880df3afb923dad4eb6 /media/libstagefright/codecs
parent240d8a84dec9f9482257a8037457a1d63193b7ff (diff)
downloadframeworks_av-eb61431af13741aa8b7e57a39f69bba5a6c190dc.zip
frameworks_av-eb61431af13741aa8b7e57a39f69bba5a6c190dc.tar.gz
frameworks_av-eb61431af13741aa8b7e57a39f69bba5a6c190dc.tar.bz2
Increase AAC software decoder's buffer count. Refactor how clients
of ACodec get notified about codec buffers and buffer ids. Change-Id: I962f873262dae7aa7b43f5f68a6d60268282f91e related-to-bug: 6478823
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC.cpp4
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC.h3
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC2.cpp4
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC2.h3
4 files changed, 8 insertions, 6 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
index d509383..65aa2ad 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
@@ -69,7 +69,7 @@ void SoftAAC::initPorts() {
def.nPortIndex = 0;
def.eDir = OMX_DirInput;
- def.nBufferCountMin = kNumBuffers;
+ def.nBufferCountMin = kNumInputBuffers;
def.nBufferCountActual = def.nBufferCountMin;
def.nBufferSize = 8192;
def.bEnabled = OMX_TRUE;
@@ -87,7 +87,7 @@ void SoftAAC::initPorts() {
def.nPortIndex = 1;
def.eDir = OMX_DirOutput;
- def.nBufferCountMin = kNumBuffers;
+ def.nBufferCountMin = kNumOutputBuffers;
def.nBufferCountActual = def.nBufferCountMin;
def.nBufferSize = 8192;
def.bEnabled = OMX_TRUE;
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.h b/media/libstagefright/codecs/aacdec/SoftAAC.h
index da0b8ed..c0789ab 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC.h
+++ b/media/libstagefright/codecs/aacdec/SoftAAC.h
@@ -45,7 +45,8 @@ protected:
private:
enum {
- kNumBuffers = 4
+ kNumInputBuffers = 32,
+ kNumOutputBuffers = 4,
};
tPVMP4AudioDecoderExternal *mConfig;
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
index e499a0b..303b8ef 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
@@ -64,7 +64,7 @@ void SoftAAC2::initPorts() {
def.nPortIndex = 0;
def.eDir = OMX_DirInput;
- def.nBufferCountMin = kNumBuffers;
+ def.nBufferCountMin = kNumInputBuffers;
def.nBufferCountActual = def.nBufferCountMin;
def.nBufferSize = 8192;
def.bEnabled = OMX_TRUE;
@@ -82,7 +82,7 @@ void SoftAAC2::initPorts() {
def.nPortIndex = 1;
def.eDir = OMX_DirOutput;
- def.nBufferCountMin = kNumBuffers;
+ def.nBufferCountMin = kNumOutputBuffers;
def.nBufferCountActual = def.nBufferCountMin;
def.nBufferSize = 8192 * 2;
def.bEnabled = OMX_TRUE;
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.h b/media/libstagefright/codecs/aacdec/SoftAAC2.h
index e5a1e3e..57565ab 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC2.h
+++ b/media/libstagefright/codecs/aacdec/SoftAAC2.h
@@ -44,7 +44,8 @@ protected:
private:
enum {
- kNumBuffers = 4
+ kNumInputBuffers = 32,
+ kNumOutputBuffers = 4,
};
HANDLE_AACDECODER mAACDecoder;