Commit 82566f11 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'ivas_hoa_mtx_bin_rend_fxd' into 'main'

hoa gain matrix and bin renderer changes.

See merge request !100
parents 0532a64f b5c59232
Loading
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -3715,6 +3715,7 @@ void ivas_sba_dirac_stereo_smooth_parameters(
    const int16_t num_md_sub_frames                             /* i  : number of subframes in mixing matrix    */
);

#ifndef IVAS_FLOAT_FIXED
void ivas_sba2mc_cldfb(
    IVAS_OUTPUT_SETUP hInSetup,                                             /* i  : Format of input layout              */
    float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: cldfb real part                     */
@@ -3724,7 +3725,17 @@ void ivas_sba2mc_cldfb(
    const int16_t nb_timeslots,                                             /* i  : number of time slots to process     */
    const float *hoa_dec_mtx                                                /* i  : HOA decoding mtx                    */
);

#else
void ivas_sba2mc_cldfb_fixed(
    IVAS_OUTPUT_SETUP hInSetup,                                              /* i  : Format of input layout          */
    Word32 RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: cldfb real part (Q_real)        */
    Word32 ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: cldfb imag part (Q_imag)        */
    const Word16 nb_channels_out,                                            /* i  : nb of output channels           */
    const Word16 nb_bands,                                                   /* i  : nb of CLDFB bands to process    */
    const Word16 nb_timeslots,                                               /* i  : number of time slots to process */
    const Word32 *hoa_dec_mtx                                                /* i  : HOA decoding mtx                */
);
#endif

/*----------------------------------------------------------------------------------*
 * DirAC prototypes
+16 −0
Original line number Diff line number Diff line
@@ -5145,6 +5145,22 @@ void v_multc_fixed(
    const Word16 N    /* i  : Vector length                                    */
);

void v_add_fixed(
    const Word32 x1[], /* i  : Input vector 1                                   */
    const Word32 x2[], /* i  : Input vector 2                                   */
    Word32 y[],        /* o  : Output vector that contains vector 1 - vector 2  */
    const Word16 N,    /* i  : Vector length                                    */
    const Word16 hdrm  /* i  : headroom for when subtraction result > 1 or < -1 */
);

void v_add_w64(
    const Word64 x1[], /* i  : Input vector 1                                   */
    const Word64 x2[], /* i  : Input vector 2                                   */
    Word64 y[],        /* o  : Output vector that contains vector 1 - vector 2  */
    const Word16 N,    /* i  : Vector length                                    */
    const Word16 hdrm  /* i  : headroom for when subtraction result > 1 or < -1 */
);

void v_sub_fixed(
    const Word32 x1[], /* i  : Input vector 1                                   */
    const Word32 x2[], /* i  : Input vector 2                                   */
+48 −0
Original line number Diff line number Diff line
@@ -964,6 +964,54 @@ void v_add(
    return;
}

/*-------------------------------------------------------------------*
 * v_add_fixed()
 *
 * Subtraction of two vectors sample by sample
 *-------------------------------------------------------------------*/

void v_add_fixed(
    const Word32 x1[], /* i  : Input vector 1                                   */
    const Word32 x2[], /* i  : Input vector 2                                   */
    Word32 y[],        /* o  : Output vector that contains vector 1 - vector 2  */
    const Word16 N,    /* i  : Vector length                                    */
    const Word16 hdrm  /* i  : headroom for when subtraction result > 1 or < -1 */
)
{
    Word16 i;

    FOR( i = 0; i < N; i++ )
    {
        y[i] = L_add( L_shr( x1[i], hdrm ), L_shr( x2[i], hdrm ) );
    }

    return;
}

/*-------------------------------------------------------------------*
 * v_add_w64()
 *
 * Subtraction of two vectors sample by sample
 *-------------------------------------------------------------------*/

void v_add_w64(
    const Word64 x1[], /* i  : Input vector 1                                   */
    const Word64 x2[], /* i  : Input vector 2                                   */
    Word64 y[],        /* o  : Output vector that contains vector 1 - vector 2  */
    const Word16 N,    /* i  : Vector length                                    */
    const Word16 hdrm  /* i  : headroom for when subtraction result > 1 or < -1 */
)
{
    Word16 i;

    FOR( i = 0; i < N; i++ )
    {
        y[i] = W_add( W_shr( x1[i], hdrm ), W_shr( x2[i], hdrm ) );
    }

    return;
}


/*-------------------------------------------------------------------*
 * v_sub()
+824 −212

File changed.

Preview size limit exceeded, changes collapsed.

+9 −0
Original line number Diff line number Diff line
@@ -504,6 +504,15 @@ const float dmxmtx_table[BINAURAL_CHANNELS][11] =
    { 0.0f, 1.0f, 0.70709997f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f },
};

/*----------------------------------------------------------------------------------*
 * FASTCONV and PARAMETRIC binaural renderer ROM tables
 *----------------------------------------------------------------------------------*/

const Word32 dmxmtx_table_fx[BINAURAL_CHANNELS][11] =
{ // Q31
    { 0x7fffffff, 0, 1518485623, 0x7fffffff, 0, 0x7fffffff, 0, 0x7fffffff, 0, 0x7fffffff, 0 },
    { 0, 0x7fffffff, 1518485623, 0, 0x7fffffff, 0, 0x7fffffff, 0, 0x7fffffff, 0, 0x7fffffff },
};



Loading