Loading apps/decoder.c +2 −1 Original line number Diff line number Diff line Loading @@ -1523,13 +1523,14 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg->outputMdFilename != NULL && arg->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { fprintf( stderr, "Error: Output split rendering metadata file is supported for BINAURAL_SPLIT_PCM output config. only\n\n" ); usage_dec(); return false; } #endif } else { Loading lib_dec/ivas_init_dec.c +1 −2 Original line number Diff line number Diff line Loading @@ -2655,8 +2655,7 @@ void ivas_destroy_dec( { ivas_td_binaural_close( &st_ivas->hBinRendererTd ); } if ( st_ivas->hHrtfTD != NULL ) else if ( st_ivas->hHrtfTD != NULL ) { BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval ); Loading lib_dec/ivas_jbm_dec.c +10 −0 Original line number Diff line number Diff line Loading @@ -1364,6 +1364,15 @@ ivas_error ivas_jbm_dec_render( { ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { if ( ( error = ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { Loading @@ -1373,6 +1382,7 @@ ivas_error ivas_jbm_dec_render( { int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; nchan_remapped = st_ivas->nchan_transport; if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); Loading lib_dec/ivas_omasa_dec.c +17 −0 Original line number Diff line number Diff line Loading @@ -648,8 +648,10 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( { int16_t n; float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; float gain = OMASA_TDREND_MATCHING_GAIN; ivas_error error; float *p_sepobj[MAX_NUM_OBJECTS]; float *tc_local[MAX_TRANSPORT_CHANNELS]; #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t slot_idx_start; Loading @@ -661,6 +663,21 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( p_sepobj[n] = &data_separated_objects[n][0]; } /* Delay the object signals to match the CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) { int16_t tcBufferSize; tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; for ( n = 0; n < st_ivas->nchan_ism; n++ ) { tc_local[n] = st_ivas->hTcBuffer->tc[n + 2]; v_multc( tc_local[n], gain, tc_local[n], tcBufferSize ); delay_signal( tc_local[n], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } ivas_dirac_dec_binaural_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, nchan_transport, output_f ); /* reset combined orientation access index before calling the td renderer */ Loading lib_enc/acelp_core_switch_enc.c +0 −21 Original line number Diff line number Diff line Loading @@ -123,32 +123,11 @@ void acelp_core_switch_enc( } } #ifdef FIX_I4_OL_PITCH if ( st->last_codec_mode == MODE1 ) { /* in MODE1 T_op is at 12.8 kHz */ if ( st->last_L_frame != L_FRAME ) /* ACELP@16k core -> convert T_op to 16 kHz */ { T_op[0] = (short) ( 1.25f * T_op[0] + 0.5f ); T_op[1] = (short) ( 1.25f * T_op[1] + 0.5f ); } } else { /* in MODE2 T_op is at 16 kHz */ if ( st->last_L_frame == L_FRAME ) /* ACELP@12.8k core -> convert T_op to 12.8 kHz */ { T_op[0] = (short) ( 0.8f * T_op[0] + 0.5f ); T_op[1] = (short) ( 0.8f * T_op[1] + 0.5f ); } } #else if ( st->last_L_frame != L_FRAME ) /* ACELP@16k core */ { T_op[0] = (short) ( 1.25f * T_op[0] + 0.5f ); T_op[1] = (short) ( 1.25f * T_op[1] + 0.5f ); } #endif /*----------------------------------------------------------------* * Excitation encoding *----------------------------------------------------------------*/ Loading Loading
apps/decoder.c +2 −1 Original line number Diff line number Diff line Loading @@ -1523,13 +1523,14 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg->outputMdFilename != NULL && arg->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { fprintf( stderr, "Error: Output split rendering metadata file is supported for BINAURAL_SPLIT_PCM output config. only\n\n" ); usage_dec(); return false; } #endif } else { Loading
lib_dec/ivas_init_dec.c +1 −2 Original line number Diff line number Diff line Loading @@ -2655,8 +2655,7 @@ void ivas_destroy_dec( { ivas_td_binaural_close( &st_ivas->hBinRendererTd ); } if ( st_ivas->hHrtfTD != NULL ) else if ( st_ivas->hHrtfTD != NULL ) { BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval ); Loading
lib_dec/ivas_jbm_dec.c +10 −0 Original line number Diff line number Diff line Loading @@ -1364,6 +1364,15 @@ ivas_error ivas_jbm_dec_render( { ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { if ( ( error = ivas_td_binaural_renderer( st_ivas, p_output, *nSamplesRendered ) ) != IVAS_ERR_OK ) { return error; } ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { Loading @@ -1373,6 +1382,7 @@ ivas_error ivas_jbm_dec_render( { int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; nchan_remapped = st_ivas->nchan_transport; if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); Loading
lib_dec/ivas_omasa_dec.c +17 −0 Original line number Diff line number Diff line Loading @@ -648,8 +648,10 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( { int16_t n; float data_separated_objects[MAX_NUM_OBJECTS][L_FRAME48k]; float gain = OMASA_TDREND_MATCHING_GAIN; ivas_error error; float *p_sepobj[MAX_NUM_OBJECTS]; float *tc_local[MAX_TRANSPORT_CHANNELS]; #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t slot_idx_start; Loading @@ -661,6 +663,21 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( p_sepobj[n] = &data_separated_objects[n][0]; } /* Delay the object signals to match the CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */ if ( st_ivas->hSpatParamRendCom->slots_rendered == 0 ) { int16_t tcBufferSize; tcBufferSize = st_ivas->hSpatParamRendCom->num_slots * st_ivas->hSpatParamRendCom->slot_size; for ( n = 0; n < st_ivas->nchan_ism; n++ ) { tc_local[n] = st_ivas->hTcBuffer->tc[n + 2]; v_multc( tc_local[n], gain, tc_local[n], tcBufferSize ); delay_signal( tc_local[n], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size ); } } ivas_dirac_dec_binaural_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailable, nchan_transport, output_f ); /* reset combined orientation access index before calling the td renderer */ Loading
lib_enc/acelp_core_switch_enc.c +0 −21 Original line number Diff line number Diff line Loading @@ -123,32 +123,11 @@ void acelp_core_switch_enc( } } #ifdef FIX_I4_OL_PITCH if ( st->last_codec_mode == MODE1 ) { /* in MODE1 T_op is at 12.8 kHz */ if ( st->last_L_frame != L_FRAME ) /* ACELP@16k core -> convert T_op to 16 kHz */ { T_op[0] = (short) ( 1.25f * T_op[0] + 0.5f ); T_op[1] = (short) ( 1.25f * T_op[1] + 0.5f ); } } else { /* in MODE2 T_op is at 16 kHz */ if ( st->last_L_frame == L_FRAME ) /* ACELP@12.8k core -> convert T_op to 12.8 kHz */ { T_op[0] = (short) ( 0.8f * T_op[0] + 0.5f ); T_op[1] = (short) ( 0.8f * T_op[1] + 0.5f ); } } #else if ( st->last_L_frame != L_FRAME ) /* ACELP@16k core */ { T_op[0] = (short) ( 1.25f * T_op[0] + 0.5f ); T_op[1] = (short) ( 1.25f * T_op[1] + 0.5f ); } #endif /*----------------------------------------------------------------* * Excitation encoding *----------------------------------------------------------------*/ Loading