Loading lib_com/ivas_prot.h +4 −2 Original line number Diff line number Diff line Loading @@ -2906,8 +2906,10 @@ void ivas_mct_core_dec( CPE_DEC_HANDLE hCPE[MCT_MAX_BLOCKS], /* i/o: CPE decoder structure */ const int16_t nCPE, /* i : number of CPEs */ #ifdef FLOAT_INTERFACE_DEC_REND float* signal_out[], /* o : synthesis @internal_FS */ const int16_t output_frame /* i : output frame length per channel */ float* signal_out[] /* o : synthesis @internal_FS */ #ifndef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX ,const int16_t output_frame /* i : output frame length per channel */ #endif #else float signal_out[][L_FRAME48k] /* o : synthesis @internal_FS */ #endif Loading lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,9 @@ #endif #define FLOAT_INTERFACE_DEC_REND #ifdef FLOAT_INTERFACE_DEC_REND #define FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX #endif /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/ivas_mct_core_dec.c +5 −3 Original line number Diff line number Diff line Loading @@ -166,8 +166,10 @@ void ivas_mct_core_dec( CPE_DEC_HANDLE hCPE[MCT_MAX_BLOCKS], /* i/o: CPE decoder structure */ const int16_t nCPE, /* i : number of CPEs */ #ifdef FLOAT_INTERFACE_DEC_REND float* signal_out[], /* o : synthesis @internal_FS */ const int16_t output_frame /* i : output frame length per channel */ float* signal_out[] /* o : synthesis @internal_FS */ #ifndef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX ,const int16_t output_frame /* i : output frame length per channel */ #endif #else float signal_out[][L_FRAME48k] /* o : synthesis @internal_FS */ #endif Loading Loading @@ -222,7 +224,7 @@ void ivas_mct_core_dec( /* Initialization or re-configuration of Stereo TCX */ sts[ch]->enablePlcWaveadjust = 0; x[ch][0] = &signal_out[ch][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX x[ch][1] = &signal_out[ch][0] + output_frame / 2; #else x[ch][1] = &signal_out[ch][0] + L_FRAME48k / 2; Loading lib_dec/ivas_mct_dec.c +24 −5 Original line number Diff line number Diff line Loading @@ -88,6 +88,16 @@ ivas_error ivas_mct_dec( float synth[CPE_CHANNELS][L_FRAME_PLUS]; int32_t ivas_total_brate; ivas_error error; #ifdef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX float *outputAlias[MAX_OUTPUT_CHANNELS]; float tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* TODO(sgi): Optimize RAM usage */ for ( int16_t i = 0; i < MAX_OUTPUT_CHANNELS; ++i ) { outputAlias[i] = output[i]; output[i] = tmp[i]; } #endif error = IVAS_ERR_OK; Loading Loading @@ -155,7 +165,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x[n][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x[n][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; set_zero( x[n][0], output_frame / 2 ); Loading @@ -176,7 +186,7 @@ ivas_error ivas_mct_dec( /* MCT core decoder */ ivas_mct_core_dec( hMCT, st_ivas->hCPE, nCPE, output #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX , output_frame #endif Loading @@ -190,7 +200,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x[n][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x[n][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; #else Loading @@ -215,7 +225,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x_all[n + cpe_id * CPE_CHANNELS][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x_all[n + cpe_id * CPE_CHANNELS][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; #else Loading @@ -235,7 +245,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x[n][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x[n][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; #else Loading Loading @@ -302,6 +312,15 @@ ivas_error ivas_mct_dec( } #endif #ifdef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* Revert overwritten pointers in output buffer, copy audio from tmp buffer to output */ for ( int16_t i = 0; i < MAX_OUTPUT_CHANNELS; ++i ) { output[i] = outputAlias[i]; mvr2r( tmp[i], output[i], output_frame ); } #endif pop_wmops(); return error; } Loading Loading
lib_com/ivas_prot.h +4 −2 Original line number Diff line number Diff line Loading @@ -2906,8 +2906,10 @@ void ivas_mct_core_dec( CPE_DEC_HANDLE hCPE[MCT_MAX_BLOCKS], /* i/o: CPE decoder structure */ const int16_t nCPE, /* i : number of CPEs */ #ifdef FLOAT_INTERFACE_DEC_REND float* signal_out[], /* o : synthesis @internal_FS */ const int16_t output_frame /* i : output frame length per channel */ float* signal_out[] /* o : synthesis @internal_FS */ #ifndef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX ,const int16_t output_frame /* i : output frame length per channel */ #endif #else float signal_out[][L_FRAME48k] /* o : synthesis @internal_FS */ #endif Loading
lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,9 @@ #endif #define FLOAT_INTERFACE_DEC_REND #ifdef FLOAT_INTERFACE_DEC_REND #define FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX #endif /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/ivas_mct_core_dec.c +5 −3 Original line number Diff line number Diff line Loading @@ -166,8 +166,10 @@ void ivas_mct_core_dec( CPE_DEC_HANDLE hCPE[MCT_MAX_BLOCKS], /* i/o: CPE decoder structure */ const int16_t nCPE, /* i : number of CPEs */ #ifdef FLOAT_INTERFACE_DEC_REND float* signal_out[], /* o : synthesis @internal_FS */ const int16_t output_frame /* i : output frame length per channel */ float* signal_out[] /* o : synthesis @internal_FS */ #ifndef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX ,const int16_t output_frame /* i : output frame length per channel */ #endif #else float signal_out[][L_FRAME48k] /* o : synthesis @internal_FS */ #endif Loading Loading @@ -222,7 +224,7 @@ void ivas_mct_core_dec( /* Initialization or re-configuration of Stereo TCX */ sts[ch]->enablePlcWaveadjust = 0; x[ch][0] = &signal_out[ch][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX x[ch][1] = &signal_out[ch][0] + output_frame / 2; #else x[ch][1] = &signal_out[ch][0] + L_FRAME48k / 2; Loading
lib_dec/ivas_mct_dec.c +24 −5 Original line number Diff line number Diff line Loading @@ -88,6 +88,16 @@ ivas_error ivas_mct_dec( float synth[CPE_CHANNELS][L_FRAME_PLUS]; int32_t ivas_total_brate; ivas_error error; #ifdef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX float *outputAlias[MAX_OUTPUT_CHANNELS]; float tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* TODO(sgi): Optimize RAM usage */ for ( int16_t i = 0; i < MAX_OUTPUT_CHANNELS; ++i ) { outputAlias[i] = output[i]; output[i] = tmp[i]; } #endif error = IVAS_ERR_OK; Loading Loading @@ -155,7 +165,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x[n][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x[n][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; set_zero( x[n][0], output_frame / 2 ); Loading @@ -176,7 +186,7 @@ ivas_error ivas_mct_dec( /* MCT core decoder */ ivas_mct_core_dec( hMCT, st_ivas->hCPE, nCPE, output #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX , output_frame #endif Loading @@ -190,7 +200,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x[n][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x[n][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; #else Loading @@ -215,7 +225,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x_all[n + cpe_id * CPE_CHANNELS][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x_all[n + cpe_id * CPE_CHANNELS][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; #else Loading @@ -235,7 +245,7 @@ ivas_error ivas_mct_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { x[n][0] = &output[n + cpe_id * CPE_CHANNELS][0]; #ifdef FLOAT_INTERFACE_DEC_REND #if defined FLOAT_INTERFACE_DEC_REND && !defined FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* TODO(sgi): Consult with MCT expert */ x[n][1] = &output[n + cpe_id * CPE_CHANNELS][output_frame / 2]; #else Loading Loading @@ -302,6 +312,15 @@ ivas_error ivas_mct_dec( } #endif #ifdef FLOAT_INTERFACE_DEC_REND_MCT_TMP_FIX /* Revert overwritten pointers in output buffer, copy audio from tmp buffer to output */ for ( int16_t i = 0; i < MAX_OUTPUT_CHANNELS; ++i ) { output[i] = outputAlias[i]; mvr2r( tmp[i], output[i], output_frame ); } #endif pop_wmops(); return error; } Loading