Loading apps/decoder.c +4 −4 Original line number Diff line number Diff line Loading @@ -1463,11 +1463,7 @@ static ivas_error decodeG192( ivas_error error = IVAS_ERR_UNKNOWN; uint16_t numObj = 0; IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; #ifdef FIX_406_IVAS_POSITION IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; #else IVAS_POSITION Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; #endif IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) Loading Loading @@ -1587,6 +1583,10 @@ static ivas_error decodeG192( goto cleanup; } } if ( frame == 302 ) { fprintf( stderr, "frame = %d", frame ); } /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) { Loading apps/renderer.c +0 −8 Original line number Diff line number Diff line Loading @@ -536,11 +536,7 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; #ifdef FIX_406_IVAS_POSITION IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #else IVAS_POSITION Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif #ifdef WMOPS reset_wmops(); Loading Loading @@ -991,12 +987,8 @@ int main( } else { #ifdef FIX_379_EXT_METADATA error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); if ( ( error != IVAS_ERR_OK ) && ( error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #else if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading lib_com/common_api_types.h +0 −8 Original line number Diff line number Diff line Loading @@ -96,14 +96,6 @@ typedef struct float x, y, z; } IVAS_VECTOR3; #ifndef FIX_406_IVAS_POSITION typedef struct { float x, y, z; } IVAS_POSITION; #endif typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; #ifdef FIX_350_MASA_DELAY_COMP typedef struct ivas_masa_decoder_ext_out_meta_struct *MASA_DECODER_EXT_OUT_META_HANDLE; Loading lib_com/ivas_cnst.h +6 −21 Original line number Diff line number Diff line Loading @@ -331,10 +331,11 @@ typedef enum #define ISM_RADIUS_MIN 0.0f #define ISM_RADIUS_DELTA 0.25f /* Max radius = (2^ISM_RADIUS_NBITS-1)*0.25 = 15.75 */ #define ISM_EXTENDED_METADATA_BRATE IVAS_64k #ifdef ISM_NON_DIEGETIC_PAN #define ISM_METADATA_IS_NDP_FLAG_BITS 1 #endif #define ISM_EXTENDED_METADATA_BITS 1 #ifdef FIX_379_EXT_METADATA #define ISM_METADATA_RS_MAX_FRAMES 5 /* Number of frames with opposite extended metadata flags before switching */ #endif /* Parametric ISM */ #define MAX_PARAM_ISM_NBANDS 11 Loading @@ -350,12 +351,7 @@ typedef enum #define PARAM_ISM_HYS_BUF_SIZE 10 /* ISM DTX */ #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_COH_SCA_BITS 4 #else #define PARAM_ISM_DTX_COH_SCA_BITS 4 #endif #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_AZI_BITS_HIGH 8 #define ISM_DTX_ELE_BITS_HIGH 7 #define ISM_Q_STEP_HIGH (ISM_Q_STEP / 2) Loading @@ -364,11 +360,6 @@ typedef enum #define ISM_DTX_ELE_BITS_LOW 5 #define ISM_Q_STEP_LOW (ISM_Q_STEP * 2) #define ISM_Q_STEP_BORDER_LOW (ISM_Q_STEP_BORDER * 2) #else #define PARAM_ISM_DTX_AZI_BITS 5 #define PARAM_ISM_DTX_ELE_BITS 4 #endif typedef enum { Loading @@ -383,23 +374,17 @@ enum { IND_ISM_NUM_OBJECTS, IND_ISM_EXTENDED_FLAG = IND_ISM_NUM_OBJECTS + MAX_NUM_OBJECTS, #ifdef FIX_379_EXT_METADATA IND_ISM_METADATA_FLAG, #else IND_ISM_METADATA_FLAG = IND_ISM_EXTENDED_FLAG + MAX_NUM_OBJECTS, /* EN2VE: Is this not supposed to be in the loop part below, since it is one per ISM? */ #endif IND_ISM_VAD_FLAG = IND_ISM_METADATA_FLAG + MAX_NUM_OBJECTS, #ifdef DISCRETE_ISM_DTX_CNG IND_ISM_NOISY_SPEECH_FLAG = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_SCE_ID_DTX, #else IND_ISM_SCE_ID_DTX = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_NOISY_SPEECH_FLAG, #endif IND_ISM_DTX_COH_SCA, /* ------------- loop for objects -------------- */ TAG_ISM_LOOP_START = IND_ISM_DTX_COH_SCA + MAX_NUM_OBJECTS, #ifdef ISM_NON_DIEGETIC_PAN IND_ISM_NDP_FLAG = TAG_ISM_LOOP_START, #endif IND_ISM_AZIMUTH_DIFF_FLAG = TAG_ISM_LOOP_START, IND_ISM_AZIMUTH = TAG_ISM_LOOP_START, IND_ISM_ELEVATION_DIFF_FLAG = TAG_ISM_LOOP_START, Loading lib_com/ivas_ism_com.c +5 −31 Original line number Diff line number Diff line Loading @@ -94,9 +94,6 @@ ivas_error ivas_ism_config( ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ const int16_t ism_imp[], /* i : ISM importance flags */ #ifdef ISM_NON_DIEGETIC_PAN const int16_t ism_extended_metadata_flag, /* i : Extended metadata flag */ #endif int32_t element_brate[], /* o : element bitrate per object */ int32_t total_brate[], /* o : total bitrate per object */ int16_t nb_bits_metadata[] /* i/o: number of metadata bits */ Loading Loading @@ -143,17 +140,10 @@ ivas_error ivas_ism_config( for ( ch = 0; ch < n_ISms; ch++ ) { #ifdef ISM_NON_DIEGETIC_PAN if ( ( hIsmMeta[ch]->ism_metadata_flag == 0 ) || ( ism_extended_metadata_flag ) ) { nb_bits_metadata[0] += ISM_METADATA_VAD_FLAG_BITS; } #else if ( hIsmMeta[ch]->ism_metadata_flag == 0 ) { nb_bits_metadata[0] += ISM_METADATA_VAD_FLAG_BITS; } #endif } } Loading Loading @@ -476,23 +466,13 @@ float ism_dequant_meta( * ---------------------------------------------------------------*/ void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm /* i/o: IVAS Param ISM Config Structure */ #ifdef NCHAN_ISM_PARAMETER , PARAM_ISM_CONFIG_HANDLE hParamIsm, /* i/o: IVAS Param ISM Config Structure */ const int16_t nchan_obj /* i : number of ISM channels */ #endif ) { #ifdef NCHAN_ISM_PARAMETER int16_t i; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; #else int16_t i, num_obj; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; num_obj = hParamIsm->num_obj; #endif for ( i = 0; i < hParamIsm->nbands; i++ ) { Loading @@ -500,11 +480,7 @@ void ivas_param_ism_config( } /* for elevation zero compute the max azi quantization indices */ #ifdef NCHAN_ISM_PARAMETER for ( i = 0; i < nchan_obj; i++ ) #else for ( i = 0; i < num_obj; i++ ) #endif { hParamIsm->last_az_diff[i] = 0; hParamIsm->last_az_sgn[i] = 1; Loading Loading @@ -573,7 +549,6 @@ void ivas_ism_metadata_close( } #ifdef DISCRETE_ISM_DTX_CNG /*-------------------------------------------------------------------* * update_last_metadata() * Loading Loading @@ -635,4 +610,3 @@ void ivas_get_ism_sid_quan_bitbudget( return; } #endif Loading
apps/decoder.c +4 −4 Original line number Diff line number Diff line Loading @@ -1463,11 +1463,7 @@ static ivas_error decodeG192( ivas_error error = IVAS_ERR_UNKNOWN; uint16_t numObj = 0; IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; #ifdef FIX_406_IVAS_POSITION IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; #else IVAS_POSITION Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; #endif IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) Loading Loading @@ -1587,6 +1583,10 @@ static ivas_error decodeG192( goto cleanup; } } if ( frame == 302 ) { fprintf( stderr, "frame = %d", frame ); } /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) { Loading
apps/renderer.c +0 −8 Original line number Diff line number Diff line Loading @@ -536,11 +536,7 @@ int main( int32_t delayTimeScale = 0; int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; #ifdef FIX_406_IVAS_POSITION IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #else IVAS_POSITION Pos[RENDERER_HEAD_POSITIONS_PER_FRAME]; #endif #ifdef WMOPS reset_wmops(); Loading Loading @@ -991,12 +987,8 @@ int main( } else { #ifdef FIX_379_EXT_METADATA error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); if ( ( error != IVAS_ERR_OK ) && ( error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #else if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC #endif { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); Loading
lib_com/common_api_types.h +0 −8 Original line number Diff line number Diff line Loading @@ -96,14 +96,6 @@ typedef struct float x, y, z; } IVAS_VECTOR3; #ifndef FIX_406_IVAS_POSITION typedef struct { float x, y, z; } IVAS_POSITION; #endif typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; #ifdef FIX_350_MASA_DELAY_COMP typedef struct ivas_masa_decoder_ext_out_meta_struct *MASA_DECODER_EXT_OUT_META_HANDLE; Loading
lib_com/ivas_cnst.h +6 −21 Original line number Diff line number Diff line Loading @@ -331,10 +331,11 @@ typedef enum #define ISM_RADIUS_MIN 0.0f #define ISM_RADIUS_DELTA 0.25f /* Max radius = (2^ISM_RADIUS_NBITS-1)*0.25 = 15.75 */ #define ISM_EXTENDED_METADATA_BRATE IVAS_64k #ifdef ISM_NON_DIEGETIC_PAN #define ISM_METADATA_IS_NDP_FLAG_BITS 1 #endif #define ISM_EXTENDED_METADATA_BITS 1 #ifdef FIX_379_EXT_METADATA #define ISM_METADATA_RS_MAX_FRAMES 5 /* Number of frames with opposite extended metadata flags before switching */ #endif /* Parametric ISM */ #define MAX_PARAM_ISM_NBANDS 11 Loading @@ -350,12 +351,7 @@ typedef enum #define PARAM_ISM_HYS_BUF_SIZE 10 /* ISM DTX */ #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_COH_SCA_BITS 4 #else #define PARAM_ISM_DTX_COH_SCA_BITS 4 #endif #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_AZI_BITS_HIGH 8 #define ISM_DTX_ELE_BITS_HIGH 7 #define ISM_Q_STEP_HIGH (ISM_Q_STEP / 2) Loading @@ -364,11 +360,6 @@ typedef enum #define ISM_DTX_ELE_BITS_LOW 5 #define ISM_Q_STEP_LOW (ISM_Q_STEP * 2) #define ISM_Q_STEP_BORDER_LOW (ISM_Q_STEP_BORDER * 2) #else #define PARAM_ISM_DTX_AZI_BITS 5 #define PARAM_ISM_DTX_ELE_BITS 4 #endif typedef enum { Loading @@ -383,23 +374,17 @@ enum { IND_ISM_NUM_OBJECTS, IND_ISM_EXTENDED_FLAG = IND_ISM_NUM_OBJECTS + MAX_NUM_OBJECTS, #ifdef FIX_379_EXT_METADATA IND_ISM_METADATA_FLAG, #else IND_ISM_METADATA_FLAG = IND_ISM_EXTENDED_FLAG + MAX_NUM_OBJECTS, /* EN2VE: Is this not supposed to be in the loop part below, since it is one per ISM? */ #endif IND_ISM_VAD_FLAG = IND_ISM_METADATA_FLAG + MAX_NUM_OBJECTS, #ifdef DISCRETE_ISM_DTX_CNG IND_ISM_NOISY_SPEECH_FLAG = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_SCE_ID_DTX, #else IND_ISM_SCE_ID_DTX = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_NOISY_SPEECH_FLAG, #endif IND_ISM_DTX_COH_SCA, /* ------------- loop for objects -------------- */ TAG_ISM_LOOP_START = IND_ISM_DTX_COH_SCA + MAX_NUM_OBJECTS, #ifdef ISM_NON_DIEGETIC_PAN IND_ISM_NDP_FLAG = TAG_ISM_LOOP_START, #endif IND_ISM_AZIMUTH_DIFF_FLAG = TAG_ISM_LOOP_START, IND_ISM_AZIMUTH = TAG_ISM_LOOP_START, IND_ISM_ELEVATION_DIFF_FLAG = TAG_ISM_LOOP_START, Loading
lib_com/ivas_ism_com.c +5 −31 Original line number Diff line number Diff line Loading @@ -94,9 +94,6 @@ ivas_error ivas_ism_config( ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ const int16_t ism_imp[], /* i : ISM importance flags */ #ifdef ISM_NON_DIEGETIC_PAN const int16_t ism_extended_metadata_flag, /* i : Extended metadata flag */ #endif int32_t element_brate[], /* o : element bitrate per object */ int32_t total_brate[], /* o : total bitrate per object */ int16_t nb_bits_metadata[] /* i/o: number of metadata bits */ Loading Loading @@ -143,17 +140,10 @@ ivas_error ivas_ism_config( for ( ch = 0; ch < n_ISms; ch++ ) { #ifdef ISM_NON_DIEGETIC_PAN if ( ( hIsmMeta[ch]->ism_metadata_flag == 0 ) || ( ism_extended_metadata_flag ) ) { nb_bits_metadata[0] += ISM_METADATA_VAD_FLAG_BITS; } #else if ( hIsmMeta[ch]->ism_metadata_flag == 0 ) { nb_bits_metadata[0] += ISM_METADATA_VAD_FLAG_BITS; } #endif } } Loading Loading @@ -476,23 +466,13 @@ float ism_dequant_meta( * ---------------------------------------------------------------*/ void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm /* i/o: IVAS Param ISM Config Structure */ #ifdef NCHAN_ISM_PARAMETER , PARAM_ISM_CONFIG_HANDLE hParamIsm, /* i/o: IVAS Param ISM Config Structure */ const int16_t nchan_obj /* i : number of ISM channels */ #endif ) { #ifdef NCHAN_ISM_PARAMETER int16_t i; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; #else int16_t i, num_obj; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; num_obj = hParamIsm->num_obj; #endif for ( i = 0; i < hParamIsm->nbands; i++ ) { Loading @@ -500,11 +480,7 @@ void ivas_param_ism_config( } /* for elevation zero compute the max azi quantization indices */ #ifdef NCHAN_ISM_PARAMETER for ( i = 0; i < nchan_obj; i++ ) #else for ( i = 0; i < num_obj; i++ ) #endif { hParamIsm->last_az_diff[i] = 0; hParamIsm->last_az_sgn[i] = 1; Loading Loading @@ -573,7 +549,6 @@ void ivas_ism_metadata_close( } #ifdef DISCRETE_ISM_DTX_CNG /*-------------------------------------------------------------------* * update_last_metadata() * Loading Loading @@ -635,4 +610,3 @@ void ivas_get_ism_sid_quan_bitbudget( return; } #endif