else
                {
                    j = 0;
                }
        }

        tmp  =  InvFiltFactors[j];

        if (tmp < BwVectorOld[i])
        {
            tmp = ((tmp << 1) + tmp + BwVectorOld[i]) >> 2;
        }
        else
        {
            tmp =  fxp_mul32_Q29(Qfmt(0.90625f), tmp);
            tmp =  fxp_mac32_Q29(Qfmt(0.09375f), BwVectorOld[i], tmp);
        }

        if (tmp < Qfmt(0.015625F))
        {
            tmp = 0;
        }

        if (tmp >= Qfmt(0.99609375f))
        {
            tmp = Qfmt(0.99609375f);
        }

        BwVector[i] = tmp;
    }
}
void eight_ch_filtering(const Int32 *pQmfReal,
                        const Int32 *pQmfImag,
                        Int32 *mHybridReal,
                        Int32 *mHybridImag,
                        Int32 scratch_mem[])

{

    Int32 real;
    Int32 imag;
    Int32 tmp1;
    Int32 tmp2;

    real  = fxp_mul32_Q29(Q29_fmt(-0.06989827306334f), pQmfReal[ 4]);

    real  = fxp_mac32_Q31(real, Qfmt31(0.01055120626280f), pQmfReal[12]);
    imag  = fxp_mul32_Q29(Q29_fmt(-0.06989827306334f), pQmfImag[ 4]);

    imag  = fxp_mac32_Q31(imag, Qfmt31(0.01055120626280f), pQmfImag[12]);

    mHybridReal[2] = (imag - real);
    mHybridImag[2] = -(imag + real);

    real  = fxp_mul32_Q29(Q29_fmt(-0.07266113929591f), pQmfReal[ 3]);

    real  = fxp_mac32_Q31(real, Qfmt31(0.04540841899650f), pQmfReal[11]);
    imag  = fxp_mul32_Q29(Q29_fmt(-0.07266113929591f), pQmfImag[ 3]);

    imag  = fxp_mac32_Q31(imag, Qfmt31(0.04540841899650f), pQmfImag[11]);

    tmp1           =  fxp_mul32_Q29(Q29_fmt(-0.38268343236509f), real);
    mHybridReal[3] =  fxp_mac32_Q29(Q29_fmt(0.92387953251129f), imag, tmp1);
    tmp2           =  fxp_mul32_Q29(Q29_fmt(-0.92387953251129f), real);
    mHybridImag[3] =  fxp_mac32_Q29(Q29_fmt(-0.38268343236509f), imag, tmp2);


    mHybridImag[4] = fxp_mul32_Q31(Qfmt31(0.09093731860946f), (pQmfReal[ 2] - pQmfReal[10]));
    mHybridReal[4] = fxp_mul32_Q31(Qfmt31(0.09093731860946f), (pQmfImag[10] - pQmfImag[ 2]));


    real  = fxp_mul32_Q29(Q29_fmt(-0.02270420949825f), pQmfReal[ 1]);

    real  = fxp_mac32_Q31(real, Qfmt31(0.14532227859182f), pQmfReal[ 9]);
    imag  = fxp_mul32_Q29(Q29_fmt(-0.02270420949825f), pQmfImag[ 1]);

    imag  = fxp_mac32_Q31(imag, Qfmt31(0.14532227859182f), pQmfImag[ 9]);

    tmp1           =  fxp_mul32_Q29(Q29_fmt(0.92387953251129f), imag);

    mHybridReal[5] =  fxp_mac32_Q31(tmp1, Qfmt31(0.76536686473018f), real);
    tmp2           =  fxp_mul32_Q29(Q29_fmt(-0.92387953251129f), real);

    mHybridImag[5] =  fxp_mac32_Q31(tmp2, Qfmt31(0.76536686473018f), imag);

    real  = fxp_mul32_Q29(Q29_fmt(-0.00527560313140f), pQmfReal[ 0]);

    real  = fxp_mac32_Q31(real, Qfmt31(0.13979654612668f), pQmfReal[ 8]);
    imag  = fxp_mul32_Q29(Q29_fmt(-0.00527560313140f), pQmfImag[ 0]);

    imag  = fxp_mac32_Q31(imag, Qfmt31(0.13979654612668f), pQmfImag[ 8]);

    mHybridReal[6] = (imag + real);
    mHybridImag[6] = (imag - real);

    tmp1            =  fxp_mul32_Q31(Qfmt31(0.21791935610828f), pQmfReal[ 7]);
    mHybridReal[7]  =  fxp_mac32_Q31(tmp1, Qfmt31(0.09026515280366f), pQmfImag[ 7]);

    tmp2            =  fxp_mul32_Q29(Q29_fmt(-0.04513257640183f), pQmfReal[ 7]);

    mHybridImag[7]  =  fxp_mac32_Q31(tmp2, Qfmt31(0.21791935610828f), pQmfImag[ 7]);

    mHybridReal[0] = pQmfReal[HYBRID_FILTER_DELAY] >> 3;
    mHybridImag[0] = pQmfImag[HYBRID_FILTER_DELAY] >> 3;

    tmp1           =  fxp_mul32_Q29(Q29_fmt(-0.04513257640183f), pQmfImag[ 5]);

    mHybridReal[1] =  fxp_mac32_Q31(tmp1, Qfmt31(0.21791935610828f), pQmfReal[ 5]);


    tmp2            =  fxp_mul32_Q31(Qfmt31(0.21791935610828f), pQmfImag[ 5]);
    mHybridImag[1]  =  fxp_mac32_Q31(tmp2, Qfmt31(0.09026515280366f), pQmfReal[ 5]);

    /*
     *  8*ifft
     */

    ps_fft_rx8(mHybridReal, mHybridImag, scratch_mem);

}