Commit 967fb6e2 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into fix_issue_1329_alt

parents 0d63aa61 6fd93f93
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -681,9 +681,7 @@ int main(
    int argc,
    char **argv )
{
#ifdef FIX_1335_EXTREND_RETCODE
    bool mainFailed = true; /* Assume main failed until cleanup is reached without errors */
#endif
    ISAR_POST_REND_HANDLE hIsarPostRend = NULL;
    RotFileReader *headRotReader = NULL;
    RotFileReader *externalOrientationFileReader = NULL;
@@ -1225,10 +1223,8 @@ int main(
     * Close files and deallocate resources
     *------------------------------------------------------------------------------------------*/

#ifdef FIX_1335_EXTREND_RETCODE
    mainFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */

#endif
cleanup:

    free( inpInt16Buffer );
@@ -1259,11 +1255,7 @@ cleanup:
    print_mem( NULL );
#endif

#ifdef FIX_1335_EXTREND_RETCODE
    return mainFailed ? -1 : 0;
#else
    return 0;
#endif
}


+0 −8
Original line number Diff line number Diff line
@@ -659,9 +659,7 @@ int main(
    int argc,
    char **argv )
{
#ifdef FIX_1335_EXTREND_RETCODE
    bool mainFailed = true; /* Assume main failed until cleanup is reached without errors */
#endif
    IVAS_REND_HANDLE hIvasRend = NULL;
    RotFileReader *headRotReader = NULL;
    RotFileReader *externalOrientationFileReader = NULL;
@@ -1979,10 +1977,8 @@ int main(
     * Close files and deallocate resources
     *------------------------------------------------------------------------------------------*/

#ifdef FIX_1335_EXTREND_RETCODE
    mainFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */

#endif
cleanup:

    free( inpInt16Buffer );
@@ -2039,11 +2035,7 @@ cleanup:
    print_mem( NULL );
#endif

#ifdef FIX_1335_EXTREND_RETCODE
    return mainFailed ? -1 : 0;
#else
    return 0;
#endif
}


+0 −4
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@

/*#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 FIX_1335_EXTREND_RETCODE                        /* FhG: Add modification of returncode for external renderer when an error occurs */
#define FIX_938_COMPILER_WARNING                        /* FhG: Fix compiler warning in ivas_mdct_core_reconstruct() */


@@ -175,9 +174,6 @@

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_1250_MCMASA_LS_OUTPUT                     /* VA: issue 1250: fix crash in McMASA to custom LS output decoding */
#define NONBE_1302_FIX_OMASA_JBM_FLUSH                  /* VA: issue 1302: fix OMASA JBM bitrate switching flush in binaural output */
#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP               /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */
#define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */
#define NONBE_1329_FIX_OSBA_CRASH                       /* FhG: issue 1329: prevent assert when bit budget is low*/

+0 −4
Original line number Diff line number Diff line
@@ -2453,14 +2453,10 @@ void ivas_dirac_dec_render_sf(

            /* Move the separated and the LFE channels to temporary variables as spatial synthesis may overwrite current channels */
            mvr2r( &( output_f[st_ivas->hOutSetup.separateChannelIndex][subframe_start_sample] ), tmp_separated, num_samples_subframe );
#ifdef NONBE_1250_MCMASA_LS_OUTPUT
            if ( hDirACRend->hOutSetup.num_lfe > 0 )
            {
                mvr2r( &( output_f[LFE_CHANNEL][subframe_start_sample] ), tmp_lfe, num_samples_subframe );
            }
#else
            mvr2r( &( output_f[LFE_CHANNEL][subframe_start_sample] ), tmp_lfe, num_samples_subframe );
#endif

            for ( ch = 0; ch < outchannels; ch++ )
            {
+0 −21
Original line number Diff line number Diff line
@@ -1504,13 +1504,11 @@ ivas_error ivas_jbm_dec_flush_renderer(
            if ( ism_mode_old == ISM_MASA_MODE_DISC )
            {
                float *tc_local[MAX_NUM_OBJECTS];
#ifdef NONBE_1302_FIX_OMASA_JBM_FLUSH
                int16_t last_dirac_md_idx;
                uint16_t nSamplesAvailableNext;
                ISM_MODE ism_mode_orig;
                RENDERER_TYPE renderer_type_orig;
                int32_t ivas_total_brate;
#endif

                /* copy from ISM delay buffer to the correct place in TCs */
                for ( ch_idx = 0; ch_idx < st_ivas->nchan_ism; ch_idx++ )
@@ -1519,7 +1517,6 @@ ivas_error ivas_jbm_dec_flush_renderer(
                    mvr2r( st_ivas->hMasaIsmData->delayBuffer[ch_idx], tc_local[ch_idx], st_ivas->hMasaIsmData->delayBuffer_size );
                }

#ifdef NONBE_1302_FIX_OMASA_JBM_FLUSH
                /* to render flushed samples, use configuration from the last received frame */
                ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
                renderer_type_orig = st_ivas->renderer_type;
@@ -1546,12 +1543,6 @@ ivas_error ivas_jbm_dec_flush_renderer(
                st_ivas->ism_mode = ism_mode_orig;
                st_ivas->renderer_type = renderer_type_orig;
                st_ivas->hDecoderConfig->ivas_total_brate = ivas_total_brate;
#else
                if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#endif
            }
        }
        else if ( st_ivas->ivas_format == SBA_ISM_FORMAT )
@@ -2262,16 +2253,13 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
    const int16_t n_samples_granularity     /* i  : new granularity of the renderer/buffer  */
)
{
#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
    int16_t ch_idx, num_tc_buffer_mem, n_samples_still_available;
    float tc_buffer_mem[MAX_INTERN_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES - 1];
#endif
    ivas_error error;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;

    hTcBuffer = st_ivas->hTcBuffer;

#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
    num_tc_buffer_mem = 0;
    n_samples_still_available = 0;

@@ -2290,7 +2278,6 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
        }
    }

#endif
    /* if granularity changes, adapt subframe_nb_slots */
    if ( n_samples_granularity != hTcBuffer->n_samples_granularity )
    {
@@ -2330,12 +2317,6 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
    hTcBuffer->nchan_buffer_full = nchan_full;
    hTcBuffer->n_samples_granularity = n_samples_granularity;

#ifndef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
#ifdef DEBUGGING
    /* what is remaining from last frames needs always be smaller than n_samples_granularity */
    assert( ( hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered ) < n_samples_granularity );
#endif
#endif
    /* reallocate TC audio buffers */

    ivas_jbm_dec_tc_audio_deallocate( hTcBuffer );
@@ -2345,14 +2326,12 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
        return error;
    }

#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP
    /* propagate samples of the TC buffer from the previous frame */
    for ( ch_idx = 0; ch_idx < num_tc_buffer_mem; ch_idx++ )
    {
        mvr2r( tc_buffer_mem[ch_idx], hTcBuffer->tc_buffer_old[ch_idx], n_samples_still_available );
    }

#endif
    return IVAS_ERR_OK;
}

Loading