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

Ported stereo_memory_dec function alongwith its sub-functions

parent e6df9804
Loading
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -1914,6 +1914,36 @@ void deleteCldfb_ivas(
    return;
}

#ifdef IVAS_FLOAT_FIXED
void deleteCldfb_ivas_fx(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb /* i/o: filter bank handle  */
)
{
    HANDLE_CLDFB_FILTER_BANK hs = *h_cldfb;

    IF ( h_cldfb == NULL || *h_cldfb == NULL )
    {
        return;
    }

    IF ( hs->cldfb_state_fx )
    {
        free( hs->cldfb_state_fx );
    }
#ifdef IVAS_FLOAT_FIXED // TODO : Will be removed later
    IF ( hs->cldfb_state )
    {
        free( hs->cldfb_state );
    }
#endif

    free( hs );
    *h_cldfb = NULL;

    return;
}
#endif


/*-------------------------------------------------------------------*
 * cldfb_init_proto_and_twiddles()
+23 −0
Original line number Diff line number Diff line
@@ -1661,3 +1661,26 @@ void ivas_DetectTonalComponents_fx(
    const PsychoacousticParameters* psychParamsCurrent
);
#endif

ivas_error stereo_dft_dec_create_fx(
    STEREO_DFT_DEC_DATA_HANDLE *hStereoDft, /* i/o: decoder DFT stereo handle          */
    const Word32 element_brate,            /* i  : element bitrate                    */
    const Word32 output_Fs,                /* i  : output sampling rate               */
    const Word16 sba_dirac_stereo_flag,    /* i  : signal stereo output for SBA DirAC */
    const Word16 nchan_transport           /* i  : number of transport channels       */
);

void stereo_cng_init_dec_fx(
    STEREO_CNG_DEC_HANDLE hStereoCng, /* i/o: stereo CNG decoder structure                               */
    const Word16 *frameSize          /* i  : pointer to frameSize of channel 0 to be used for channel 1 */
);

ivas_error stereo_memory_dec_fx(
    const Word32 ivas_total_brate, /* i  : IVAS total bitrate          */
    CPE_DEC_HANDLE hCPE,            /* i  : CPE decoder structure       */
    const Word16 nb_bits_metadata, /* i  : number of metadata bits     */
    const Word32 output_Fs,        /* i  : output sampling rate        */
    const IVAS_FORMAT ivas_format,  /* i  : IVAS format                 */
    const MC_MODE mc_mode,          /* i  : MC mode                     */
    const Word16 nchan_transport   /* i  : number of transport channels*/
);
+14 −0
Original line number Diff line number Diff line
@@ -8875,3 +8875,17 @@ void configureFdCngDec(
    const Word16 element_mode );

#endif

void deleteCldfb_ivas_fx(
    HANDLE_CLDFB_FILTER_BANK *h_cldfb /* i/o: filter bank handle  */
);

void fd_bwe_dec_init_fx(
    FD_BWE_DEC_HANDLE hBWE_FD /* i/o: FD BWE data handle  */
);

void stereo_dft_dec_open(
    STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle    */
    const int32_t output_Fs,               /* i  : output sampling rate         */
    const int16_t nchan_transport          /* i  : number of transport channels */
);
+3 −3
Original line number Diff line number Diff line
@@ -387,8 +387,8 @@ void window_ola_fx(
            }
            FOR (i =0; i < n;  i+=2)
            {
                *p1++=round_fx(L_sub(L_deposit_h(*p4++),L_shl(*pa--,1)));
                *p1++=round_fx(L_sub(L_deposit_h(*p4++),L_shl(*pa--,1)));
                *p1++=round_fx_sat(L_sub_sat(L_deposit_h(*p4++),L_shl(*pa--,1)));
                *p1++=round_fx_sat(L_sub_sat(L_deposit_h(*p4++),L_shl(*pa--,1)));
                /*  paout[L/2 + i +1] = -ImdctOut[L - 1 - (i+1)]+OldauOut[i+L/2+1] ;
                paout[L/2 + i ] = -ImdctOut[L - 1 - i]+OldauOut[i+L/2]; */
            }
@@ -463,7 +463,7 @@ void window_ola_fx(
            }
            FOR (i =0; i < n; i++)
            {
                *p1++=round_fx(L_sub_sat(L_deposit_h(*p4++),L_shl(*pa--,1)));
                *p1++=round_fx_sat(L_sub_sat(L_deposit_h(*p4++),L_shl(*pa--,1)));
                /*  paout[L/2 + i] = -ImdctOut[L - 1 - i] + OldauOut[i+L/2]; */
            }
        }
+4 −0
Original line number Diff line number Diff line
@@ -1210,6 +1210,10 @@ void HQ_core_dec_init(

    set16_fx(hHQ_core->old_out_fx, 0, L_FRAME48k);             
    set16_fx(hHQ_core->old_out_LB_fx, 0, L_FRAME32k);          
#ifdef IVAS_FLOAT_FIXED
    set32_fx(hHQ_core->oldOut_fx, 0, L_FRAME48k);             
    set32_fx(hHQ_core->old_outLB_fx, 0, L_FRAME32k);          
#endif
    hHQ_core->Q_old_wtda = 15;                                 
    hHQ_core->Q_old_postdec = 0;                              
    hHQ_core->Q_old_wtda_LB = 0;
Loading