Commit 35e60c09 authored by kinuthia's avatar kinuthia
Browse files

Merge branch 'main' into add-saturation-smoke-test

parents ea640739 dbc49984
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -264,6 +264,7 @@
    <ClCompile Include="..\lib_com\ivas_stereo_eclvq_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_eclvq_com_fx.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_ica_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_ica_com_fx.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_mdct_bands_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_mdct_stereo_com.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_psychlpc_com.c" />
+2 −0
Original line number Diff line number Diff line
@@ -521,6 +521,8 @@
    <ClCompile Include="..\lib_com\window_ola.c" />
    <ClCompile Include="..\lib_com\wtda.c" />
    <ClCompile Include="..\lib_com\gs_bitallocation_ivas_fx.c" />
    <ClCompile Include="..\lib_com\count.c" />
    <ClCompile Include="..\lib_com\ivas_stereo_ica_com_fx.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop_proto_func.h">
+5 −1
Original line number Diff line number Diff line
@@ -1312,12 +1312,16 @@ int main(
                exit( -1 );
            }
            IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.multiChannelBuses[i].inputChannelIndex, numChannels );

#ifdef IVAS_FLOAT_FIXED
            if ( ( error = IVAS_REND_FeedInputAudio_fx( hIvasRend, mcIds[i], tmpBuffer ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, mcIds[i], tmpBuffer ) ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }

        }

        for ( i = 0; i < args.inConfig.numAudioObjects; ++i )
+12 −7
Original line number Diff line number Diff line
@@ -157,6 +157,9 @@
#define MAX16B_FLT                      32767.0f
#define MIN16B_FLT                      ( -32768.0f )
#define PCM16_TO_FLT_FAC                32768.0f
#ifdef IVAS_FLOAT_FIXED
#define PCM16_TO_FLT_FAC_FX                32768
#endif // IVAS_FLOAT_FIXED
#define MDFT_NORM_SCALING               ( 1.0f / PCM16_TO_FLT_FAC )
#define MAX_FRAME_COUNTER               200
#define MAX_BITS_PER_FRAME              10240           /* Bits per frame for max. bitrate 512kbps, == IVAS_MAX_BITS_PER_FRAME */
@@ -165,7 +168,7 @@
#define DEC                             1               /* Index for "decoder" */

#define DEC_IVAS                        2               /* Index for IVAS decoder */

#define OUTPUT_Q 11

enum{
    NB  = 0,                                            /* Indicator of 4 kHz bandwidth */
@@ -211,9 +214,6 @@ enum{
#define INV_LOG_2                       1.442695040888963f /* 1/log(2)  */
#define INV_SQRT_2                      0.70710676908493f  /* 1/sqrt(2) */
#define INV_SQRT_2_Q15                  23170  /* 1/sqrt(2) in Q15 */
#ifdef IVAS_FLOAT_FIXED
#define INV_SQRT_2_FX                   (Word16)(0x5A82)  /* 1/sqrt(2) */
#endif

#define MAX_V_MULT_MAT                  100             /* maximum array length for the function v_mult_mat() */

@@ -1684,6 +1684,7 @@ enum
#define OUTMAX_SQ_INV                       0.00000000093132257461547852f /* 1/2^30 */

#define DELTA                               ( 1e-20f )
#define DELTA_FX                              ( 1 )
#define DELTA_MANTISSA_W16                    0x5e73
#define DELTA_MANTISSA_W32                    0x5e728433
#define DELTA_EXPONENT                        (-66)
@@ -1981,10 +1982,10 @@ typedef enum _DCTTYPE
#define INV_PREECHO_SMOOTH_LENP1            ( 1 / ( PREECHO_SMOOTH_LEN + 1.0 ) );

#define EPSILON                             0.000000000000001f
#define EPSILON_FX                          0
#ifdef IVAS_FLOAT_FIXED
#define EPSILON_FX_SMALL                         1
#define  EPSILON_FIX (1)
#endif
#define  EPSILON_FX (Word32)1


#define MAX_SEGMENT_LENGTH                  480
#define NUM_TIME_SWITCHING_BLOCKS           4
@@ -2642,6 +2643,8 @@ enum
#define LG10_G_CODE_MIN_TC_Q14    LG10_G_CODE_MIN_Q14    /* log10(0.02) Q15*/
#define LG10_G_CODE_MAX_TC_Q13    LG10_G_CODE_MAX_Q13

#define LN_2_Q31                   (1488521848 )

/* AVQ (RE8) related consatnts */
#define QR                                    32768
#define Q_AVQ_OUT 6                         /* AVQ_output scaling currently Q9, but may change */
@@ -2680,6 +2683,8 @@ enum

#define LG10                                  24660       /*  10*log10(2)  in Q13                 */
#define LG10_s3_0                             16440       /* 10*log10(2)/1.55 = 1.00343331 in Q14              */
#define LOG2_10                               27213      /* log base 2 of 10 in Q12 */
#define LOG10_2                               646456993      /* log base 10 of 2 in Q31 */

#define MU_MA_FX                              10923     /* original prediction factor for the AMR WB tables (Q15) */

+1 −5
Original line number Diff line number Diff line
@@ -1334,8 +1334,6 @@ void init_tcx_window_cfg_fx(
    const Word32 input_Fs,             /* i  : input/output SR          */
    const Word16 L_frame,              /* i  : L_frame at sr_core       */
    const Word16 L_frameTCX,           /* i  : L_frame at i/o SR        */
    const Word16 encoderLookahead_enc, /* i  : encoder LA at sr_core    */
    const Word16 encoderLookahead_FB,  /* i  : encoder LA at i/o SR     */
    const Word16 mdctWindowLength,     /* i  : window length at sr_core */
    const Word16 mdctWindowLengthFB,   /* i  : window length at i/o SR  */
    const Word16 element_mode          /* i  : mode of CPE/SCE          */
@@ -1433,8 +1431,6 @@ void init_tcx_cfg_fx(
    const Word16 bwidth,
    const Word16 L_frameTCX,
    const Word16 fscale,
    const Word16 encoderLookahead_enc,
    const Word16 encoderLookahead_FB,
    const Word16 preemph_fac,
    const Word16 tcxonly,
    const Word16 rf_mode,
@@ -1460,7 +1456,7 @@ void init_tcx_cfg_fx(
    move16();
    mdctWindowLength = getMdctWindowLength_fx( fscale );
    mdctWindowLengthFB = getMdctWindowLength_fx(fscaleFB);
    init_tcx_window_cfg_fx( hTcxCfg, sr_core, input_Fs, L_frame, L_frameTCX, encoderLookahead_enc, encoderLookahead_FB, mdctWindowLength, mdctWindowLengthFB, element_mode );
    init_tcx_window_cfg_fx( hTcxCfg, sr_core, input_Fs, L_frame, L_frameTCX, mdctWindowLength, mdctWindowLengthFB, element_mode );
    /* SQ deadzone & memory quantization*/
    hTcxCfg->sq_rounding = 12288 /*0.375f Q15*/; /*deadzone of 1.25->rounding=1-1.25/2 (No deadzone=0.5)*/
    move16();
Loading