Commit 32efc8ac authored by Archit Tamarapu's avatar Archit Tamarapu Committed by Manuel Jander
Browse files

[cleanup] accept FIX_1330_JBM_MEMORY

parent 8323c2a8
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1044,12 +1044,7 @@ void ivas_omasa_separate_object_render_jbm_fx(
    const UWord16 nSamplesRendered,                             /* i  : number of samples rendered              */
    Word32 input_fx_in[][L_FRAME48k],                           /* i  : separated object signal                 */
    Word32 *output_fx[],                                        /* o  : rendered time signal                    */
#ifdef FIX_1330_JBM_MEMORY
    const Word16 subframes_rendered                             /* i  : number of subframes rendered            */
#else
    const Word16 subframes_rendered,                            /* i  : number of subframes rendered            */
    const Word16 slots_rendered                                 /* i  : number of CLDFB slots rendered          */
#endif
);

void get_panning_gain_fx(
@@ -4004,14 +3999,9 @@ ivas_error ivas_init_encoder_fx(

ivas_error ivas_output_buff_dec_fx(
    Word32 *p_output_fx[],                                      /* i/o: output audio buffers                        */
#ifdef FIX_1330_JBM_MEMORY
    const Word16 nchan_out_buff,                                /* i  : number of output channels                   */
    const Word16 Opt_tsm,                                       /* i  : TSM option flag                             */
    DECODER_TC_BUFFER_HANDLE hTcBuffer                          /* i  : TSM buffer handle                           */
#else
    const Word16 nchan_out_buff_old,                            /* i  : previous frame number of output channels    */
    const Word16 nchan_out_buff                                 /* i  : number of output channels                   */
    #endif
);

ivas_error ivas_dec_get_format_fx(
+0 −6
Original line number Diff line number Diff line
@@ -201,25 +201,19 @@ void ivas_buffer_deinterleaved_to_interleaved_fx(
)
{
    Word16 ch, m;
#ifdef FIX_1330_JBM_MEMORY
    Word32 buffer[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* temp buffer needed when "*audio[]" and "*audio_out[]" are the same */

    FOR( ch = 0; ch < n_channels; ch++ )
    {
        Copy32( audio[ch], buffer[ch], frame_length );
    }
#endif


    FOR( ch = 0; ch < n_channels; ch++ )
    {
        FOR( m = 0; m < frame_length; m++ )
        {
#ifdef FIX_1330_JBM_MEMORY
            audio_out[m * n_channels + ch] = buffer[ch][m];
#else
            audio_out[m * n_channels + ch] = audio[ch][m];
#endif
            move32();
        }
    }
+0 −1
Original line number Diff line number Diff line
@@ -134,7 +134,6 @@
#define FIX_1370_EXTERNAL_ORIENTATION_CHECK             /* Nokia: add sanity check for Euler angles for external orientations */
#define FIX_1413_IGF_INIT_PRINTOUT                      /* FhG: use correct variable for IGF initiliazation */
#define FIX_1383_HEAD_TRACK_SANITIZER                   /* Nok: issue 1383: Fix head tracking struc values reading in renderer */
#define FIX_1330_JBM_MEMORY                             /* VA: issue 1330: memory savings in the JBM decoder */
#define FIX_1330_JBM_MEMORY_FIX                         /* VA: basop issue: 2179 fix non-BE difference in FIX_1330_JBM_MEMORY */
#define FIX_1411_IGF_CRASH_BW_SWITCHING                 /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/
#define FIX_1419_MONO_STEREO_UMX                        /* FhG: fix for issue 1419 : support upmix to all output formats for mono and stereo */
+0 −8
Original line number Diff line number Diff line
@@ -887,11 +887,7 @@ static ivas_error stereo_dft_dec_main(

    FOR( n = 0; n < hCPE->nchan_out; n++ )
    {
#ifdef FIX_1330_JBM_MEMORY
        Scale_sig32( output[n], output_frame, sub( hCPE->hStereoDft->q_dft, Q11 ) ); // q_dft
#else
        Scale_sig32( output[n], L_FRAME48k, sub( hCPE->hStereoDft->q_dft, Q11 ) ); // q_dft
#endif
        scale_sig32( hCPE->output_mem_fx[n], NS2SA_FX2( output_Fs, STEREO_DFT32MS_OVL_NS ), sub( hCPE->hStereoDft->q_dft, Q11 ) ); // q_dft
        hCPE->q_output_mem_fx[n] = hCPE->hStereoDft->q_dft;
        move16();
@@ -905,11 +901,7 @@ static ivas_error stereo_dft_dec_main(

    FOR( n = 0; n < hCPE->nchan_out; n++ )
    {
#ifdef FIX_1330_JBM_MEMORY
        Scale_sig32( output[n], output_frame, sub( Q11, hCPE->hStereoDft->q_dft ) ); // Q11
#else
        Scale_sig32( output[n], L_FRAME48k, sub( Q11, hCPE->hStereoDft->q_dft ) ); // Q11
#endif
        scale_sig32( hCPE->output_mem_fx[n], NS2SA_FX2( output_Fs, STEREO_DFT32MS_OVL_NS ), sub( Q11, hCPE->hStereoDft->q_dft ) ); // Q11
        hCPE->q_output_mem_fx[n] = Q11;
        move16();
+0 −27
Original line number Diff line number Diff line
@@ -1693,9 +1693,7 @@ ivas_error ivas_init_decoder_fx(
    Word16 sce_id, cpe_id;
    Word16 numCldfbAnalyses, numCldfbSyntheses;
    Word16 granularity, n_channels_transport_jbm;
#ifdef FIX_1330_JBM_MEMORY
    Word16 nchan_out_buff;
#endif
    Word32 output_Fs, ivas_total_brate, tmp_br, tmp32;
    Word32 delay_ns;
    AUDIO_CONFIG output_config;
@@ -3215,28 +3213,11 @@ ivas_error ivas_init_decoder_fx(
     * Allocate output audio buffers
     *-----------------------------------------------------------------*/

#ifdef FIX_1330_JBM_MEMORY
    nchan_out_buff = ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, ivas_total_brate );
    IF( ( error = ivas_output_buff_dec_fx( st_ivas->p_output_fx, nchan_out_buff, hDecoderConfig->Opt_tsm, st_ivas->hTcBuffer ) ) != IVAS_ERR_OK )
    {
        return error;
    }
#else
    k = ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, ivas_total_brate );
    FOR( n = 0; n < k; n++ )
    {
        /* note: these are intra-frame heap memories */
        IF( ( st_ivas->p_output_fx[n] = (Word32 *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( Word32 ) ) ) == NULL )
        {
            return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for output audio buffer!\n" ) );
        }
        set32_fx( st_ivas->p_output_fx[n], 0, 48000 / FRAMES_PER_SEC );
    }
    FOR( ; n < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; n++ )
    {
        st_ivas->p_output_fx[n] = NULL;
    }
#endif

    return error;
}
@@ -3717,15 +3698,7 @@ void ivas_destroy_dec_fx(
    /* output audio buffers */
    FOR( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ )
    {
#ifdef FIX_1330_JBM_MEMORY
        st_ivas->p_output_fx[i] = NULL;
#else
        IF( st_ivas->p_output_fx[i] != NULL )
        {
            free( st_ivas->p_output_fx[i] );
            st_ivas->p_output_fx[i] = NULL;
        }
#endif
    }

#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT
Loading