Loading apps/decoder.c +44 −14 Original line number Diff line number Diff line Loading @@ -267,19 +267,50 @@ int main( /*------------------------------------------------------------------------------------------* * Open reference rotation file *------------------------------------------------------------------------------------------*/ if ( arg.enableReferenceRotation ) { /* sanity check */ if ( arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM ) { fprintf( stderr, "\nError: Reference rotation file cannot be used in this output configuration.\n\n" ); goto cleanup; } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF ) { fprintf( stderr, "\nError: Reference rotation file can be used in '-otr ref' mode only.\n\n" ); goto cleanup; } if ( ( error = HeadRotationFileReader_open( arg.refrotTrajFileName, &refRotReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open reference rotation file %s \n\n", arg.refrotTrajFileName ); goto cleanup; } } /*------------------------------------------------------------------------------------------* * Open reference vector trajectory file *------------------------------------------------------------------------------------------*/ if ( arg.enableReferenceVectorTracking ) { /* sanity check */ if ( arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM ) { fprintf( stderr, "\nError: Reference vector trajectory file cannot be used in this output configuration.\n\n" ); goto cleanup; } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC && arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ) { fprintf( stderr, "\nError: Reference trajectory file can be used in '-otr ref_vec' or '-otr ref_vec_lev' mode only.\n\n" ); goto cleanup; } if ( ( error = Vector3PairFileReader_open( arg.referenceVectorTrajFileName, &referenceVectorReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open reference vector trajectory file %s \n\n", arg.referenceVectorTrajFileName ); Loading Loading @@ -873,9 +904,7 @@ static bool parseCmdlIVAS_dec( } #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK /*-----------------------------------------------------------------* * Define additional subfolder for debug info output in ./res *-----------------------------------------------------------------*/ /* Define additional subfolder for debug info output in ./res */ else if ( strcmp( argv_to_upper, "-INFO" ) == 0 ) { extern char infoFolder[FILENAME_MAX]; Loading Loading @@ -1153,8 +1182,19 @@ static void usage_dec( void ) fprintf( stdout, " Format files, the magic word in the mime file is used to determine\n" ); fprintf( stdout, " which of the two supported formats is in use.\n" ); fprintf( stdout, " default bitstream file format is G.192\n" ); fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); fprintf( stdout, "-hrtf File : HRTF filter File used in BINAURAL output configuration\n" ); fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); fprintf( stdout, "-otr tracking_type : Head orientation tracking type: 'none', 'ref', 'avg', 'ref_vec' \n" ); fprintf( stdout, " or 'ref_vec_lev' (only for binaural rendering)\n" ); fprintf( stdout, "-rf File : Reference rotation specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with '-otr ref' mode \n" ); fprintf( stdout, "-rvf File : Reference vector specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes\n" ); fprintf( stdout, "-render_config File : Renderer configuration File\n" ); fprintf( stdout, "-no_diegetic_pan : panning mono non-diegetic sound to stereo -1<= pan <=1,\n" ); fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); #ifdef DEBUGGING fprintf( stdout, "-FEC X : Insert frame erasures, X = 0-10 is the percentage\n" ); fprintf( stdout, " of erased frames, or X may be the name of binary file or \n" ); Loading @@ -1163,16 +1203,6 @@ static void usage_dec( void ) fprintf( stdout, " default is OFF, if this option is not used\n" ); fprintf( stdout, "-force R : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" ); #endif fprintf( stdout, "-otr tracking_type : head orientation tracking type: 'none', 'ref' or 'avg' (only for binaural rendering)\n" ); fprintf( stdout, "-rf File : Reference rotation specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with -otr ref mode\n" ); fprintf( stdout, "-rvf File : Reference vector specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with -otr ref_vec and ref_vec_lev modes\n" ); fprintf( stdout, "-render_config file : Renderer configuration file\n" ); fprintf( stdout, "-no_diegetic_pan : panning mono no dietic sound to stereo -1<= pan <=1,\n" ); fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading lib_com/ivas_cnst.h +8 −1 Original line number Diff line number Diff line Loading @@ -1231,6 +1231,13 @@ typedef enum MASA_STEREO_DOWNMIX } MASA_TRANSPORT_SIGNAL_TYPE; #ifdef FIX_382_MASA_META_FRAMING_ASYNC typedef enum { MASA_FRAME_1SF, MASA_FRAME_4SF } MASA_FRAME_MODE; #endif /*----------------------------------------------------------------------------------* * Multichannel format Loading lib_com/ivas_masa_com.c +2 −2 Original line number Diff line number Diff line Loading @@ -314,7 +314,7 @@ void masa_sample_rate_band_correction( int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ const int32_t sampling_rate /* i : Sampling rate */ #ifdef FIX_373_MASA_DELAY_COMP #ifdef FIX_350_MASA_DELAY_COMP , MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ #endif Loading Loading @@ -390,7 +390,7 @@ void masa_sample_rate_band_correction( hQMetaData->twoDirBands[band] = 0; } } #ifdef FIX_373_MASA_DELAY_COMP #ifdef FIX_350_MASA_DELAY_COMP if ( hExtOutMeta != NULL ) { /* in decoder, zero the EXT out MASA meta buffer */ Loading lib_com/ivas_prot.h 100644 → 100755 +10 −1 Original line number Diff line number Diff line Loading @@ -1205,6 +1205,9 @@ void stereo_dft_dec( float *input_mem, /* i/o: mem of buffer DFT analysis */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i/o: Stereo CNG data structure */ const int16_t sba_dirac_stereo_flag, /* i : signal stereo output for SBA DirAC */ #ifdef SBA2MONO const int16_t sba_mono_flag, /* i : signal mono output for SBA DirAC */ #endif ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ const int16_t cross_fade_start_offset, /* i : SPAR mixer delay compensation */ const int32_t output_Fs, /* i : Fs for delay calculation */ Loading Loading @@ -3334,6 +3337,12 @@ void ivas_sba_dirac_stereo_config( STEREO_DFT_CONFIG_DATA_HANDLE hConfig /* o : DFT stereo configuration */ ); #ifdef SBA2MONO int16_t ivas_get_sba_dirac_stereo_flag( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif void ivas_sba_dirac_stereo_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: encoder DFT stereo handle */ ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ Loading Loading @@ -4725,7 +4734,7 @@ void masa_sample_rate_band_correction( int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ const int32_t sampling_rate /* i : sampling rate */ #ifdef FIX_373_MASA_DELAY_COMP #ifdef FIX_350_MASA_DELAY_COMP , MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ #endif ); Loading lib_com/options.h +5 −1 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define FIX_103_RA_PARAMS_PARAM_BIN_REND /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/ /*#define SBA_HPF_TUNING_DEC*/ #define FIX_350_MASA_DELAY_COMP /* Nokia: Issue 350: MASA audio/meta delay compensation */ Loading @@ -148,6 +149,9 @@ #define DISCRETE_ISM_DTX_CNG /* FhG/VA: contribution 15 - DTX/CNG for (discrete) ISM */ #define NCHAN_ISM_PARAMETER /* VA: make 'nchan_ism' parameter part of st_ivas/hEncoderConfig */ #define FIX_382_MASA_META_FRAMING_ASYNC /* Nokia: Issue 382: detect potential MASA metadata framing offset */ #define SBA2MONO /* FhG: Issue 365: Adapt processing of SBA mono output to be in line with stereo output (less delay, lower complexity) */ #define HODIRAC /* FhG: Sector-based HO-DirAC method for SBA at high bitrates */ #define HODIRAC_CRASH_FIX /*#define HODIRAC_PRED*/ Loading @@ -163,7 +167,7 @@ //#define HODIRAC_WRITE_PARAMS //#define HODIRAC_READ_PARAMS #endif #define FIX_392_LATE_REVERB /* DLB : Issue 392: keep late reverb by default off when output config is not BINAURAL_ROOM*/ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading Loading
apps/decoder.c +44 −14 Original line number Diff line number Diff line Loading @@ -267,19 +267,50 @@ int main( /*------------------------------------------------------------------------------------------* * Open reference rotation file *------------------------------------------------------------------------------------------*/ if ( arg.enableReferenceRotation ) { /* sanity check */ if ( arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM ) { fprintf( stderr, "\nError: Reference rotation file cannot be used in this output configuration.\n\n" ); goto cleanup; } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF ) { fprintf( stderr, "\nError: Reference rotation file can be used in '-otr ref' mode only.\n\n" ); goto cleanup; } if ( ( error = HeadRotationFileReader_open( arg.refrotTrajFileName, &refRotReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open reference rotation file %s \n\n", arg.refrotTrajFileName ); goto cleanup; } } /*------------------------------------------------------------------------------------------* * Open reference vector trajectory file *------------------------------------------------------------------------------------------*/ if ( arg.enableReferenceVectorTracking ) { /* sanity check */ if ( arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL && arg.outputFormat != IVAS_DEC_OUTPUT_BINAURAL_ROOM ) { fprintf( stderr, "\nError: Reference vector trajectory file cannot be used in this output configuration.\n\n" ); goto cleanup; } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC && arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ) { fprintf( stderr, "\nError: Reference trajectory file can be used in '-otr ref_vec' or '-otr ref_vec_lev' mode only.\n\n" ); goto cleanup; } if ( ( error = Vector3PairFileReader_open( arg.referenceVectorTrajFileName, &referenceVectorReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: Can't open reference vector trajectory file %s \n\n", arg.referenceVectorTrajFileName ); Loading Loading @@ -873,9 +904,7 @@ static bool parseCmdlIVAS_dec( } #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK /*-----------------------------------------------------------------* * Define additional subfolder for debug info output in ./res *-----------------------------------------------------------------*/ /* Define additional subfolder for debug info output in ./res */ else if ( strcmp( argv_to_upper, "-INFO" ) == 0 ) { extern char infoFolder[FILENAME_MAX]; Loading Loading @@ -1153,8 +1182,19 @@ static void usage_dec( void ) fprintf( stdout, " Format files, the magic word in the mime file is used to determine\n" ); fprintf( stdout, " which of the two supported formats is in use.\n" ); fprintf( stdout, " default bitstream file format is G.192\n" ); fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); fprintf( stdout, "-hrtf File : HRTF filter File used in BINAURAL output configuration\n" ); fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); fprintf( stdout, "-otr tracking_type : Head orientation tracking type: 'none', 'ref', 'avg', 'ref_vec' \n" ); fprintf( stdout, " or 'ref_vec_lev' (only for binaural rendering)\n" ); fprintf( stdout, "-rf File : Reference rotation specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with '-otr ref' mode \n" ); fprintf( stdout, "-rvf File : Reference vector specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes\n" ); fprintf( stdout, "-render_config File : Renderer configuration File\n" ); fprintf( stdout, "-no_diegetic_pan : panning mono non-diegetic sound to stereo -1<= pan <=1,\n" ); fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); #ifdef DEBUGGING fprintf( stdout, "-FEC X : Insert frame erasures, X = 0-10 is the percentage\n" ); fprintf( stdout, " of erased frames, or X may be the name of binary file or \n" ); Loading @@ -1163,16 +1203,6 @@ static void usage_dec( void ) fprintf( stdout, " default is OFF, if this option is not used\n" ); fprintf( stdout, "-force R : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" ); #endif fprintf( stdout, "-otr tracking_type : head orientation tracking type: 'none', 'ref' or 'avg' (only for binaural rendering)\n" ); fprintf( stdout, "-rf File : Reference rotation specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with -otr ref mode\n" ); fprintf( stdout, "-rvf File : Reference vector specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with -otr ref_vec and ref_vec_lev modes\n" ); fprintf( stdout, "-render_config file : Renderer configuration file\n" ); fprintf( stdout, "-no_diegetic_pan : panning mono no dietic sound to stereo -1<= pan <=1,\n" ); fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK fprintf( stdout, "-info <folder> : specify subfolder name for debug output\n" ); Loading
lib_com/ivas_cnst.h +8 −1 Original line number Diff line number Diff line Loading @@ -1231,6 +1231,13 @@ typedef enum MASA_STEREO_DOWNMIX } MASA_TRANSPORT_SIGNAL_TYPE; #ifdef FIX_382_MASA_META_FRAMING_ASYNC typedef enum { MASA_FRAME_1SF, MASA_FRAME_4SF } MASA_FRAME_MODE; #endif /*----------------------------------------------------------------------------------* * Multichannel format Loading
lib_com/ivas_masa_com.c +2 −2 Original line number Diff line number Diff line Loading @@ -314,7 +314,7 @@ void masa_sample_rate_band_correction( int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ const int32_t sampling_rate /* i : Sampling rate */ #ifdef FIX_373_MASA_DELAY_COMP #ifdef FIX_350_MASA_DELAY_COMP , MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ #endif Loading Loading @@ -390,7 +390,7 @@ void masa_sample_rate_band_correction( hQMetaData->twoDirBands[band] = 0; } } #ifdef FIX_373_MASA_DELAY_COMP #ifdef FIX_350_MASA_DELAY_COMP if ( hExtOutMeta != NULL ) { /* in decoder, zero the EXT out MASA meta buffer */ Loading
lib_com/ivas_prot.h 100644 → 100755 +10 −1 Original line number Diff line number Diff line Loading @@ -1205,6 +1205,9 @@ void stereo_dft_dec( float *input_mem, /* i/o: mem of buffer DFT analysis */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i/o: Stereo CNG data structure */ const int16_t sba_dirac_stereo_flag, /* i : signal stereo output for SBA DirAC */ #ifdef SBA2MONO const int16_t sba_mono_flag, /* i : signal mono output for SBA DirAC */ #endif ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ const int16_t cross_fade_start_offset, /* i : SPAR mixer delay compensation */ const int32_t output_Fs, /* i : Fs for delay calculation */ Loading Loading @@ -3334,6 +3337,12 @@ void ivas_sba_dirac_stereo_config( STEREO_DFT_CONFIG_DATA_HANDLE hConfig /* o : DFT stereo configuration */ ); #ifdef SBA2MONO int16_t ivas_get_sba_dirac_stereo_flag( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif void ivas_sba_dirac_stereo_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: encoder DFT stereo handle */ ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ Loading Loading @@ -4725,7 +4734,7 @@ void masa_sample_rate_band_correction( int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ const int32_t sampling_rate /* i : sampling rate */ #ifdef FIX_373_MASA_DELAY_COMP #ifdef FIX_350_MASA_DELAY_COMP , MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ #endif ); Loading
lib_com/options.h +5 −1 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define FIX_103_RA_PARAMS_PARAM_BIN_REND /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/ /*#define SBA_HPF_TUNING_DEC*/ #define FIX_350_MASA_DELAY_COMP /* Nokia: Issue 350: MASA audio/meta delay compensation */ Loading @@ -148,6 +149,9 @@ #define DISCRETE_ISM_DTX_CNG /* FhG/VA: contribution 15 - DTX/CNG for (discrete) ISM */ #define NCHAN_ISM_PARAMETER /* VA: make 'nchan_ism' parameter part of st_ivas/hEncoderConfig */ #define FIX_382_MASA_META_FRAMING_ASYNC /* Nokia: Issue 382: detect potential MASA metadata framing offset */ #define SBA2MONO /* FhG: Issue 365: Adapt processing of SBA mono output to be in line with stereo output (less delay, lower complexity) */ #define HODIRAC /* FhG: Sector-based HO-DirAC method for SBA at high bitrates */ #define HODIRAC_CRASH_FIX /*#define HODIRAC_PRED*/ Loading @@ -163,7 +167,7 @@ //#define HODIRAC_WRITE_PARAMS //#define HODIRAC_READ_PARAMS #endif #define FIX_392_LATE_REVERB /* DLB : Issue 392: keep late reverb by default off when output config is not BINAURAL_ROOM*/ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading