Commit b65e42d9 authored by Tommy's avatar Tommy
Browse files

merge main

parents fd9ad906 cede165d
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ target_include_directories(lib_util PRIVATE lib_lc3plus lib_isar)

if(NOT WMOPS)
  add_executable(ivas_lc3plus_unit_test ${CMAKE_SOURCE_DIR}/scripts/split_rendering/lc3plus_basop/ivas_lc3plus_unit_test.c)
  target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_basop lib_com lib_debug lib_isar)
  target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_basop lib_debug lib_isar)
endif()

file(GLOB libISARSrcs "lib_isar/*.c")
+11 −11
Original line number Diff line number Diff line
@@ -109,19 +109,20 @@
    <ClCompile Include="..\lib_lc3plus\basop_mpy_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\basop_util_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\constants.c" />
    <ClCompile Include="..\lib_lc3plus\com_entropy.c" />
    <ClCompile Include="..\lib_lc3plus\cutoff_bandwidth.c" />
    <ClCompile Include="..\lib_lc3plus\dct2_fx.c" />
    <ClCompile Include="..\lib_lc3plus\dct4_fx.c" />
    <ClCompile Include="..\lib_lc3plus\dec_entropy.c" />
    <ClCompile Include="..\lib_lc3plus\dec_lc3.c" />
    <ClCompile Include="..\lib_lc3plus\dec_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\detect_cutoff_warped_fx.c" />
    <ClCompile Include="..\lib_lc3plus\dynmem.c" />
    <ClCompile Include="..\lib_lc3plus\enc_entropy.c" />
    <ClCompile Include="..\lib_lc3plus\enc_lc3.c" />
    <ClCompile Include="..\lib_lc3plus\enc_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\estimate_global_gain_fx.c" />
    <ClCompile Include="..\lib_lc3plus\fft_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\imdct_fx.c" />
    <ClCompile Include="..\lib_lc3plus\lc3.c" />
    <ClCompile Include="..\lib_lc3plus\lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\levinson_fx.c" />
    <ClCompile Include="..\lib_lc3plus\ltpf_coder_fx.c" />
    <ClCompile Include="..\lib_lc3plus\ltpf_decoder_fx.c" />
@@ -166,8 +167,9 @@
    <ClCompile Include="..\lib_lc3plus\residual_decoding_fx.c" />
    <ClCompile Include="..\lib_lc3plus\rom_basop_util_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\scale_signal24_fx.c" />
    <ClCompile Include="..\lib_lc3plus\setup_dec_lc3.c" />
    <ClCompile Include="..\lib_lc3plus\setup_enc_lc3.c" />
    <ClCompile Include="..\lib_lc3plus\setup_com_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\setup_dec_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\setup_enc_lc3plus.c" />
    <ClCompile Include="..\lib_lc3plus\sns_compute_scf_fx.c" />
    <ClCompile Include="..\lib_lc3plus\sns_interpolate_scf_fx.c" />
    <ClCompile Include="..\lib_lc3plus\sns_quantize_scf_fx.c" />
@@ -181,13 +183,11 @@
    <ClInclude Include="..\lib_lc3plus\defines.h" />
    <ClInclude Include="..\lib_lc3plus\dynmem.h" />
    <ClInclude Include="..\lib_lc3plus\functions.h" />
    <ClInclude Include="..\lib_lc3plus\lc3.h" />
    <ClInclude Include="..\lib_lc3plus\lc3plus.h" />
    <ClInclude Include="..\lib_lc3plus\license.h" />
    <ClInclude Include="..\lib_lc3plus\rom_basop_util_lc3plus.h" />
    <ClInclude Include="..\lib_lc3plus\setup_dec_lc3.h" />
    <ClInclude Include="..\lib_lc3plus\setup_enc_lc3.h" />
    <ClInclude Include="..\lib_lc3plus\tinywavein_c.h" />
    <ClInclude Include="..\lib_lc3plus\tinywaveout_c.h" />
    <ClInclude Include="..\lib_lc3plus\setup_dec_lc3plus.h" />
    <ClInclude Include="..\lib_lc3plus\setup_enc_lc3plus.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
+3 −0
Original line number Diff line number Diff line
@@ -86,6 +86,8 @@
#define FIX_2166_ASSERT_OSBA_PLC_STEREO_OUT                  /* FhG: fix for issue 2166 - add missing averaging factor 0.5 in for the sum of energies in function stereo_dft_dmx_swb_nrg_fx()*/

#define FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE                /* FhG: Use dynamic Q factor for synth_fx and synthFB_fx to prevent overflow */
#define FIX_2082_FP_LEFTOVERS_OMASA_DEC                      /* Nokia: fix for issue 2082, cleaning remaining floating point code */

#define FIX_2015_PREMPH_SAT_ALT                              /* VA: saturation can happen during preemphasis filtering due to a too aggressive scaling factor, allows preemphis to get 1 more bit headroom */
/* ################### End FIXES switches ########################### */

@@ -121,6 +123,7 @@
#define NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Nokia: issue 1339: Apply scaling to the object-part of OMASA for binaural rendering in IVAS_rend. */
#define NONBE_1362_FIX_OMASA_TO_MASA1_RENDERING         /* Nokia: Fix OMASA to MASA1 rendering in IVAS_rend */
#define FIX_1383_HEAD_TRACK_SANITIZER                   /* Nok: issue 1383: Fix head tracking struc values reading in renderer */
#define FIX_1411_IGF_CRASH_BW_SWITCHING                 /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/

// object-editing feature porting
#define TMP_FIX_SPLIT_REND                              // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions)
+7 −1
Original line number Diff line number Diff line
@@ -46,12 +46,18 @@
 * Local constants
 *------------------------------------------------------------------------*/


#ifdef FIX_2082_FP_LEFTOVERS_OMASA_DEC
#define MULT_17_DIV_20_Q15              27853      /* (Word16) ( ( 17.0/20.0 ) * 2^15 + 0.5 ) */
#define MULT_1_DIV_CLDFB_NO_COL_MAX_Q15 2048       /* (Word16) ( ( 1.0 / CLDFB_NO_COL_MAX ) * 2^15 + 0.5 ) */
#define ONEMINUX_EXT_RENDER_IIR_FAC_Q31 107374182  /* (Word32) ( ( 1.0 - 0.95 ) * 2^31 + 0.5f );  0.95 is EXT_RENDER_IIR_FAC  */
#define EXT_RENDER_IIR_FAC_Q31          2040109465 /* (Word32) ( 0.95 * 2^31 + 0.5 ) */
#else
#define EXT_RENDER_IIR_FAC              0.95f
#define MULT_17_DIV_20_Q15              ( Word16 )( ( 17.0 / 20.0f ) * pow( 2, 15 ) + 0.5f )
#define MULT_1_DIV_CLDFB_NO_COL_MAX_Q15 ( Word16 )( ( 1.0 / CLDFB_NO_COL_MAX ) * pow( 2, 15 ) + 0.5f )
#define ONEMINUX_EXT_RENDER_IIR_FAC_Q31 ( Word32 )( ( 1.0f - EXT_RENDER_IIR_FAC ) * pow( 2, 31 ) + 0.5f )
#define EXT_RENDER_IIR_FAC_Q31          ( Word32 )( EXT_RENDER_IIR_FAC * pow( 2, 31 ) + 0.5f )
#endif

// Calculated as (Word16)(((1.0f / (50 * MAX_PARAM_SPATIAL_SUBFRAMES)) * pow(2, 15)) + 0.5f)
#define OMASA_DELAYFRAMES_PER_SEC_Q15 (Word16) 164 // Q15
+57 −38
Original line number Diff line number Diff line
@@ -988,6 +988,12 @@ ivas_error ivas_cpe_enc_fx(
     * Core codec configuration
     *----------------------------------------------------------------*/

#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
    test();
    test();
    IF( NE_32( sts[0]->core_brate, SID_2k40 ) && NE_32( sts[0]->core_brate, FRAME_NO_DATA ) ) /* Reconfigurations not needed with DTX*/
    {
#endif
        test();
        IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) && st_ivas->hMCT == NULL )
        {
@@ -1006,6 +1012,7 @@ ivas_error ivas_cpe_enc_fx(
                test();
                test();
                hCPE->hStereoMdct->isSBAStereoMode = ( ( EQ_16( ivas_format, SBA_FORMAT ) || EQ_16( ivas_format, SBA_ISM_FORMAT ) ) && ( EQ_16( st_ivas->nchan_transport, 2 ) ) ); /* Q0 */
                move16();

                test();
                IF( LE_32( hCPE->element_brate, MAX_MDCT_ITD_BRATE ) && EQ_16( ivas_format, STEREO_FORMAT ) )
@@ -1027,18 +1034,27 @@ ivas_error ivas_cpe_enc_fx(
            test();
            test();
            test();
#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
            test();
            test();
            IF( ( NE_32( hCPE->last_element_brate, hCPE->element_brate ) || NE_16( hCPE->element_mode, hCPE->last_element_mode ) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( sts[0]->bits_frame_nominal, last_bits_frame_nominal ) ) || NE_16( sts[n]->last_bwidth, sts[n]->bwidth ) || EQ_32( sts[n]->last_core_brate, SID_2k40 ) || EQ_32( sts[n]->last_core_brate, FRAME_NO_DATA ) ) && ( EQ_16( n, 0 ) || EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) ) )
#else
        IF( ( NE_32( hCPE->last_element_brate, hCPE->element_brate ) || NE_16( hCPE->element_mode, hCPE->last_element_mode ) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( sts[0]->bits_frame_nominal, last_bits_frame_nominal ) ) || NE_16( sts[n]->last_bwidth, sts[n]->bwidth ) ) && ( n == 0 || EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) ) )
#endif
            {
                Word16 igf;
                Word16 bw;

                /* float uses ternary operator for this: bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : sts[n]->max_bwidth; */
                bw = max_bwidth;
                move16();
                IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) )
                {
                    bw = sts[n]->bwidth;
                    move16();
                }
                igf = getIgfPresent_fx( sts[n]->element_mode, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->rf_mode ); /* Q0 */
                move16();
#ifdef FIX_1413_IGF_INIT_PRINTOUT
                IF( ( error = IGF_Reconfig_fx( &sts[n]->hIGFEnc, igf, 0, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
#else
@@ -1050,6 +1066,9 @@ ivas_error ivas_cpe_enc_fx(
                }
            }
        }
#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
    }
#endif

    /* set ACELP@12k8 / ACELP@16k flag for flexible ACELP core */
    FOR( n = 0; n < n_CoreChannels; n++ )
Loading