Commit b4babd63 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch 'main' into 'philips/fix-render-config-reader-main'

parents 77607758 4cfbb5ef
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3133,7 +3133,6 @@ static void cldfb_init_proto_and_twiddles_enc(
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17051;
                hs->q_scale = norm_s( (Word16) CLDFB80_40_SCALE );
                hs->scale = cldfb_scale_2_5ms[4];
                hs->p_filter = CLDFB80_40_fx;
#endif
+16 −1
Original line number Diff line number Diff line
@@ -808,6 +808,7 @@ float getTcxBandwidth_flt(
    return tcxBandwidth;
}

#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------*
 * getIgfPresent()
 *
@@ -905,7 +906,7 @@ int16_t getIgfPresent(

    return igfPresent;
}

#else
Word16 getIgfPresent_fx(
    const Word16 element_mode, /* i  : IVAS element mode           */
    const Word32 total_brate,  /* i  : total bitrate               */
@@ -1009,6 +1010,8 @@ Word16 getIgfPresent_fx(

    return igfPresent;
}
#endif

/*-------------------------------------------------------------------*
 * getCnaPresent()
 *
@@ -1402,7 +1405,11 @@ void init_tcx_cfg(
    init_tcx_window_cfg( hTcxCfg, sr_core, input_Fs, L_frame, L_frameTCX, encoderLookahead_enc, encoderLookahead_FB, mdctWindowLength, mdctWindowLengthFB, element_mode );

    /* SQ deadzone & memory quantization*/
#ifndef IVAS_FLOAT_FIXED
    hTcxCfg->sq_rounding_flt = 0.375f; /*deadzone of 1.25->rounding=1-1.25/2 (No deadzone=0.5)*/
#else
    hTcxCfg->sq_rounding = 12288; /*deadzone of 1.25->rounding=1-1.25/2 (No deadzone=0.5)*/
#endif

    /* TCX rate loop */
    hTcxCfg->tcxRateLoopOpt = ( tcxonly ) ? 2 : 0;
@@ -1453,7 +1460,11 @@ void init_tcx_cfg(
    }

    /* Scale TCX for non-active frames to adjust loudness with ACELP*/
#ifndef IVAS_FLOAT_FIXED
    hTcxCfg->na_scale_flt = 1.f;
#else
    hTcxCfg->na_scale = 32767;
#endif

    if ( na_scale_bwidth < SWB && !tcxonly )
    {
@@ -1467,7 +1478,11 @@ void init_tcx_cfg(
                {
                    i--;
                }
#ifndef IVAS_FLOAT_FIXED
                hTcxCfg->na_scale_flt = scaleTcxTable[i].scale_flt;
#else
                hTcxCfg->na_scale = scaleTcxTable[i].scale;
#endif
                break;
            }
        }
+18 −10
Original line number Diff line number Diff line
@@ -137,17 +137,28 @@ void initFdCngCom_flt(
    mhvals_flt( MSSUBFRLEN, &( hFdCngCom->msM_subwin_flt ) );
    set_f( hFdCngCom->msPeriodogSum_flt, 0.0f, 2 );
    set_f( hFdCngCom->msPsdSum_flt, 0.0f, 2 );
#ifndef IVAS_FLOAT_FIXED
    set_f( hFdCngCom->msSlope_flt, 0.0f, 2 );
    set_f( hFdCngCom->msQeqInvAv_flt, 0.0f, 2 );
#else
    set16_fx( hFdCngCom->msSlope, 0, 2 );
    set32_fx( hFdCngCom->msQeqInvAv, 0, 2 );
#endif
    hFdCngCom->init_old_flt = 0;
    hFdCngCom->msFrCnt_init_counter = 0;
    hFdCngCom->msFrCnt_init_thresh = 1;
    hFdCngCom->offsetflag = 0;
    hFdCngCom->msFrCnt = MSSUBFRLEN;
    hFdCngCom->msMinBufferPtr = 0;
#ifndef IVAS_FLOAT_FIXED
    set_f( hFdCngCom->msAlphaCor_flt, 0.3f, 2 );

    hFdCngCom->coherence_flt = 0.5f;
#else
    set32_fx( hFdCngCom->msAlphaCor, 644245120l /*0.3f Q31*/, 2 );

    hFdCngCom->coherence_fx = 16384; /* 0.5 in Q15 */
#endif

    return;
}
@@ -233,6 +244,7 @@ void initPartitions_flt(
}


#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------
 * compress_range_flt()
 *
@@ -639,6 +651,7 @@ void minimum_statistics_flt(

    return;
}
#endif


/*-------------------------------------------------------------------
@@ -675,6 +688,7 @@ void apply_scale_flt(
}


#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------
 * bandcombinepow_flt()
 *
@@ -796,6 +810,7 @@ void scalebands_flt(

    return;
}
#endif


/*-------------------------------------------------------------------
@@ -859,7 +874,6 @@ void AnalysisSTFT_flt(
    return;
}

#endif
/*-------------------------------------------------------------------
 * SynthesisSTFT_flt()
 *
@@ -946,6 +960,7 @@ void SynthesisSTFT_flt(

    return;
}
#endif

#ifdef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------
@@ -1332,6 +1347,7 @@ Word16 rand_gauss_fix(
}
#endif

#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------
 * lpc_from_spectrum_flt()
 *
@@ -1352,9 +1368,6 @@ void lpc_from_spectrum_flt(
    int16_t fftlen = hFdCngCom->fftlen;
    const float *fftSineTab = hFdCngCom->fftSineTab_flt;
    float *A = hFdCngCom->A_cng_flt;
#ifdef IVAS_FLOAT_FIXED
    Word16 *A_fx = hFdCngCom->A_cng;
#endif

    /* Power Spectrum */
    ptr = fftBuffer;
@@ -1408,12 +1421,6 @@ void lpc_from_spectrum_flt(

    /* LPC */
    lev_dur( A, r, M, NULL );
#ifdef IVAS_FLOAT_FIXED
    for ( i = 0; i < M + 1; i++ )
    {
        A_fx[i] = float_to_fix16( A[i], Q13 );
    }
#endif
    return;
}

@@ -1486,3 +1493,4 @@ void FdCng_exc_flt(

    return;
}
#endif
+6 −0
Original line number Diff line number Diff line
@@ -7116,6 +7116,12 @@ void rfft_fx(
            s2 = -204;
            move16();
            BREAK;
        case 240:
            s1 = 136;
            move16();
            s2 = -136;
            move16();
            BREAK;
        case 256:
            s1 = 128;
            move16();
+2 −2
Original line number Diff line number Diff line
@@ -29,9 +29,9 @@ Word32 floatToFixed( float f, Word16 Q )
float fixedToFloat( Word32 i, Word16 Q )
{
    if ( Q < 0 )
        return ( i * (float) ( ( (unsigned) 1 ) << ( -Q ) ) );
        return ( i * (float) ( ( 1LL ) << ( -Q ) ) );
    else
        return (float) ( i ) / (float) ( (unsigned int) 1 << Q );
        return (float) ( i ) / (float) ( 1LL << Q );
}
void floatToFixed_arrL( float *f, Word32 *i, Word16 Q, Word16 l )
{
Loading