Commit c3b61cca authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'enc_float_cleanup_Q_info_addition_lib_com' into 'main'

Encoder code float struct elements clean up and addition of Q-info for lib_com

See merge request !765
parents b362ebcb b7312111
Loading
Loading
Loading
Loading
Loading
+378 −21
Original line number Diff line number Diff line
@@ -59,7 +59,11 @@

static void cldfb_init_proto_and_twiddles( HANDLE_CLDFB_FILTER_BANK hs );

#ifdef IVAS_FLOAT_FIXED
static void cldfb_init_proto_and_twiddles_enc_fx( HANDLE_CLDFB_FILTER_BANK hs );
#else
static void cldfb_init_proto_and_twiddles_enc( HANDLE_CLDFB_FILTER_BANK hs );
#endif

#ifndef IVAS_FLOAT_FIXED
static float GetEnergyCldfb_ivas( float *energyValuesSum, float *energyLookahead, float **realValues, float **imagValues, const int16_t numberBands, int16_t numberCols, TEC_ENC_HANDLE hTecEnc );
@@ -1648,9 +1652,11 @@ void configureCldfb_ivas(

    return;
}
void configureCldfb_ivas_enc(

#ifdef IVAS_FLOAT_FIXED
void configureCldfb_ivas_enc_fx(
    HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i/o: filter bank handle        */
    const int32_t sampling_rate       /* i  : sampling rate             */
    const Word32 sampling_rate        /* i  : sampling rate             */
)
{

@@ -1658,18 +1664,34 @@ void configureCldfb_ivas_enc(
    h_cldfb->bandsToZero = 0;
    h_cldfb->nab = 0;

    h_cldfb->no_channels = (int16_t) ( sampling_rate * INV_CLDFB_BANDWIDTH + 0.5f );
    h_cldfb->p_filter_length = 10 * h_cldfb->no_channels;
#ifdef IVAS_FLOAT_FIXED
    h_cldfb->no_channels = extract_l( Mpy_32_32_r( sampling_rate, INV_CLDFB_BANDWIDTH_Q31 ) );
    h_cldfb->p_filter_length = i_mult( 10, h_cldfb->no_channels );
    h_cldfb->zeros = 0;
    h_cldfb->anaScalefactor = 0;
    h_cldfb->synScalefactor = 0;
    h_cldfb->filterScale = 1;
#endif
    cldfb_init_proto_and_twiddles_enc_fx( h_cldfb );

    return;
}
#else
void configureCldfb_ivas_enc(
    HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i/o: filter bank handle        */
    const int32_t sampling_rate       /* i  : sampling rate             */
)
{

    h_cldfb->no_col = CLDFB_NO_COL_MAX;
    h_cldfb->bandsToZero = 0;
    h_cldfb->nab = 0;

    h_cldfb->no_channels = (int16_t) ( sampling_rate * INV_CLDFB_BANDWIDTH + 0.5f );
    h_cldfb->p_filter_length = 10 * h_cldfb->no_channels;
    cldfb_init_proto_and_twiddles_enc( h_cldfb );

    return;
}
#endif
#ifdef IVAS_FLOAT_FIXED
void configureCldfb_ivas_fx(
    HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i/o: filter bank handle        */
@@ -1822,9 +1844,11 @@ ivas_error openCldfb_ivas_enc(
    hs->type = type;
    hs->prototype = prototype;

    configureCldfb_ivas_enc( hs, sampling_rate );
#ifndef IVAS_FLOAT_FIXED
    configureCldfb_ivas_enc( hs, sampling_rate );
    hs->memory_flt = NULL;
#else
    configureCldfb_ivas_enc_fx( hs, sampling_rate );
#endif
    hs->memory_length = 0;

@@ -2790,6 +2814,338 @@ static void cldfb_init_proto_and_twiddles(
}
#endif // IVAS_FLOAT_FIXED

#ifdef IVAS_FLOAT_FIXED
static void cldfb_init_proto_and_twiddles_enc_fx(
    HANDLE_CLDFB_FILTER_BANK hs /* i/o: filter bank handle  */
)
{
    /*find appropriate set of rotVecs*/
    SWITCH( hs->no_channels )
    {
        case 10:
            hs->rot_vec_ana_re_fx = rot_vec_ana_re_L10_fx;
            hs->rot_vec_ana_im_fx = rot_vec_ana_im_L10_fx;
            hs->rot_vec_syn_re_fx = rot_vec_syn_re_L10_fx;
            hs->rot_vec_syn_im_fx = rot_vec_syn_im_L10_fx;
            hs->rRotVctr = rRotVectr_10;
            hs->iRotVctr = iRotVectr_10;
            IF( EQ_16( hs->type, CLDFB_SYNTHESIS ) )
            {
                hs->synScalefactor = add( cldfb_synScale[0], hs->filterScale );
                move16();
            }
            ELSE
            {
                hs->anaScalefactor = add( cldfb_anaScale[0], hs->filterScale );
                move16();
            }
            IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_1_25MS ) )
            {
                hs->ds = 10;
                hs->da = 10;
                hs->rot_vec_ana_delay_re_fx = NULL;
                hs->rot_vec_ana_delay_im_fx = NULL;
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17036; // Q14
                hs->scale = cldfb_scale_2_5ms[0];
                move16();
                move16();
                hs->p_filter = CLDFB80_10_fx;
            }
            ELSE IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_5_00MS ) )
            {
                hs->ds = 40;
                hs->da = -20;
                hs->rot_vec_ana_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_ana_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->rot_vec_syn_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15388; // Q14
                hs->p_filter = LDQMF_10_fx;
                hs->scale = cldfb_scale_5_0ms[0];
                move16();
                move16();
            }
            BREAK;

        case 16:
            hs->rot_vec_ana_re_fx = rot_vec_ana_re_L16_fx;
            hs->rot_vec_ana_im_fx = rot_vec_ana_im_L16_fx;
            hs->rot_vec_syn_re_fx = rot_vec_syn_re_L16_fx;
            hs->rot_vec_syn_im_fx = rot_vec_syn_im_L16_fx;
            hs->rRotVctr = rRotVectr_16;
            hs->iRotVctr = iRotVectr_16;
            {
                hs->anaScalefactor = add( cldfb_anaScale[1], hs->filterScale );
                move16();
            }
            IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_1_25MS ) )
            {
                hs->ds = 20;
                hs->da = 20;
                hs->rot_vec_ana_delay_re_fx = NULL;
                hs->rot_vec_ana_delay_im_fx = NULL;
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17051; // Q14
                hs->p_filter = CLDFB80_16_fx;
                hs->scale = cldfb_scale_2_5ms[1];
                move16();
                move16();
            }
            ELSE IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_5_00MS ) )
            {
                hs->ds = 80;
                hs->da = -40;
                hs->rot_vec_ana_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_ana_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->rot_vec_syn_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15388; // Q14
                hs->p_filter = LDQMF_16_fx;
                hs->scale = cldfb_scale_5_0ms[1];
                move16();
                move16();
            }
            BREAK;

        case 20:

            hs->rRotVctr = rRotVectr_20;
            hs->iRotVctr = iRotVectr_20;
            hs->rot_vec_ana_re_fx = rot_vec_ana_re_L20_fx;
            hs->rot_vec_ana_im_fx = rot_vec_ana_im_L20_fx;
            hs->rot_vec_syn_re_fx = rot_vec_syn_re_L20_fx;
            hs->rot_vec_syn_im_fx = rot_vec_syn_im_L20_fx;
            IF( EQ_16( hs->type, CLDFB_SYNTHESIS ) )
            {
                hs->synScalefactor = add( cldfb_synScale[2], hs->filterScale );
                move16();
            }
            ELSE
            {
                hs->anaScalefactor = add( cldfb_anaScale[2], hs->filterScale );
                move16();
            }
            IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_1_25MS ) )
            {
                hs->ds = 20;
                hs->da = 20;
                hs->rot_vec_ana_delay_re_fx = NULL;
                hs->rot_vec_ana_delay_im_fx = NULL;
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17050; // Q14
                hs->p_filter = CLDFB80_20_fx;
                hs->scale = cldfb_scale_2_5ms[2];
                move16();
                move16();
            }
            ELSE IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_5_00MS ) )
            {
                hs->ds = 80;
                hs->da = -40;
                hs->rot_vec_ana_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_ana_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->rot_vec_syn_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15390; // Q14
                hs->p_filter = LDQMF_20_fx;
                hs->scale = cldfb_scale_5_0ms[2];
                move16();
                move16();
            }
            BREAK;

        case 30:
            hs->rot_vec_ana_re_fx = rot_vec_ana_re_L30_fx;
            hs->rot_vec_ana_im_fx = rot_vec_ana_im_L30_fx;
            hs->rot_vec_syn_re_fx = rot_vec_syn_re_L30_fx;
            hs->rot_vec_syn_im_fx = rot_vec_syn_im_L30_fx;
            hs->rRotVctr = rRotVectr_30;
            hs->iRotVctr = iRotVectr_30;
            IF( EQ_16( hs->type, CLDFB_SYNTHESIS ) )
            {
                hs->synScalefactor = add( cldfb_synScale[6], hs->filterScale );
                move16();
            }
            ELSE
            {
                hs->anaScalefactor = add( cldfb_anaScale[6], hs->filterScale );
                move16();
            }
            IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_1_25MS ) )
            {
                hs->ds = 30;
                hs->da = 30;
                hs->rot_vec_ana_delay_re_fx = NULL;
                hs->rot_vec_ana_delay_im_fx = NULL;
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17051; // Q14
                hs->scale = cldfb_scale_2_5ms[6];
                hs->p_filter = CLDFB80_30_fx;
            }
            ELSE IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_5_00MS ) )
            {
                hs->ds = 120;
                hs->da = -60;
                hs->rot_vec_ana_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_ana_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->rot_vec_syn_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15388; // Q14
                hs->scale = cldfb_scale_5_0ms[6];
                hs->p_filter = LDQMF_30_fx;
                move16();
                move16();
            }
            BREAK;

        case 32:
            hs->rot_vec_ana_re_fx = rot_vec_ana_re_L32_fx;
            hs->rot_vec_ana_im_fx = rot_vec_ana_im_L32_fx;
            hs->rot_vec_syn_re_fx = rot_vec_syn_re_L32_fx;
            hs->rot_vec_syn_im_fx = rot_vec_syn_im_L32_fx;
            hs->rRotVctr = rRotVectr_32;
            hs->iRotVctr = iRotVectr_32;
            {
                hs->anaScalefactor = add( cldfb_anaScale[3], hs->filterScale );
                move16();
            }
            IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_1_25MS ) )
            {
                hs->ds = 32;
                hs->da = 32;
                hs->rot_vec_ana_delay_re_fx = NULL;
                hs->rot_vec_ana_delay_im_fx = NULL;
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17050; // Q14
                hs->p_filter = CLDFB80_32_fx;
                hs->scale = cldfb_scale_2_5ms[3];
                move16();
                move16();
            }
            ELSE IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_5_00MS ) )
            {
                hs->ds = 160;
                hs->da = -80;
                hs->rot_vec_ana_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_ana_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->rot_vec_syn_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15392; // Q14
                hs->scale = cldfb_scale_5_0ms[3];
                hs->p_filter = LDQMF_32_fx;
                move16();
                move16();
            }
            BREAK;

        case 40:
            hs->rot_vec_ana_re_fx = rot_vec_ana_re_L40_fx;
            hs->rot_vec_ana_im_fx = rot_vec_ana_im_L40_fx;
            hs->rot_vec_syn_re_fx = rot_vec_syn_re_L40_fx;
            hs->rot_vec_syn_im_fx = rot_vec_syn_im_L40_fx;
            hs->rRotVctr = rRotVectr_40;
            hs->iRotVctr = iRotVectr_40;
            IF( EQ_16( hs->type, CLDFB_SYNTHESIS ) )
            {
                hs->synScalefactor = add( cldfb_synScale[4], hs->filterScale );
                move16();
            }
            ELSE
            {
                hs->anaScalefactor = add( cldfb_anaScale[4], hs->filterScale );
                move16();
            }
            IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_1_25MS ) )
            {
                hs->ds = 40;
                hs->da = 40;
                hs->rot_vec_ana_delay_re_fx = NULL;
                hs->rot_vec_ana_delay_im_fx = NULL;
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17051; // Q14
                hs->scale = cldfb_scale_2_5ms[4];
                hs->p_filter = CLDFB80_40_fx;
                move16();
                move16();
            }
            ELSE IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_5_00MS ) )
            {
                hs->ds = 160;
                hs->da = -80;
                hs->rot_vec_ana_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_ana_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->rot_vec_syn_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15391; // Q14
                hs->p_filter = LDQMF_40_fx;
                hs->scale = cldfb_scale_5_0ms[4];
                move16();
                move16();
            }
            BREAK;

        case 60:
            hs->rot_vec_ana_re_fx = rot_vec_ana_re_L60_fx;
            hs->rot_vec_ana_im_fx = rot_vec_ana_im_L60_fx;
            hs->rot_vec_syn_re_fx = rot_vec_syn_re_L60_fx;
            hs->rot_vec_syn_im_fx = rot_vec_syn_im_L60_fx;
            hs->rRotVctr = rRotVectr_60;
            hs->iRotVctr = iRotVectr_60;
            IF( EQ_16( hs->type, CLDFB_SYNTHESIS ) )
            {
                hs->synScalefactor = add( cldfb_synScale[5], hs->filterScale );
                move16();
            }
            ELSE
            {
                hs->anaScalefactor = add( cldfb_anaScale[5], hs->filterScale );
                move16();
            }
            IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_1_25MS ) )
            {
                hs->ds = 60;
                hs->da = 60;
                move16();
                move16();
                hs->rot_vec_ana_delay_re_fx = NULL;
                hs->rot_vec_ana_delay_im_fx = NULL;
                hs->rot_vec_syn_delay_re_fx = NULL;
                hs->rot_vec_syn_delay_im_fx = NULL;
                hs->p_filter_sf = (Word16) 17051; // Q14
                hs->p_filter = CLDFB80_60_fx;
                hs->scale = cldfb_scale_2_5ms[5];
                move16();
                move16();
            }
            ELSE IF( EQ_16( hs->prototype, CLDFB_PROTOTYPE_5_00MS ) )
            {
                hs->ds = 240;
                hs->da = -120;
                move16();
                move16();
                hs->rot_vec_ana_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_ana_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->rot_vec_syn_delay_re_fx = rot_vec_delay_re_LDQMF_fx;
                hs->rot_vec_syn_delay_im_fx = rot_vec_delay_im_LDQMF_fx;
                hs->p_filter_sf = (Word16) 15391; // Q14
                hs->p_filter = LDQMF_60_fx;
                hs->scale = cldfb_scale_5_0ms[5];
                move16();
                move16();
            }
            break;
    }

    return;
}
#else
static void cldfb_init_proto_and_twiddles_enc(
    HANDLE_CLDFB_FILTER_BANK hs /* i/o: filter bank handle  */
)
@@ -2825,8 +3181,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 10;
                hs->da = 10;
                hs->scale_flt = CLDFB80_10_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = CLDFB80_10_SCALE;
                hs->p_filter_flt = CLDFB80_10_flt;
                hs->rot_vec_ana_delay_re = NULL;
                hs->rot_vec_ana_delay_im = NULL;
@@ -2846,8 +3202,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
#ifndef IVAS_FLOAT_FIXED
                hs->p_filter_flt = LDQMF_10;
#endif
                hs->scale_flt = LDQMF_10_SCALE;
#endif
                hs->ds = 40;
                hs->da = -20;
#ifndef IVAS_FLOAT_FIXED
@@ -2889,8 +3245,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
#ifndef IVAS_FLOAT_FIXED
                hs->p_filter_flt = CLDFB80_16_flt;
#endif
                hs->scale_flt = CLDFB80_16_SCALE;
#endif
                hs->ds = 20;
                hs->da = 20;
#ifndef IVAS_FLOAT_FIXED
@@ -2912,8 +3268,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 80;
                hs->da = -40;
                hs->scale_flt = LDQMF_16_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = LDQMF_16_SCALE;
                hs->p_filter_flt = LDQMF_16;
                hs->rot_vec_ana_delay_re = rot_vec_delay_re_LDQMF;
                hs->rot_vec_ana_delay_im = rot_vec_delay_im_LDQMF;
@@ -2959,8 +3315,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 20;
                hs->da = 20;
                hs->scale_flt = CLDFB80_20_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = CLDFB80_20_SCALE;
                hs->p_filter_flt = CLDFB80_20_flt;
                hs->rot_vec_ana_delay_re = NULL;
                hs->rot_vec_ana_delay_im = NULL;
@@ -2980,8 +3336,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 80;
                hs->da = -40;
                hs->scale_flt = LDQMF_20_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = LDQMF_20_SCALE;
                hs->p_filter_flt = LDQMF_20;
                hs->rot_vec_ana_delay_re = rot_vec_delay_re_LDQMF;
                hs->rot_vec_ana_delay_im = rot_vec_delay_im_LDQMF;
@@ -3027,8 +3383,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 30;
                hs->da = 30;
                hs->scale_flt = CLDFB80_30_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = CLDFB80_30_SCALE;
                hs->p_filter_flt = CLDFB80_30_flt;
                hs->rot_vec_ana_delay_re = NULL;
                hs->rot_vec_ana_delay_im = NULL;
@@ -3048,8 +3404,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 120;
                hs->da = -60;
                hs->scale_flt = LDQMF_30_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = LDQMF_30_SCALE;
                hs->p_filter_flt = LDQMF_30;
                hs->rot_vec_ana_delay_re = rot_vec_delay_re_LDQMF;
                hs->rot_vec_ana_delay_im = rot_vec_delay_im_LDQMF;
@@ -3089,8 +3445,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 32;
                hs->da = 32;
                hs->scale_flt = CLDFB80_32_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = CLDFB80_32_SCALE;
                hs->p_filter_flt = CLDFB80_32_flt;
                hs->rot_vec_ana_delay_re = NULL;
                hs->rot_vec_ana_delay_im = NULL;
@@ -3110,8 +3466,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 160;
                hs->da = -80;
                hs->scale_flt = LDQMF_32_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = LDQMF_32_SCALE;
                hs->p_filter_flt = LDQMF_32;
                hs->rot_vec_ana_delay_re = rot_vec_delay_re_LDQMF;
                hs->rot_vec_ana_delay_im = rot_vec_delay_im_LDQMF;
@@ -3157,8 +3513,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 40;
                hs->da = 40;
                hs->scale_flt = CLDFB80_40_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = CLDFB80_40_SCALE;
                hs->p_filter_flt = CLDFB80_40_flt;
                hs->rot_vec_ana_delay_re = NULL;
                hs->rot_vec_ana_delay_im = NULL;
@@ -3178,8 +3534,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 160;
                hs->da = -80;
                hs->scale_flt = LDQMF_40_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = LDQMF_40_SCALE;
                hs->p_filter_flt = LDQMF_40;
                hs->rot_vec_ana_delay_re = rot_vec_delay_re_LDQMF;
                hs->rot_vec_ana_delay_im = rot_vec_delay_im_LDQMF;
@@ -3225,8 +3581,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 60;
                hs->da = 60;
                hs->scale_flt = CLDFB80_60_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = CLDFB80_60_SCALE;
                hs->p_filter_flt = CLDFB80_60_flt;
                hs->rot_vec_ana_delay_re = NULL;
                hs->rot_vec_ana_delay_im = NULL;
@@ -3246,8 +3602,8 @@ static void cldfb_init_proto_and_twiddles_enc(
            {
                hs->ds = 240;
                hs->da = -120;
                hs->scale_flt = LDQMF_60_SCALE;
#ifndef IVAS_FLOAT_FIXED
                hs->scale_flt = LDQMF_60_SCALE;
                hs->p_filter_flt = LDQMF_60;
                hs->rot_vec_ana_delay_re = rot_vec_delay_re_LDQMF;
                hs->rot_vec_ana_delay_im = rot_vec_delay_im_LDQMF;
@@ -3268,6 +3624,7 @@ static void cldfb_init_proto_and_twiddles_enc(

    return;
}
#endif
/*-------------------------------------------------------------------*
 * cldfb_save_memory_ivas()
 *
+70 −0
Original line number Diff line number Diff line
@@ -5763,5 +5763,75 @@ void ivas_spar_get_cldfb_gains_fx(
    HANDLE_CLDFB_FILTER_BANK cldfbSynDec0,
    const DECODER_CONFIG_HANDLE hDecoderConfig );

void ivas_sba_getTCs_fx(
    Word32 *sba_data[],      /* i  : SBA signals Q11              */
    Encoder_Struct *st_ivas, /* i/o: Encoder struct               */
    const Word16 input_frame /* i  : frame length                 */
);

ivas_error front_vad_spar_fx(
    SPAR_ENC_HANDLE hSpar,                /* i/o: SPAR encoder structure           */
    const Word32 *omni_in,                /* i  : omnidirectional input signal Q11 */
    ENCODER_CONFIG_HANDLE hEncoderConfig, /* i  : encoder configuration handle     */
    const Word16 input_frame              /* i  : input frame length               */
);

ivas_error ivas_spar_enc_fx(
    Encoder_Struct *st_ivas,  /* i/o: IVAS encoder structure              */
    Word32 *data_fx[],        /* i/o: input/transport audio channel Q11   */
    const Word16 input_frame, /* i  : input frame length                  */
    Word16 *nb_bits_metadata, /* i  : number of MD bits written           */
    BSTR_ENC_HANDLE hMetaData /* o  : MetaData handle                     */
);

ivas_error ivas_ism_enc_fx(
    Encoder_Struct *st_ivas,           /* i/o: IVAS encoder structure                     */
    Word32 *data[],                    /* i  : input signal [channels][samples] Q(q_data) */
    Word16 q_data,                     /* i  : Q-factor of input signal                   */
    const Word16 input_frame,          /* i  : input frame length per channel             */
    Word16 *nb_bits_metadata,          /* i  : number of metadata bits                    */
    const Word16 flag_omasa_ener_brate /* i  : less bitrate for objects in OMASA flag     */
);

ivas_error ivas_sce_enc_fx(
    Encoder_Struct *st_ivas,      /* i/o: IVAS encoder structure                       */
    const Word16 sce_id,          /* i  : SCE # identifier                             */
    const Word32 data_fx[],       /* i  : input signal for single channel Q(q_data_fx) */
    const Word16 q_data_fx,       /* i  : Q-factor of input signal for single channel  */
    const Word16 input_frame,     /* i  : input frame length per channel               */
    const Word16 nb_bits_metadata /* i  : number of metadata bits                      */
);

ivas_error ivas_cpe_enc_fx(
    Encoder_Struct *st_ivas,      /* i/o: IVAS encoder structure                     */
    const Word16 cpe_id,          /* i  : CPE # identifier                           */
    Word32 data_fx_ch0[],         /* i  : input signal for channel 0  Q(q_data_fx)   */
    Word32 data_fx_ch1[],         /* i  : input signal for channel 1  Q(q_data_fx)   */
    Word16 q_data_fx,             /* i  : Q-factor of input signal for both channels */
    const Word16 input_frame,     /* i  : input frame length per channel             */
    const Word16 nb_bits_metadata /* i  : number of metadata bits                    */
);

ivas_error ivas_mct_enc_fx(
    Encoder_Struct *st_ivas,           /* i/o: IVAS encoder structure            */
    Word32 *data_fx[MCT_MAX_CHANNELS], /* i  : input signal buffers Q(q_data_fx) */
    Word16 q_data_fx,                  /* i  : Q-factor of input signal          */
    const Word16 input_frame,          /* i  : input frame length per channel    */
    const Word16 nb_bits_metadata      /* i  : number of metadata bits           */
);

ivas_error ivas_enc_fx(
    Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure      */
    const Word16 *data,      /* i  : input signal             Q0 */
    const Word16 n_samples   /* i  : number of input samples     */
);

void reset_metadata_spatial_fx(
    const IVAS_FORMAT ivas_format, /* i  : IVAS format                             */
    BSTR_ENC_HANDLE hMetaData,     /* i/o: Metadata bitstream handle               */
    const Word32 element_brate,    /* i  : element bitrate                         */
    Word32 *total_brate,           /* o  : total bitrate                           */
    const Word32 core_brate,       /* i  : core bitrate                            */
    const Word16 nb_bits_metadata  /* i  : number of meatdata bits                 */
);
#endif
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0

File changed.

Preview size limit exceeded, changes collapsed.

+6 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading