Commit 70b169fe authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

split off spatial upmix part into dependent switch FIX_1419_SPATIAL_UMX

parent 3b0d3551
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ typedef enum _ivas_binaural_renderer_type
    IVAS_BIN_RENDERER_TYPE_DEFAULT,

} IVAS_BIN_RENDERER_TYPE;
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1419_SPATIAL_UMX

typedef struct _IVAS_MS_UMX_CONF_DATA
{
@@ -347,7 +347,7 @@ typedef struct _IVAS_RENDER_CONFIG
#endif
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA roomAcoustics;
    ISAR_SPLIT_REND_CONFIG_DATA split_rend_config;
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1419_SPATIAL_UMX
    IVAS_MS_UMX_CONF_DATA mono_stereo_upmix_config;
#endif
    float directivity[IVAS_MAX_NUM_OBJECTS * 3];
+4 −1
Original line number Diff line number Diff line
@@ -171,7 +171,10 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define FIX_1413_IGF_INIT_PRINTOUT                      /* FhG: use correct variable for IGF initiliazation */
#define RENDERER_MD_SYNC_DELAY_TO_INTEGER               /* FhG: change data type of metadata sync delay in ext renderer to int16_t for better BASOP portability (and nicer code) */
#define FIX_1419_MONO_STEREO_UMX                        /* FhG: fix for issue 1418 : support upmix to all output formats for mono and stereo */
#define FIX_1419_MONO_STEREO_UMX                        /* FhG: fix for issue 1419 : support upmix to all output formats for mono and stereo */
#ifdef FIX_1419_MONO_STEREO_UMX
/* #define FIX_1419_SPATIAL_UMX */                            /* FhG: issue 1419: enable spatial upmix for mono/stereo; configurable via renderer config */
#endif


/* #################### End BE switches ################################## */
+7 −3
Original line number Diff line number Diff line
@@ -1353,7 +1353,7 @@ ivas_error ivas_init_decoder(
    {
        ivas_output_init( &( st_ivas->hTransSetup ), st_ivas->transport_config );
    }
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1419_SPATIAL_UMX

    /* Override transport config values from render config */
    if ( ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) &&
@@ -2177,7 +2177,7 @@ ivas_error ivas_init_decoder(
    else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
    {
#ifdef IVAS_RTPDUMP
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1419_SPATIAL_UMX
        if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) &&
             ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM &&
               ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT || st_ivas->ivas_format == MC_FORMAT ) ) )
@@ -2185,7 +2185,7 @@ ivas_error ivas_init_decoder(
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->ivas_format == MC_FORMAT && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) )
#endif
#else
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1419_SPATIAL_UMX
        if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) &&
             ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM &&
               ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT || st_ivas->ivas_format == MC_FORMAT ) ) )
@@ -3200,6 +3200,10 @@ static ivas_error doSanityChecks_IVAS(
         output_config == IVAS_AUDIO_CONFIG_ISM2 ||
         output_config == IVAS_AUDIO_CONFIG_ISM3 ||
         output_config == IVAS_AUDIO_CONFIG_ISM4 ||
#ifndef FIX_1419_SPATIAL_UMX
         output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ||
         output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ||
#endif
         output_config == IVAS_AUDIO_CONFIG_MASA1 ||
         output_config == IVAS_AUDIO_CONFIG_MASA2 )
#endif
+3 −1
Original line number Diff line number Diff line
@@ -969,6 +969,7 @@ ivas_error ivas_jbm_dec_render(
                }
            }
        }
#ifdef FIX_1419_SPATIAL_UMX
        else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
        {
            /* Rendering for BINAURAL, BINAURAL_ROOM_REVERB and split rendering */
@@ -1017,7 +1018,8 @@ ivas_error ivas_jbm_dec_render(
                return error;
            }
        }
#endif
#endif /* FIX_1419_SPATIAL_UMX */
#endif /* FIX_1419_MONO_STEREO_UMX */
    }
    else if ( st_ivas->ivas_format == ISM_FORMAT )
    {
+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ ivas_error ivas_td_binaural_open(
        return IVAS_ERROR( IVAS_ERR_INTERNAL, "HRTF binary file present but not used in TD renderer" );
    }

#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1419_SPATIAL_UMX
    return ivas_td_binaural_open_unwrap( &st_ivas->hHrtfTD,
                                         st_ivas->hDecoderConfig->output_Fs,
                                         num_src,
@@ -326,7 +326,7 @@ ivas_error ivas_td_binaural_renderer_sf_splitBinaural(
                                                     st_ivas->transport_config,
                                                     st_ivas->hRenderConfig->directivity,
                                                     st_ivas->hRenderConfig->distAtt,
#ifdef FIX_1419_MONO_STEREO_UMX
#ifdef FIX_1419_SPATIAL_UMX
                                                     ( st_ivas->hRenderConfig != NULL ) ? &st_ivas->hRenderConfig->mono_stereo_upmix_config.radius : NULL,
#endif
                                                     st_ivas->hTransSetup,
Loading