Commit 6c4ccc90 authored by Jouni Paulus's avatar Jouni Paulus
Browse files

remove OMASA_BRSW_MONO_FIX since this was made unnecessary by the DirAC...

remove OMASA_BRSW_MONO_FIX since this was made unnecessary by the DirAC refactoring. close function comment fix. remove unnecessary "#if 1" and "#if 0". remove refactoring TODOs.
parent 27c6afae
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -201,7 +201,6 @@
#ifdef MASA_AND_OBJECTS
#define MASAISM_EDIT_OBJECTS                            /* Nokia: Temporary command line editing of object directions in the decoder */
#define FIX_356_ISM_METADATA_SYNC_OMASA // temp. fix
#define OMASA_BRSW_MONO_FIX                             /* Nokia: fix renderer config under rateswitching and MONO output */
#endif

/* ################## End BE DEVELOPMENT switches ######################### */
+0 −5
Original line number Diff line number Diff line
@@ -1175,12 +1175,7 @@ ivas_error ivas_init_decoder(
            return error;
        }

#if 0
        /* TODO: dirac refactor merge: check! */
        if (st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_MONO_DOWNMIX)
#else
        if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM )
#endif
        {
            if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_OPEN ) ) != IVAS_ERR_OK )
            {
+1 −1
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ ivas_error ivas_masa_ism_separate_object_renderer_open(
/*-------------------------------------------------------------------------*
 * ivas_masa_ism_separate_object_renderer_close()
 *
 * Close structures, reserve memory, and init values.
 * Close structures, free memory.
 *-------------------------------------------------------------------------*/

void ivas_masa_ism_separate_object_renderer_close(
+1 −14
Original line number Diff line number Diff line
@@ -1288,14 +1288,8 @@ ivas_error ivas_masa_dec_reconfigure(
    /* renderer might have changed, reselect */
    ivas_renderer_select( st_ivas );

/* Todo: Check this */
#if 0 && defined( OMASA_BRSW_MONO_FIX ) /* TODO */
    if ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend == NULL ) ||
         ( ( st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) && st_ivas->hDiracDecBin == NULL ) )
#else
    if ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirACRend == NULL ) ||
         ( ( st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) && st_ivas->hDiracDecBin == NULL ) )
#endif
    {
        /* init a new DirAC dec */
        if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_OPEN ) ) != IVAS_ERR_OK )
@@ -1303,11 +1297,7 @@ ivas_error ivas_masa_dec_reconfigure(
            return error;
        }
    }
#if 0 && defined( OMASA_BRSW_MONO_FIX )
    else if ( st_ivas->renderer_type == RENDERER_DISABLE || st_ivas->renderer_type == RENDERER_MONO_DOWNMIX )
#else
    else if ( st_ivas->renderer_type == RENDERER_DISABLE )
#endif
    {
        if ( st_ivas->hDirAC != NULL )
        {
@@ -1336,7 +1326,6 @@ ivas_error ivas_masa_dec_reconfigure(
        sts[0]->bit_stream = bit_stream + num_bits;
        num_bits += (int16_t) ( st_ivas->hSCE[sce_id]->element_brate / FRAMES_PER_SEC );

        /* TODO refactor merge: this is not in the pre-refactor version */
        if ( ( st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) && st_ivas->hDiracDecBin != NULL )
        {
            if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_RECONFIGURE ) ) != IVAS_ERR_OK )
@@ -1396,8 +1385,6 @@ ivas_error ivas_masa_dec_reconfigure(
    if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->last_ivas_format == MASA_FORMAT ) /* note: switching within OMASA is handled in ivas_omasa_dec_config() */
    {
#endif
#if 1
        /* TODO refactor merge: do we need this or similar?*/
        /*-----------------------------------------------------------------*
         * TD Decorrelator
         *-----------------------------------------------------------------*/
@@ -1409,7 +1396,7 @@ ivas_error ivas_masa_dec_reconfigure(
                return error;
            }
        }
#endif

        /*-----------------------------------------------------------------*
         * CLDFB instances
         *-----------------------------------------------------------------*/
+1 −3
Original line number Diff line number Diff line
@@ -360,8 +360,6 @@ ivas_error ivas_omasa_dec_config(
         * TD Decorrelator
         *-----------------------------------------------------------------*/

#if 1
        /* TODO: executed already in ivas_masa_dec_reconfigure */
        if ( st_ivas->hDiracDecBin != NULL )
        {
            if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK )
@@ -378,7 +376,7 @@ ivas_error ivas_omasa_dec_config(
        {
            return error;
        }
#endif

    }

    return IVAS_ERR_OK;