Loading lib_dec/lib_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -1249,7 +1249,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, max_band, pOutput, 1, !td_input, pcm_out_flag, ro_md_flag ) ) != IVAS_ERR_OK ) { return error; } Loading lib_isar/isar_lc3plus_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -195,8 +195,8 @@ ivas_error ISAR_LC3PLUS_DEC_Open( ISAR_LC3PLUS_DEC_Close( handle ); return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LC3plus decoder\n" ); } #endif #endif ( *handle )->selective_decoding_states[iCh]->has_skipped_a_frame = 0; ( *handle )->selective_decoding_states[iCh]->shall_decode_cached_frame = 0; #ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS Loading lib_isar/isar_lc3plus_enc.c +1 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ ivas_error ISAR_LC3PLUS_ENC_Open( for ( uint32_t iEnc = 0; iEnc < ( *handle )->num_encs; ++iEnc ) { int32_t ftd_index = iEnc + iMediaTime * ( *handle )->num_encs; #ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS ( *handle )->frame_type_descriptors[ftd_index].frame_data_length = 0; /* will be set to the correct value in IVAS_LC3PLUS_ENC_SetBitrate */ #else Loading lib_isar/isar_prot.h +5 −5 Original line number Diff line number Diff line Loading @@ -239,7 +239,6 @@ void isar_split_rend_get_quant_params( #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS const int16_t ro_flag, int16_t *num_quant_strats #else int16_t *num_quant_strats, int16_t *num_complex_bands Loading Loading @@ -358,10 +357,11 @@ int32_t isar_get_lc3plus_bitrate( #endif #ifdef LC3PLUS_LEA_COMPAT_BITRATES_48_6 int32_t isar_get_lc3plus_bitrate( const int32_t SplitRendBitRate, const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode, const int32_t nChannels, const int32_t codecFrameDurationUs ); const int32_t SplitRendBitRate, /* i : ISAR bitrate */ const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode, /* i : ISAR pose correction mode */ const int32_t nChannels, /* i : number of channels */ const int32_t lc3plus_frame_duration_us /* i : ISAR frame length in us */ ); #endif ivas_error isar_split_rend_validate_config( Loading lib_isar/isar_splitRendererPre.c +23 −6 Original line number Diff line number Diff line Loading @@ -495,6 +495,7 @@ static void isar_split_rend_quant_md( { hMd->pred_mat_re[ch1][ch1] = hMd->pred_mat_re2[ch1]; } hMd->pred_mat_re[1][0] = 0.0f; hMd->pred_mat_re[0][1] = 0.0f; Loading Loading @@ -572,12 +573,15 @@ static void isar_split_rend_quant_md( return; } #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS static void get_lr_gains( float cov_in[][BINAURAL_CHANNELS], static void get_lr_gains( float cov_in[][BINAURAL_CHANNELS], float cov_out[][BINAURAL_CHANNELS], float gains[BINAURAL_CHANNELS] ) { int16_t i; for ( i = 0; i < BINAURAL_CHANNELS; i++ ) { gains[i] = cov_in[i][i]; Loading @@ -591,10 +595,12 @@ static void get_lr_gains( float cov_in[][BINAURAL_CHANNELS], gains[i] = sqrtf( gains[i] ); } } return; } #endif static void ComputeCoeffs( float cov_ii_re[][BINAURAL_CHANNELS], float cov_ii_im[][BINAURAL_CHANNELS], Loading @@ -617,6 +623,7 @@ static void ComputeCoeffs( if ( pose_type == PITCH_ONLY ) { float gd_tmp[BINAURAL_CHANNELS]; #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS get_lr_gains( cov_ii_re, cov_oo_re, gd_tmp ); #else Loading @@ -634,6 +641,7 @@ static void ComputeCoeffs( } } #endif hMd->gd = gd_tmp[0]; hMd->gd2 = gd_tmp[1]; } Loading @@ -642,8 +650,10 @@ static void ComputeCoeffs( if ( real_only ) { float gd_tmp[BINAURAL_CHANNELS]; #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS get_lr_gains( cov_ii_re, cov_oo_re, gd_tmp ); for ( i = 0; i < BINAURAL_CHANNELS; i++ ) { hMd->pred_mat_re[i][i] = gd_tmp[i]; Loading @@ -667,6 +677,7 @@ static void ComputeCoeffs( set_zero( hMd->pred_mat_im[i], BINAURAL_CHANNELS ); } #endif hMd->pred_mat_re[1][0] = 0.0f; hMd->pred_mat_re[0][1] = 0.0f; } Loading @@ -675,6 +686,7 @@ static void ComputeCoeffs( #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS get_lr_gains( cov_ii_re, cov_oo_re, hMd->pred_mat_re2 ); #endif cov_norm_fact = GetNormFact( cov_ii_re, cov_ii_im, cov_io_re, cov_io_im, cov_oo_re ); /* normalize the covariance */ Loading Loading @@ -903,7 +915,6 @@ static void isar_SplitRenderer_code_md_base2( } } #else for ( b = 0; b < pred_imag_bands_yaw; b++ ) { hMd = &hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b]; Loading Loading @@ -936,6 +947,7 @@ static void isar_SplitRenderer_code_md_base2( } } #endif for ( b = 0; b < d_bands_yaw; b++ ) { hMd = &hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b]; Loading Loading @@ -1270,9 +1282,10 @@ static void isar_SplitRenderer_quant_code( const ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits handle */ const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS const int16_t ro_md_flag, const int16_t ro_md_flag, /* i : real only metadata for yaw flag */ #endif const int32_t target_md_bits ) const int32_t target_md_bits /* i : ISAR MD bitrate */ ) { #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS int16_t q, num_subframes, sf_idx, pos_idx, b, num_quant_strats; Loading Loading @@ -1305,12 +1318,14 @@ static void isar_SplitRenderer_quant_code( ISAR_SPLIT_REND_BITStream_write_int32( pBits, pMultiBinPoseData->dof, ISAR_SPLIT_REND_DOF_BITS ); ISAR_SPLIT_REND_BITStream_write_int32( pBits, pMultiBinPoseData->hq_mode, ISAR_SPLIT_REND_HQ_MODE_BITS ); #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS rot_axis_code = isar_renderSplitGetCodeFromRot_axis( pMultiBinPoseData->dof, pMultiBinPoseData->rot_axis, &num_bits ); if ( num_bits > 0 ) { ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) rot_axis_code, num_bits ); } ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) ro_md_flag, ISAR_SPLIT_REND_RO_FLAG_BITS ); #else ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) pMultiBinPoseData->rot_axis, ISAR_SPLIT_REND_ROT_AXIS_BITS ); Loading Loading @@ -1346,6 +1361,7 @@ static void isar_SplitRenderer_quant_code( pred_quant_pnts_yaw, pred_quantstep_yaw, pred_1byquantstep_yaw, d_bands_yaw, bands_pitch, pred_real_bands_roll, pred_imag_bands_roll, &num_quant_strats, &num_complex_bands ); #endif quant_strat_bits = (int32_t) ceilf( log2f( num_quant_strats ) ); overhead_bits = pBits->bits_written - overhead_bits + quant_strat_bits + 1; /* 1 for base2 vs huff */ Loading Loading @@ -2246,6 +2262,7 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( #else available_bits = ( SplitRendBitRate / FRAMES_PER_SEC ) - pBits->bits_written; #endif if ( ( error = splitRendLc3plusEncodeAndWrite( hSplitBin, pBits, available_bits, in ) ) != IVAS_ERR_OK ) #else if ( ( error = splitRendLc3plusEncodeAndWrite( hSplitBin, pBits, SplitRendBitRate, in ) ) != IVAS_ERR_OK ) Loading Loading
lib_dec/lib_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -1249,7 +1249,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, max_band, pOutput, 1, !td_input, pcm_out_flag, ro_md_flag ) ) != IVAS_ERR_OK ) { return error; } Loading
lib_isar/isar_lc3plus_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -195,8 +195,8 @@ ivas_error ISAR_LC3PLUS_DEC_Open( ISAR_LC3PLUS_DEC_Close( handle ); return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LC3plus decoder\n" ); } #endif #endif ( *handle )->selective_decoding_states[iCh]->has_skipped_a_frame = 0; ( *handle )->selective_decoding_states[iCh]->shall_decode_cached_frame = 0; #ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS Loading
lib_isar/isar_lc3plus_enc.c +1 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ ivas_error ISAR_LC3PLUS_ENC_Open( for ( uint32_t iEnc = 0; iEnc < ( *handle )->num_encs; ++iEnc ) { int32_t ftd_index = iEnc + iMediaTime * ( *handle )->num_encs; #ifdef ISAR_BITSTREAM_UPDATE_LC3PLUS ( *handle )->frame_type_descriptors[ftd_index].frame_data_length = 0; /* will be set to the correct value in IVAS_LC3PLUS_ENC_SetBitrate */ #else Loading
lib_isar/isar_prot.h +5 −5 Original line number Diff line number Diff line Loading @@ -239,7 +239,6 @@ void isar_split_rend_get_quant_params( #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS const int16_t ro_flag, int16_t *num_quant_strats #else int16_t *num_quant_strats, int16_t *num_complex_bands Loading Loading @@ -358,10 +357,11 @@ int32_t isar_get_lc3plus_bitrate( #endif #ifdef LC3PLUS_LEA_COMPAT_BITRATES_48_6 int32_t isar_get_lc3plus_bitrate( const int32_t SplitRendBitRate, const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode, const int32_t nChannels, const int32_t codecFrameDurationUs ); const int32_t SplitRendBitRate, /* i : ISAR bitrate */ const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode, /* i : ISAR pose correction mode */ const int32_t nChannels, /* i : number of channels */ const int32_t lc3plus_frame_duration_us /* i : ISAR frame length in us */ ); #endif ivas_error isar_split_rend_validate_config( Loading
lib_isar/isar_splitRendererPre.c +23 −6 Original line number Diff line number Diff line Loading @@ -495,6 +495,7 @@ static void isar_split_rend_quant_md( { hMd->pred_mat_re[ch1][ch1] = hMd->pred_mat_re2[ch1]; } hMd->pred_mat_re[1][0] = 0.0f; hMd->pred_mat_re[0][1] = 0.0f; Loading Loading @@ -572,12 +573,15 @@ static void isar_split_rend_quant_md( return; } #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS static void get_lr_gains( float cov_in[][BINAURAL_CHANNELS], static void get_lr_gains( float cov_in[][BINAURAL_CHANNELS], float cov_out[][BINAURAL_CHANNELS], float gains[BINAURAL_CHANNELS] ) { int16_t i; for ( i = 0; i < BINAURAL_CHANNELS; i++ ) { gains[i] = cov_in[i][i]; Loading @@ -591,10 +595,12 @@ static void get_lr_gains( float cov_in[][BINAURAL_CHANNELS], gains[i] = sqrtf( gains[i] ); } } return; } #endif static void ComputeCoeffs( float cov_ii_re[][BINAURAL_CHANNELS], float cov_ii_im[][BINAURAL_CHANNELS], Loading @@ -617,6 +623,7 @@ static void ComputeCoeffs( if ( pose_type == PITCH_ONLY ) { float gd_tmp[BINAURAL_CHANNELS]; #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS get_lr_gains( cov_ii_re, cov_oo_re, gd_tmp ); #else Loading @@ -634,6 +641,7 @@ static void ComputeCoeffs( } } #endif hMd->gd = gd_tmp[0]; hMd->gd2 = gd_tmp[1]; } Loading @@ -642,8 +650,10 @@ static void ComputeCoeffs( if ( real_only ) { float gd_tmp[BINAURAL_CHANNELS]; #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS get_lr_gains( cov_ii_re, cov_oo_re, gd_tmp ); for ( i = 0; i < BINAURAL_CHANNELS; i++ ) { hMd->pred_mat_re[i][i] = gd_tmp[i]; Loading @@ -667,6 +677,7 @@ static void ComputeCoeffs( set_zero( hMd->pred_mat_im[i], BINAURAL_CHANNELS ); } #endif hMd->pred_mat_re[1][0] = 0.0f; hMd->pred_mat_re[0][1] = 0.0f; } Loading @@ -675,6 +686,7 @@ static void ComputeCoeffs( #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS get_lr_gains( cov_ii_re, cov_oo_re, hMd->pred_mat_re2 ); #endif cov_norm_fact = GetNormFact( cov_ii_re, cov_ii_im, cov_io_re, cov_io_im, cov_oo_re ); /* normalize the covariance */ Loading Loading @@ -903,7 +915,6 @@ static void isar_SplitRenderer_code_md_base2( } } #else for ( b = 0; b < pred_imag_bands_yaw; b++ ) { hMd = &hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b]; Loading Loading @@ -936,6 +947,7 @@ static void isar_SplitRenderer_code_md_base2( } } #endif for ( b = 0; b < d_bands_yaw; b++ ) { hMd = &hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b]; Loading Loading @@ -1270,9 +1282,10 @@ static void isar_SplitRenderer_quant_code( const ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits handle */ const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS const int16_t ro_md_flag, const int16_t ro_md_flag, /* i : real only metadata for yaw flag */ #endif const int32_t target_md_bits ) const int32_t target_md_bits /* i : ISAR MD bitrate */ ) { #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS int16_t q, num_subframes, sf_idx, pos_idx, b, num_quant_strats; Loading Loading @@ -1305,12 +1318,14 @@ static void isar_SplitRenderer_quant_code( ISAR_SPLIT_REND_BITStream_write_int32( pBits, pMultiBinPoseData->dof, ISAR_SPLIT_REND_DOF_BITS ); ISAR_SPLIT_REND_BITStream_write_int32( pBits, pMultiBinPoseData->hq_mode, ISAR_SPLIT_REND_HQ_MODE_BITS ); #ifdef SPLIT_REND_POSE_CORRECTION_UNUSED_BITS rot_axis_code = isar_renderSplitGetCodeFromRot_axis( pMultiBinPoseData->dof, pMultiBinPoseData->rot_axis, &num_bits ); if ( num_bits > 0 ) { ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) rot_axis_code, num_bits ); } ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) ro_md_flag, ISAR_SPLIT_REND_RO_FLAG_BITS ); #else ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) pMultiBinPoseData->rot_axis, ISAR_SPLIT_REND_ROT_AXIS_BITS ); Loading Loading @@ -1346,6 +1361,7 @@ static void isar_SplitRenderer_quant_code( pred_quant_pnts_yaw, pred_quantstep_yaw, pred_1byquantstep_yaw, d_bands_yaw, bands_pitch, pred_real_bands_roll, pred_imag_bands_roll, &num_quant_strats, &num_complex_bands ); #endif quant_strat_bits = (int32_t) ceilf( log2f( num_quant_strats ) ); overhead_bits = pBits->bits_written - overhead_bits + quant_strat_bits + 1; /* 1 for base2 vs huff */ Loading Loading @@ -2246,6 +2262,7 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( #else available_bits = ( SplitRendBitRate / FRAMES_PER_SEC ) - pBits->bits_written; #endif if ( ( error = splitRendLc3plusEncodeAndWrite( hSplitBin, pBits, available_bits, in ) ) != IVAS_ERR_OK ) #else if ( ( error = splitRendLc3plusEncodeAndWrite( hSplitBin, pBits, SplitRendBitRate, in ) ) != IVAS_ERR_OK ) Loading