Commit 18503f6e authored by bayers's avatar bayers
Browse files

remove temp fix for channel mem realloc, fix unified channel mem heap for EVS, OMASA, ISM to SBA

parent a6f1d59c
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -196,6 +196,11 @@ typedef enum
    TC_BUFFER_MODE_BUFFER
} TC_BUFFER_MODE;

#ifdef UNIFY_CHANNEL_MEM_HEAP
#define TC_BUFFER_NUM_FULL_CHAN_UNKNOWN        -1
#define TC_BUFFER_NUM_FULL_CHAN_DONT_COUNT      0
#endif

/*----------------------------------------------------------------------------------*
 * IVAS Bitrates
 *----------------------------------------------------------------------------------*/
@@ -1219,7 +1224,9 @@ enum
#define MASA_STEREO_MIN_BITRATE                 IVAS_24k4
#define MAXIMUM_OMASA_FREQ_BANDS                8                           /* Corresponds to maximum number of coding bands at 32 kbps */
#define OMASA_STEREO_SW_CNT_MAX                 100

#ifdef UNIFY_CHANNEL_MEM_HEAP
#define OMASA_TDREND_MATCHING_GAIN              0.7943f
#endif
#define MASA_BIT_REDUCT_PARAM                   10
#define MASA_MAXIMUM_TWO_DIR_BANDS              24
#define NBITS_HR_COH                            4
+3 −0
Original line number Diff line number Diff line
@@ -5937,6 +5937,9 @@ void ivas_omasa_separate_object_render(
void ivas_omasa_separate_object_render_jbm(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                   */
    const uint16_t nSamplesRendered,                            /* i  : number of samples rendered               */
#ifdef UNIFY_CHANNEL_MEM_HEAP
    float *input_f[],                                           /* i  : discrete objects transport time signal   */
#endif
    float *output_f[],                                          /* o  : rendered time signal                     */
    const int16_t subframes_rendered,                           /* i  : number of subframes rendered             */
    const int16_t slots_rendered                                /* i  : number of CLDFB slots rendered           */
+0 −1
Original line number Diff line number Diff line
@@ -190,7 +190,6 @@
#ifdef NONBE_UNIFIED_DECODING_PATHS
#define REMOVE_5MS_FLAG
/*#define UNIFY_CHANNEL_MEM_HEAP*/
#define FIX_XXX_CHANNEL_MEM_COUNT
#endif

/* ##################### End NON-BE switches ########################### */
+4 −0
Original line number Diff line number Diff line
@@ -2272,7 +2272,11 @@ ivas_error ivas_init_decoder(
    if ( !st_ivas->hDecoderConfig->Opt_5ms )
#endif
    {
#ifdef UNIFY_CHANNEL_MEM_HEAP
        for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, TC_BUFFER_NUM_FULL_CHAN_UNKNOWN ); n++ )
#else
        for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
#endif
        {
            /* note: these are intra-frame heap memories */
            if ( ( st_ivas->p_output_f[n] = (float *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( float ) ) ) == NULL )
+7 −2
Original line number Diff line number Diff line
@@ -83,12 +83,13 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    st_ivas->ism_mode = last_ism_mode;
    ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old );
    st_ivas->ism_mode = ism_mode;
#ifdef FIX_XXX_CHANNEL_MEM_COUNT
    nchan_out_buff_old = ivas_count_nchan_buffers_dec( st_ivas );
#ifdef UNIFY_CHANNEL_MEM_HEAP
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->hTcBuffer->nchan_buffer_full );
#else
    nchan_out_buff_old = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#endif


    if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL, 0 ) ) != IVAS_ERR_OK )
    {
        return error;
@@ -345,7 +346,11 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    if ( !st_ivas->hDecoderConfig->Opt_5ms )
#endif
    {
#ifdef UNIFY_CHANNEL_MEM_HEAP
        nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate, TC_BUFFER_NUM_FULL_CHAN_UNKNOWN );
#else
        nchan_out_buff = ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#endif

        if ( nchan_out_buff > nchan_out_buff_old )
        {
Loading