Commit e35c8a15 authored by Lauros Pajunen's avatar Lauros Pajunen
Browse files

Merge remote-tracking branch 'origin/main' into add-ivas-rtpdump-support

parents 1f22a948 c686cdd1
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1055,8 +1055,12 @@ 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(
@@ -4024,8 +4028,14 @@ 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(
+13 −0
Original line number Diff line number Diff line
@@ -202,12 +202,25 @@ 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();
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@
#define NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Nokia: issue 1339: Apply scaling to the object-part of OMASA for binaural rendering in IVAS_rend. */
#define NONBE_1362_FIX_OMASA_TO_MASA1_RENDERING         /* Nokia: Fix OMASA to MASA1 rendering in IVAS_rend */
#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_1411_IGF_CRASH_BW_SWITCHING                 /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/

// object-editing feature porting
+10 −2
Original line number Diff line number Diff line
@@ -1068,7 +1068,11 @@ 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();
@@ -1082,7 +1086,11 @@ 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();
+16 −1
Original line number Diff line number Diff line
@@ -1494,6 +1494,9 @@ 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;
@@ -2903,7 +2906,7 @@ ivas_error ivas_init_decoder_fx(

    test();
    test();
    IF( ( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) || EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && st_ivas->hDecoderConfig->Opt_tsm )
    IF( ( EQ_32( st_ivas->ivas_format, MASA_FORMAT ) || EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) && hDecoderConfig->Opt_tsm )
    {
        IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
        {
@@ -2918,6 +2921,13 @@ 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
#ifdef FIX_NCHAN_BUFFERS
    k = ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, ivas_total_brate );
    FOR( n = 0; n < k; n++ )
@@ -2936,6 +2946,7 @@ ivas_error ivas_init_decoder_fx(
    {
        st_ivas->p_output_fx[n] = NULL;
    }
#endif

    return error;
}
@@ -3418,11 +3429,15 @@ 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
    }

    /* main IVAS handle */
Loading