Commit c3655dc6 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/main' into...

Merge remote-tracking branch 'origin/main' into basop-2442-masa-2tc-rendering-to-mono-large-diff-signal-12-khz
parents 2cea4508 07e5f4e6
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -196,9 +196,11 @@ add_library(lib_util ${libUtilSrcs} ${libUtilHeaders})
target_include_directories(lib_util PUBLIC lib_util PRIVATE lib_basop lib_com lib_enc lib_dec lib_rend lib_debug)
target_include_directories(lib_util PRIVATE lib_lc3plus lib_isar)

if(NOT WMOPS)
if(NOT WMOPS AND EXISTS "${CMAKE_SOURCE_DIR}/scripts/split_rendering/lc3plus_basop/ivas_lc3plus_unit_test.c")
  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_com lib_basop lib_debug lib_isar)
else()
  message(WARNING "ivas_lc3plus_unit_test is not built - scripts folder probably missing")
endif()

file(GLOB libISARSrcs "lib_isar/*.c")
+1 −1
Original line number Diff line number Diff line
@@ -3195,7 +3195,7 @@ static ivas_error decodeVoIP(
#ifdef SUPPORT_JBM_TRACEFILE
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, &bitstreamReadDone, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
                if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, &parametersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
+4 −0
Original line number Diff line number Diff line
@@ -40,7 +40,9 @@
/* clang-format off */
  /* ################### Start compiler switches ######################## */

#ifndef NO_SUPPORT_JBM_TRACEFILE
#define SUPPORT_JBM_TRACEFILE                   /* support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */
#endif

/* #################### End compiler switches ######################### */

@@ -106,6 +108,8 @@
#define FIX_BASOP_2592_OVERFLOW                         /* FhG: BASOP #2592: fix overflow in GetF0() */
#define FIX_BASOP_2591_EDGE_DETECT_COMP                 /* FhG: BASOP #2591: Wrong comparison in edge_detect_fx() */
#define FIX_NONBE_2580_USE_LENGTH_NOT_CONSTANT          /* Dolby: fix 2580: use dynamic length denominator for average energy in unclr_calc_corr_features_fx() */
#define FIX_BASOP_2599_TCA_OVERFLOW                     /* VA: issue 2599, Fix TCA overflow */
#define FIX_2588_MISSING_CONDITIONS                     /* VA: Proposed fix to 2588, addition of a condition in lsf_dec */
#define FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI         /* Nokia: BASOP issue 2442: Increase accuracy of computations and add additional gain clamp for low energy decorrelated signal rendering. */

/* ##################### End NON-BE switches ########################### */
+5 −0
Original line number Diff line number Diff line
@@ -409,7 +409,12 @@ void lsf_end_dec_fx(

    test();
    test();
#ifndef FIX_2588_MISSING_CONDITIONS
    IF( ( EQ_16( coder_type_org, GENERIC ) ) && ( EQ_32( st->sr_core, INT_FS_16k ) ) && ( mode2_flag == 0 ) )
#else
    test();
    IF( ( EQ_16( coder_type_org, GENERIC ) ) && ( EQ_32( st->sr_core, INT_FS_16k ) ) && ( mode2_flag == 0 ) && st->idchan == 0 )
#endif
    {
        /* this bit is used only for primary channel or mono */
        coder_type = (Word16) get_next_indice_fx( st, 1 ); /* Q0 */
+4 −0
Original line number Diff line number Diff line
@@ -1330,7 +1330,11 @@ static void estDownmixGain_fx(
            exp = 0;
            move16();
        }
#ifdef FIX_BASOP_2599_TCA_OVERFLOW
        unclr_instTargetGain = BASOP_Util_Log10( L_add_sat( unclr_instTargetGain, L_shr( MAX_32, sub( Q31, exp ) ) ), exp );
#else
        unclr_instTargetGain = BASOP_Util_Log10( L_add( unclr_instTargetGain, L_shr( MAX_32, sub( Q31, exp ) ) ), exp );
#endif
        // unclr_fv_fx is expected in Q15 - log result will be in Q25 - hence rightshift by 10.
        hStereoClassif->unclr_fv_fx[E_ica_instTargetGain] = L_shr( unclr_instTargetGain, Q10 ); /* Q15 */
        move32();