Loading lib_dec/ivas_dirac_dec.c +30 −3 Original line number Diff line number Diff line Loading @@ -138,6 +138,17 @@ static ivas_error ivas_dirac_rend_config( DIRAC_REND_HANDLE hDirACRend; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; #ifdef IVAS_FLOAT_FIXED Word32 ls_azimuth_fx[MAX_OUTPUT_CHANNELS]; Word32 ls_elevation_fx[MAX_OUTPUT_CHANNELS]; FOR ( i = 0; i < MAX_OUTPUT_CHANNELS; i++) { ls_azimuth[i] = 0.0f; ls_elevation[i] = 0.0f; ls_azimuth_fx[i] = 0; ls_elevation_fx[i] = 0; } #endif flag_config = ( flag_config_inp == DIRAC_RECONFIGURE_MODE ) ? DIRAC_RECONFIGURE : flag_config_inp; error = IVAS_ERR_OK; Loading Loading @@ -270,7 +281,7 @@ static ivas_error ivas_dirac_rend_config( Word16 *frequency_axis_fx = (Word16 *) malloc(hSpatParamRendCom->num_freq_bands * sizeof( Word16 ) ); ivas_dirac_dec_get_frequency_axis_fx( frequency_axis_fx, output_Fs, hSpatParamRendCom->num_freq_bands ); FOR (Word16 i = 0; i < hSpatParamRendCom->num_freq_bands; i++) FOR ( i = 0; i < hSpatParamRendCom->num_freq_bands; i++) { hDirACRend->frequency_axis[i] = ( float ) frequency_axis_fx[i]; } Loading Loading @@ -543,6 +554,21 @@ static ivas_error ivas_dirac_rend_config( if ( hDirACRend->panningConf == DIRAC_PANNING_VBAP ) { #ifdef IVAS_FLOAT_FIXED for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++) { ls_azimuth_fx[i] = float_to_fix(ls_azimuth[i], Q22); ls_elevation_fx[i] = float_to_fix(ls_elevation[i], Q22); } if ( flag_config == DIRAC_RECONFIGURE && st_ivas->hVBAPdata != NULL ) { vbap_free_data_fx( &( st_ivas->hVBAPdata ) ); } if ( ( error = vbap_init_data_fx( &( st_ivas->hVBAPdata ), ls_azimuth_fx, ls_elevation_fx, nchan_out_woLFE, st_ivas->ivas_format ) ) != IVAS_ERR_OK ) { return error; } #else if (flag_config == DIRAC_RECONFIGURE && st_ivas->hVBAPdata != NULL) { vbap_free_data(&(st_ivas->hVBAPdata)); Loading @@ -552,6 +578,7 @@ static ivas_error ivas_dirac_rend_config( { return error; } #endif } else if ( hDirACRend->synthesisConf == DIRAC_SYNTHESIS_MONO ) { Loading lib_rend/ivas_prot_rend.h +11 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,14 @@ void vbap_determine_gains( const int16_t use_object_mode /* i : select between object mode panning and spatial mode panning */ ); #ifdef IVAS_FLOAT_FIXED ivas_error vbap_init_data_fx( VBAP_HANDLE *hVBAPdata, /* i/o: handle for VBAP data structure that will be initialized */ const Word32 *speaker_node_azi_deg, /* i : vector of speaker node azimuths (positive left) */ const Word32 *speaker_node_ele_deg, /* i : vector of speaker node elevations (positive up) */ const Word16 num_speaker_nodes, /* i : number of speaker nodes in the set */ const IVAS_FORMAT ivas_format /* i : IVAS format */ ); void vbap_determine_gains_fx( const VBAP_HANDLE hVBAPdata, /* i : prepared VBAP structure */ Word32 *gains_fx, /* o : gain vector for loudspeakers for given direction */ Loading @@ -269,6 +277,9 @@ void vbap_determine_gains_fx( const Word16 ele_deg, /* i : elevation in degrees for panning direction (positive up) */ const Word16 use_object_mode /* i : select between object mode panning and spatial mode panning */ ); void vbap_free_data_fx( VBAP_HANDLE *hVBAPdata /* i/o: VBAP handle to be freed */ ); #endif Loading lib_rend/ivas_stat_rend.h +7 −7 Original line number Diff line number Diff line Loading @@ -493,6 +493,7 @@ typedef struct vbap_vs_triplet_structure #ifdef IVAS_FLOAT_FIXED Word32 inverse_matrix_fx[3][3]; Word16 q_inverse_matrix; Word16 exp_inv_matrix; #endif } VBAP_VS_TRIPLET; Loading Loading @@ -525,14 +526,13 @@ typedef struct vbap_data_structure float *object_mode_top_virtual_speaker_node_division_gains; float *object_mode_back_virtual_speaker_node_division_gains; #ifdef IVAS_FLOAT_FIXED Word32 *bottom_virtual_speaker_node_division_gains_fx; Word32 *top_virtual_speaker_node_division_gains_fx; Word32 *back_virtual_speaker_node_division_gains_fx; Word32 *object_mode_bottom_virtual_speaker_node_division_gains_fx; Word32 *object_mode_top_virtual_speaker_node_division_gains_fx; Word32 *object_mode_back_virtual_speaker_node_division_gains_fx; Word16 *bottom_virtual_speaker_node_division_gains_fx; Word16 *top_virtual_speaker_node_division_gains_fx; Word16 *back_virtual_speaker_node_division_gains_fx; Word16 *object_mode_bottom_virtual_speaker_node_division_gains_fx; Word16 *object_mode_top_virtual_speaker_node_division_gains_fx; Word16 *object_mode_back_virtual_speaker_node_division_gains_fx; #endif } VBAP_DATA, *VBAP_HANDLE; Loading lib_rend/ivas_vbap.c +2428 −462 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
lib_dec/ivas_dirac_dec.c +30 −3 Original line number Diff line number Diff line Loading @@ -138,6 +138,17 @@ static ivas_error ivas_dirac_rend_config( DIRAC_REND_HANDLE hDirACRend; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; #ifdef IVAS_FLOAT_FIXED Word32 ls_azimuth_fx[MAX_OUTPUT_CHANNELS]; Word32 ls_elevation_fx[MAX_OUTPUT_CHANNELS]; FOR ( i = 0; i < MAX_OUTPUT_CHANNELS; i++) { ls_azimuth[i] = 0.0f; ls_elevation[i] = 0.0f; ls_azimuth_fx[i] = 0; ls_elevation_fx[i] = 0; } #endif flag_config = ( flag_config_inp == DIRAC_RECONFIGURE_MODE ) ? DIRAC_RECONFIGURE : flag_config_inp; error = IVAS_ERR_OK; Loading Loading @@ -270,7 +281,7 @@ static ivas_error ivas_dirac_rend_config( Word16 *frequency_axis_fx = (Word16 *) malloc(hSpatParamRendCom->num_freq_bands * sizeof( Word16 ) ); ivas_dirac_dec_get_frequency_axis_fx( frequency_axis_fx, output_Fs, hSpatParamRendCom->num_freq_bands ); FOR (Word16 i = 0; i < hSpatParamRendCom->num_freq_bands; i++) FOR ( i = 0; i < hSpatParamRendCom->num_freq_bands; i++) { hDirACRend->frequency_axis[i] = ( float ) frequency_axis_fx[i]; } Loading Loading @@ -543,6 +554,21 @@ static ivas_error ivas_dirac_rend_config( if ( hDirACRend->panningConf == DIRAC_PANNING_VBAP ) { #ifdef IVAS_FLOAT_FIXED for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++) { ls_azimuth_fx[i] = float_to_fix(ls_azimuth[i], Q22); ls_elevation_fx[i] = float_to_fix(ls_elevation[i], Q22); } if ( flag_config == DIRAC_RECONFIGURE && st_ivas->hVBAPdata != NULL ) { vbap_free_data_fx( &( st_ivas->hVBAPdata ) ); } if ( ( error = vbap_init_data_fx( &( st_ivas->hVBAPdata ), ls_azimuth_fx, ls_elevation_fx, nchan_out_woLFE, st_ivas->ivas_format ) ) != IVAS_ERR_OK ) { return error; } #else if (flag_config == DIRAC_RECONFIGURE && st_ivas->hVBAPdata != NULL) { vbap_free_data(&(st_ivas->hVBAPdata)); Loading @@ -552,6 +578,7 @@ static ivas_error ivas_dirac_rend_config( { return error; } #endif } else if ( hDirACRend->synthesisConf == DIRAC_SYNTHESIS_MONO ) { Loading
lib_rend/ivas_prot_rend.h +11 −0 Original line number Diff line number Diff line Loading @@ -262,6 +262,14 @@ void vbap_determine_gains( const int16_t use_object_mode /* i : select between object mode panning and spatial mode panning */ ); #ifdef IVAS_FLOAT_FIXED ivas_error vbap_init_data_fx( VBAP_HANDLE *hVBAPdata, /* i/o: handle for VBAP data structure that will be initialized */ const Word32 *speaker_node_azi_deg, /* i : vector of speaker node azimuths (positive left) */ const Word32 *speaker_node_ele_deg, /* i : vector of speaker node elevations (positive up) */ const Word16 num_speaker_nodes, /* i : number of speaker nodes in the set */ const IVAS_FORMAT ivas_format /* i : IVAS format */ ); void vbap_determine_gains_fx( const VBAP_HANDLE hVBAPdata, /* i : prepared VBAP structure */ Word32 *gains_fx, /* o : gain vector for loudspeakers for given direction */ Loading @@ -269,6 +277,9 @@ void vbap_determine_gains_fx( const Word16 ele_deg, /* i : elevation in degrees for panning direction (positive up) */ const Word16 use_object_mode /* i : select between object mode panning and spatial mode panning */ ); void vbap_free_data_fx( VBAP_HANDLE *hVBAPdata /* i/o: VBAP handle to be freed */ ); #endif Loading
lib_rend/ivas_stat_rend.h +7 −7 Original line number Diff line number Diff line Loading @@ -493,6 +493,7 @@ typedef struct vbap_vs_triplet_structure #ifdef IVAS_FLOAT_FIXED Word32 inverse_matrix_fx[3][3]; Word16 q_inverse_matrix; Word16 exp_inv_matrix; #endif } VBAP_VS_TRIPLET; Loading Loading @@ -525,14 +526,13 @@ typedef struct vbap_data_structure float *object_mode_top_virtual_speaker_node_division_gains; float *object_mode_back_virtual_speaker_node_division_gains; #ifdef IVAS_FLOAT_FIXED Word32 *bottom_virtual_speaker_node_division_gains_fx; Word32 *top_virtual_speaker_node_division_gains_fx; Word32 *back_virtual_speaker_node_division_gains_fx; Word32 *object_mode_bottom_virtual_speaker_node_division_gains_fx; Word32 *object_mode_top_virtual_speaker_node_division_gains_fx; Word32 *object_mode_back_virtual_speaker_node_division_gains_fx; Word16 *bottom_virtual_speaker_node_division_gains_fx; Word16 *top_virtual_speaker_node_division_gains_fx; Word16 *back_virtual_speaker_node_division_gains_fx; Word16 *object_mode_bottom_virtual_speaker_node_division_gains_fx; Word16 *object_mode_top_virtual_speaker_node_division_gains_fx; Word16 *object_mode_back_virtual_speaker_node_division_gains_fx; #endif } VBAP_DATA, *VBAP_HANDLE; Loading
lib_rend/ivas_vbap.c +2428 −462 File changed.Preview size limit exceeded, changes collapsed. Show changes