Loading apps/decoder.c +21 −10 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ typedef struct char *customLsSetupFilename; int16_t orientation_tracking; #ifdef NON_DIEGETIC_PAN int16_t non_diegetic_pan; int16_t Opt_non_diegetic_pan; float non_diegetic_pan_gain; #else float no_diegetic_pan; Loading Loading @@ -196,7 +196,7 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.no_diegetic_pan ) ) != IVAS_ERR_OK ) #endif Loading Loading @@ -363,8 +363,11 @@ int main( /*------------------------------------------------------------------------------------------* * Configure the decoder *------------------------------------------------------------------------------------------*/ #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -797,7 +800,7 @@ static bool parseCmdlIVAS_dec( arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192; #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan = 0; arg->Opt_non_diegetic_pan = 0; arg->non_diegetic_pan_gain = 0.f; #else arg->no_diegetic_pan = 0.f; Loading Loading @@ -1048,7 +1051,7 @@ static bool parseCmdlIVAS_dec( return false; } } arg->non_diegetic_pan = 1; arg->Opt_non_diegetic_pan = 1; #else if ( argc - i <= 4 || ( argv[i][0] == '-' ) ) { Loading Loading @@ -1130,18 +1133,26 @@ static bool parseCmdlIVAS_dec( arg->customLsSetupFilename = argv[i]; } i++; #ifdef NON_DIEGETIC_PAN if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputFormat != IVAS_DEC_OUTPUT_STEREO ) ) { fprintf( stderr, "Error: if non diegetic pan flag is specified output must be stereo\n\n" ); usage_dec(); return false; } #endif } else { arg->outputFormat = IVAS_DEC_OUTPUT_MONO; arg->decMode = IVAS_DEC_MODE_EVS; } #ifdef NON_DIEGETIC_PAN if ( ( arg->non_diegetic_pan ) ) if ( ( arg->Opt_non_diegetic_pan ) ) { arg->outputFormat = IVAS_DEC_OUTPUT_STEREO; } #endif } /*-----------------------------------------------------------------* * Output sampling frequency Loading lib_com/ivas_ism_com.c +6 −6 Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ void ivas_ism_reset_metadata( hIsmMeta->pitch = 0.0f; hIsmMeta->radius = 1.0f; #ifdef NON_DIEGETIC_PAN hIsmMeta->ism_metadata_flag = 1; hIsmMeta->ism_metadata_flag = 0; #endif return; Loading lib_dec/ivas_init_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1976,7 +1976,7 @@ static ivas_error doSanityChecks_IVAS( /* Verify output configuration compatible with non diegetic pan*/ #ifdef NON_DIEGETIC_PAN if ( st_ivas->hDecoderConfig->non_diegetic_pan && ( st_ivas->ivas_format != MONO_FORMAT ) && ( st_ivas->transport_config != AUDIO_CONFIG_ISM1 ) ) if ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan && ( st_ivas->ivas_format != MONO_FORMAT ) && ( st_ivas->transport_config != AUDIO_CONFIG_ISM1 ) ) { return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Error: Non-diegetic panning not supported in this IVAS format" ); } Loading lib_dec/ivas_output_config.c +1 −1 Original line number Diff line number Diff line Loading @@ -273,7 +273,7 @@ void ivas_renderer_select( else if ( st_ivas->ivas_format == ISM_FORMAT ) { #ifdef NON_DIEGETIC_PAN if ( ( output_config == AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->non_diegetic_pan ) ) if ( ( output_config == AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) ) { *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX; } Loading lib_dec/ivas_stat_dec.h +30 −30 Original line number Diff line number Diff line Loading @@ -1144,7 +1144,7 @@ typedef struct decoder_config_structure int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ int16_t orientation_tracking; /* indicates orientation tracking type */ #ifdef NON_DIEGETIC_PAN int16_t non_diegetic_pan; /* indicates diegetic or not */ int16_t Opt_non_diegetic_pan; /* indicates diegetic or not */ float non_diegetic_pan_gain; /* non diegetic panning gain*/ #else float no_diegetic_pan; Loading Loading
apps/decoder.c +21 −10 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ typedef struct char *customLsSetupFilename; int16_t orientation_tracking; #ifdef NON_DIEGETIC_PAN int16_t non_diegetic_pan; int16_t Opt_non_diegetic_pan; float non_diegetic_pan_gain; #else float no_diegetic_pan; Loading Loading @@ -196,7 +196,7 @@ int main( *------------------------------------------------------------------------------------------*/ #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.no_diegetic_pan ) ) != IVAS_ERR_OK ) #endif Loading Loading @@ -363,8 +363,11 @@ int main( /*------------------------------------------------------------------------------------------* * Configure the decoder *------------------------------------------------------------------------------------------*/ #ifdef NON_DIEGETIC_PAN if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -797,7 +800,7 @@ static bool parseCmdlIVAS_dec( arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192; #ifdef NON_DIEGETIC_PAN arg->non_diegetic_pan = 0; arg->Opt_non_diegetic_pan = 0; arg->non_diegetic_pan_gain = 0.f; #else arg->no_diegetic_pan = 0.f; Loading Loading @@ -1048,7 +1051,7 @@ static bool parseCmdlIVAS_dec( return false; } } arg->non_diegetic_pan = 1; arg->Opt_non_diegetic_pan = 1; #else if ( argc - i <= 4 || ( argv[i][0] == '-' ) ) { Loading Loading @@ -1130,18 +1133,26 @@ static bool parseCmdlIVAS_dec( arg->customLsSetupFilename = argv[i]; } i++; #ifdef NON_DIEGETIC_PAN if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputFormat != IVAS_DEC_OUTPUT_STEREO ) ) { fprintf( stderr, "Error: if non diegetic pan flag is specified output must be stereo\n\n" ); usage_dec(); return false; } #endif } else { arg->outputFormat = IVAS_DEC_OUTPUT_MONO; arg->decMode = IVAS_DEC_MODE_EVS; } #ifdef NON_DIEGETIC_PAN if ( ( arg->non_diegetic_pan ) ) if ( ( arg->Opt_non_diegetic_pan ) ) { arg->outputFormat = IVAS_DEC_OUTPUT_STEREO; } #endif } /*-----------------------------------------------------------------* * Output sampling frequency Loading
lib_com/ivas_ism_com.c +6 −6 Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ void ivas_ism_reset_metadata( hIsmMeta->pitch = 0.0f; hIsmMeta->radius = 1.0f; #ifdef NON_DIEGETIC_PAN hIsmMeta->ism_metadata_flag = 1; hIsmMeta->ism_metadata_flag = 0; #endif return; Loading
lib_dec/ivas_init_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1976,7 +1976,7 @@ static ivas_error doSanityChecks_IVAS( /* Verify output configuration compatible with non diegetic pan*/ #ifdef NON_DIEGETIC_PAN if ( st_ivas->hDecoderConfig->non_diegetic_pan && ( st_ivas->ivas_format != MONO_FORMAT ) && ( st_ivas->transport_config != AUDIO_CONFIG_ISM1 ) ) if ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan && ( st_ivas->ivas_format != MONO_FORMAT ) && ( st_ivas->transport_config != AUDIO_CONFIG_ISM1 ) ) { return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Error: Non-diegetic panning not supported in this IVAS format" ); } Loading
lib_dec/ivas_output_config.c +1 −1 Original line number Diff line number Diff line Loading @@ -273,7 +273,7 @@ void ivas_renderer_select( else if ( st_ivas->ivas_format == ISM_FORMAT ) { #ifdef NON_DIEGETIC_PAN if ( ( output_config == AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->non_diegetic_pan ) ) if ( ( output_config == AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) ) { *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX; } Loading
lib_dec/ivas_stat_dec.h +30 −30 Original line number Diff line number Diff line Loading @@ -1144,7 +1144,7 @@ typedef struct decoder_config_structure int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ int16_t orientation_tracking; /* indicates orientation tracking type */ #ifdef NON_DIEGETIC_PAN int16_t non_diegetic_pan; /* indicates diegetic or not */ int16_t Opt_non_diegetic_pan; /* indicates diegetic or not */ float non_diegetic_pan_gain; /* non diegetic panning gain*/ #else float no_diegetic_pan; Loading