Permalink
Browse files

mp3dec: Increase number and size of input and output buffers.

This is to change the size and number of input and output buffers.
Larger buffers help to lower ARM and DSP load.

Signed-off-by: Daniel Diaz <ddiaz@ti.com>
  • Loading branch information...
1 parent 06c5e08 commit 1e0c081cc4c7a6ee82b364b92817375e3b7acc60 @ricardon ricardon committed with Jul 7, 2010
Showing with 6 additions and 4 deletions.
  1. +6 −4 libgoo-ti/goo-ti-mp3dec.c
View
@@ -33,8 +33,10 @@
#define DASF_PARAM_NAME "OMX.TI.index.config.mp3headerinfo"
#define FRAME_PARAM_NAME "OMX.TI.index.config.mp3headerinfo"
#define STREAMID_PARAM_NAME "OMX.TI.index.config.mp3streamIDinfo"
-#define INPUT_BUFFERSIZE 24576
-#define OUTPUT_BUFFERSIZE 18432
+#define INPUT_BUFFERSIZE 8000
+#define OUTPUT_BUFFERSIZE 81920
+#define INPUT_NUM_BUFFERS 4
+#define OUTPUT_NUM_BUFFERS 4
G_DEFINE_TYPE (GooTiMp3Dec, goo_ti_mp3dec, GOO_TYPE_TI_AUDIO_DECODER)
@@ -164,7 +166,7 @@ goo_ti_mp3dec_validate_ports_definitions (GooComponent* component)
g_assert (port != NULL);
GOO_PORT_GET_DEFINITION (port)->nBufferSize = INPUT_BUFFERSIZE;
- GOO_PORT_GET_DEFINITION (port)->nBufferCountActual = 2;
+ GOO_PORT_GET_DEFINITION (port)->nBufferCountActual = INPUT_NUM_BUFFERS;
GOO_PORT_GET_DEFINITION (port)->format.audio.eEncoding =
OMX_AUDIO_CodingMP3;
@@ -182,7 +184,7 @@ goo_ti_mp3dec_validate_ports_definitions (GooComponent* component)
GOO_PORT_GET_DEFINITION (port)->nBufferSize =
OUTPUT_BUFFERSIZE;
- GOO_PORT_GET_DEFINITION (port)->nBufferCountActual = 2;
+ GOO_PORT_GET_DEFINITION (port)->nBufferCountActual = OUTPUT_NUM_BUFFERS;
GOO_PORT_GET_DEFINITION (port)->format.audio.eEncoding =
OMX_AUDIO_CodingPCM;

0 comments on commit 1e0c081

Please sign in to comment.