Loading apps/decoder.c +186 −59 File changed.Preview size limit exceeded, changes collapsed. Show changes apps/encoder.c +1 −56 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ #include "ism_file_reader.h" #include "jbm_file_reader.h" #include "masa_file_reader.h" #ifdef AMBISONICS_CONVENTIONS #include "ambi_convert.h" #endif #ifdef DEBUGGING #include "debug.h" #endif Loading Loading @@ -124,9 +121,6 @@ typedef struct bool max_bwidth_user; IVAS_ENC_BANDWIDTH maxBandwidth; const char *bandwithProfileFile; #ifdef AMBISONICS_CONVENTIONS AMBI_FMT sba_input_fmt; #endif IVAS_ENC_DTX_CONFIG dtxConfig; int32_t initBitrate; const char *bitrateProfileFile; Loading Loading @@ -414,10 +408,6 @@ int main( #ifdef DEBUG_SBA_AUDIO_DUMP , &numTransportChannels #endif #ifdef AMBISONICS_CONVENTIONS , arg.sba_input_fmt #endif ) ) != IVAS_ERR_OK ) { Loading @@ -441,12 +431,7 @@ int main( } break; case IVAS_ENC_INPUT_SBA_ISM: if ( ( error = IVAS_ENC_ConfigureForSBAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba_ism.numObjects, arg.inputFormatConfig.sba_ism.order, arg.inputFormatConfig.sba_ism.isPlanar, arg.pca #ifdef AMBISONICS_CONVENTIONS , arg.sba_input_fmt #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_ENC_ConfigureForSBAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba_ism.numObjects, arg.inputFormatConfig.sba_ism.order, arg.inputFormatConfig.sba_ism.isPlanar, arg.pca ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_ENC_ConfigureForSBAObjects failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); exit( -1 ); Loading Loading @@ -894,9 +879,6 @@ static void initArgStruct( EncArguments *arg ) arg->outputBitstreamFilename = NULL; arg->inputFs = 0; arg->inputFormat = IVAS_ENC_INPUT_MONO; #ifdef AMBISONICS_CONVENTIONS arg->sba_input_fmt = AMBI_FMT_ACN_SN3D; #endif arg->is_binaural = false; arg->inputFormatConfig.stereoToMonoDownmix = false; arg->max_bwidth_user = false; Loading Loading @@ -929,7 +911,6 @@ static void initArgStruct( EncArguments *arg ) #endif arg->pca = false; return; } Loading Loading @@ -1202,38 +1183,6 @@ static bool parseCmdlIVAS_enc( } } /* ---------------------------------------------------------------- * SBA input convention *------------------------------------------------------------------*/ #ifdef AMBISONICS_CONVENTIONS else if ( strcmp( argv_to_upper, "-SBA_CONVENTION" ) == 0 ) { i++; arg->sba_input_fmt = AMBI_FMT_ACN_SN3D; /* SBA configuration */ if ( i < argc - 4 && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; } else { tmp = -1; /* this is to avoid a compilation warning */ fprintf( stderr, "Error: SBA input convention must be specified, expecting a number in [0,5]!\n\n" ); usage_enc(); return false; } if ( tmp < 0 || tmp > 5 ) { tmp = -1; /* this is to avoid a compilation warning */ fprintf( stderr, "Error: SBA input convention must be specified, expecting a number in [0,5]!\n\n" ); usage_enc(); return false; } arg->sba_input_fmt = tmp; } #endif /*-----------------------------------------------------------------* * MIME output file format *-----------------------------------------------------------------*/ Loading Loading @@ -1907,10 +1856,6 @@ static void usage_enc( void ) fprintf( stdout, "-sba +/-Order : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" ); fprintf( stdout, " where Order specifies the Ambisionics order (1-3),\n" ); fprintf( stdout, " where positive (+) means full 3D and negative (-) only 2D/planar components to be coded\n" ); #ifdef AMBISONICS_CONVENTIONS fprintf( stdout, "-sba_convention n : Ambisonics convention of the input signal" ); fprintf( stdout, " where n = 0 (ACN-SN3D), 1 (ACN-N3D), 2 (FuMa-MaxN), 3 (FuMa-FuMa), 4 (SID-SN3D), 5 (SID-N3D)" ); #endif fprintf( stdout, "-masa Ch File : MASA format \n" ); fprintf( stdout, " where Ch specifies the number of MASA input/transport channels (1 or 2): \n" ); fprintf( stdout, " and File specifies input file containing parametric MASA metadata \n" ); Loading Loading
apps/encoder.c +1 −56 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ #include "ism_file_reader.h" #include "jbm_file_reader.h" #include "masa_file_reader.h" #ifdef AMBISONICS_CONVENTIONS #include "ambi_convert.h" #endif #ifdef DEBUGGING #include "debug.h" #endif Loading Loading @@ -124,9 +121,6 @@ typedef struct bool max_bwidth_user; IVAS_ENC_BANDWIDTH maxBandwidth; const char *bandwithProfileFile; #ifdef AMBISONICS_CONVENTIONS AMBI_FMT sba_input_fmt; #endif IVAS_ENC_DTX_CONFIG dtxConfig; int32_t initBitrate; const char *bitrateProfileFile; Loading Loading @@ -414,10 +408,6 @@ int main( #ifdef DEBUG_SBA_AUDIO_DUMP , &numTransportChannels #endif #ifdef AMBISONICS_CONVENTIONS , arg.sba_input_fmt #endif ) ) != IVAS_ERR_OK ) { Loading @@ -441,12 +431,7 @@ int main( } break; case IVAS_ENC_INPUT_SBA_ISM: if ( ( error = IVAS_ENC_ConfigureForSBAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba_ism.numObjects, arg.inputFormatConfig.sba_ism.order, arg.inputFormatConfig.sba_ism.isPlanar, arg.pca #ifdef AMBISONICS_CONVENTIONS , arg.sba_input_fmt #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_ENC_ConfigureForSBAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba_ism.numObjects, arg.inputFormatConfig.sba_ism.order, arg.inputFormatConfig.sba_ism.isPlanar, arg.pca ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_ENC_ConfigureForSBAObjects failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); exit( -1 ); Loading Loading @@ -894,9 +879,6 @@ static void initArgStruct( EncArguments *arg ) arg->outputBitstreamFilename = NULL; arg->inputFs = 0; arg->inputFormat = IVAS_ENC_INPUT_MONO; #ifdef AMBISONICS_CONVENTIONS arg->sba_input_fmt = AMBI_FMT_ACN_SN3D; #endif arg->is_binaural = false; arg->inputFormatConfig.stereoToMonoDownmix = false; arg->max_bwidth_user = false; Loading Loading @@ -929,7 +911,6 @@ static void initArgStruct( EncArguments *arg ) #endif arg->pca = false; return; } Loading Loading @@ -1202,38 +1183,6 @@ static bool parseCmdlIVAS_enc( } } /* ---------------------------------------------------------------- * SBA input convention *------------------------------------------------------------------*/ #ifdef AMBISONICS_CONVENTIONS else if ( strcmp( argv_to_upper, "-SBA_CONVENTION" ) == 0 ) { i++; arg->sba_input_fmt = AMBI_FMT_ACN_SN3D; /* SBA configuration */ if ( i < argc - 4 && is_number( argv[i] ) && sscanf( argv[i], "%d", &tmp ) > 0 ) { i++; } else { tmp = -1; /* this is to avoid a compilation warning */ fprintf( stderr, "Error: SBA input convention must be specified, expecting a number in [0,5]!\n\n" ); usage_enc(); return false; } if ( tmp < 0 || tmp > 5 ) { tmp = -1; /* this is to avoid a compilation warning */ fprintf( stderr, "Error: SBA input convention must be specified, expecting a number in [0,5]!\n\n" ); usage_enc(); return false; } arg->sba_input_fmt = tmp; } #endif /*-----------------------------------------------------------------* * MIME output file format *-----------------------------------------------------------------*/ Loading Loading @@ -1907,10 +1856,6 @@ static void usage_enc( void ) fprintf( stdout, "-sba +/-Order : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" ); fprintf( stdout, " where Order specifies the Ambisionics order (1-3),\n" ); fprintf( stdout, " where positive (+) means full 3D and negative (-) only 2D/planar components to be coded\n" ); #ifdef AMBISONICS_CONVENTIONS fprintf( stdout, "-sba_convention n : Ambisonics convention of the input signal" ); fprintf( stdout, " where n = 0 (ACN-SN3D), 1 (ACN-N3D), 2 (FuMa-MaxN), 3 (FuMa-FuMa), 4 (SID-SN3D), 5 (SID-N3D)" ); #endif fprintf( stdout, "-masa Ch File : MASA format \n" ); fprintf( stdout, " where Ch specifies the number of MASA input/transport channels (1 or 2): \n" ); fprintf( stdout, " and File specifies input file containing parametric MASA metadata \n" ); Loading