Commit 7e7609d2 authored by vaclav's avatar vaclav
Browse files

issue 916: optimization of RAM in the JBM decoder; under

- first try to reduce stack
parent 9da419d7
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@

/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define JBM_MEMORY_OPT                                  /* VA: issue 916: optimization of RAM in the JBM decoder */


/* #################### End BE switches ################################## */
+4 −0
Original line number Diff line number Diff line
@@ -562,7 +562,11 @@ uint8_t apa_exec(
)
{
    uint16_t i;
#ifdef JBM_MEMORY_OPT
    float frm_in[APA_BUF]; /* NOTE: this buffer could be smaller if alocated dynamically based on the actual sampling rate and number of channels */
#else
    float frm_in[APA_BUF]; /* TODO(mcjbm): this buffer could be smaller - always allocates space for 16 channels */
#endif
    uint16_t l_frm_out;
    int16_t l_rem;
    int32_t dl_scaled, dl_copied, l_frm_out_target;
+6 −1
Original line number Diff line number Diff line
@@ -50,8 +50,13 @@
*/

/* size of IO buffers (a_in[], a_out[]) for apa_exec() */
#ifdef JBM_MEMORY_OPT
#define APA_BUF_PER_CHANNEL  ( 960 * 2 ) /* == MAX_JBM_L_FRAME48k       */
#define APA_MAX_NUM_CHANNELS ( 12 )      /* == MAX_TRANSPORT_CHANNELS   */
#else
#define APA_BUF_PER_CHANNEL  ( 960 * 3 )
#define APA_MAX_NUM_CHANNELS 16
#endif
#define APA_BUF ( APA_BUF_PER_CHANNEL * APA_MAX_NUM_CHANNELS )

/* min/max sampling rate [Hz] */