static av_cold void init_mdct_win(TwinContext *tctx)

{

    int i,j;

    const ModeTab *mtab = tctx->mtab;

    int size_s = mtab->size / mtab->fmode[FT_SHORT].sub;

    int size_m = mtab->size / mtab->fmode[FT_MEDIUM].sub;

    int channels = tctx->avctx->channels;

    float norm = channels == 1 ? 2. : 1.;



    for (i = 0; i < 3; i++) {

        int bsize = tctx->mtab->size/tctx->mtab->fmode[i].sub;

        ff_mdct_init(&tctx->mdct_ctx[i], av_log2(bsize) + 1, 1,

                     -sqrt(norm/bsize) / (1<<15));

    }



    tctx->tmp_buf  = av_malloc(mtab->size            * sizeof(*tctx->tmp_buf));



    tctx->spectrum  = av_malloc(2*mtab->size*channels*sizeof(float));

    tctx->curr_frame = av_malloc(2*mtab->size*channels*sizeof(float));

    tctx->prev_frame  = av_malloc(2*mtab->size*channels*sizeof(float));



    for (i = 0; i < 3; i++) {

        int m = 4*mtab->size/mtab->fmode[i].sub;

        double freq = 2*M_PI/m;

        tctx->cos_tabs[i] = av_malloc((m/4)*sizeof(*tctx->cos_tabs));



        for (j = 0; j <= m/8; j++)

            tctx->cos_tabs[i][j] = cos((2*j + 1)*freq);

        for (j = 1; j <  m/8; j++)

            tctx->cos_tabs[i][m/4-j] = tctx->cos_tabs[i][j];

    }





    ff_init_ff_sine_windows(av_log2(size_m));

    ff_init_ff_sine_windows(av_log2(size_s/2));

    ff_init_ff_sine_windows(av_log2(mtab->size));

}

static av_cold void init_mdct_win(TwinContext *tctx)

{

    int i,j;

    const ModeTab *mtab = tctx->mtab;

    int size_s = mtab->size / mtab->fmode[FT_SHORT].sub;

    int size_m = mtab->size / mtab->fmode[FT_MEDIUM].sub;

    int channels = tctx->avctx->channels;

    float norm = channels == 1 ? 2. : 1.;



    for (i = 0; i < 3; i++) {

        int bsize = tctx->mtab->size/tctx->mtab->fmode[i].sub;

        ff_mdct_init(&tctx->mdct_ctx[i], av_log2(bsize) + 1, 1,

                     -sqrt(norm/bsize) / (1<<15));

    }



    tctx->tmp_buf  = av_malloc(mtab->size            * sizeof(*tctx->tmp_buf));



    tctx->spectrum  = av_malloc(2*mtab->size*channels*sizeof(float));

    tctx->curr_frame = av_malloc(2*mtab->size*channels*sizeof(float));

    tctx->prev_frame  = av_malloc(2*mtab->size*channels*sizeof(float));



    for (i = 0; i < 3; i++) {

        int m = 4*mtab->size/mtab->fmode[i].sub;

        double freq = 2*M_PI/m;

        tctx->cos_tabs[i] = av_malloc((m/4)*sizeof(*tctx->cos_tabs));



        for (j = 0; j <= m/8; j++)

            tctx->cos_tabs[i][j] = cos((2*j + 1)*freq);

        for (j = 1; j <  m/8; j++)

            tctx->cos_tabs[i][m/4-j] = tctx->cos_tabs[i][j];

    }





    ff_init_ff_sine_windows(av_log2(size_m));

    ff_init_ff_sine_windows(av_log2(size_s/2));

    ff_init_ff_sine_windows(av_log2(mtab->size));

}

static av_cold void init_mdct_win(TwinContext *tctx)     int i,j;         ff_mdct_init(&tctx->mdct_ctx[i], av_log2(bsize) + 1, 1,                      -sqrt(norm/bsize) / (1<<15));     tctx->tmp_buf  = av_malloc(mtab->size            * sizeof(*tctx->tmp_buf));     tctx->spectrum  = av_malloc(2*mtab->size*channels*sizeof(float));     tctx->curr_frame = av_malloc(2*mtab->size*channels*sizeof(float));     tctx->prev_frame  = av_malloc(2*mtab->size*channels*sizeof(float));         tctx->cos_tabs[i] = av_malloc((m/4)*sizeof(*tctx->cos_tabs));     for (i = 0; i < 3; i++) {
static av_cold void FUNC_0(TwinContext *tctx)

{

    int VAR_0,VAR_1;

    const ModeTab *VAR_2 = tctx->VAR_2;

    int VAR_3 = VAR_2->size / VAR_2->fmode[FT_SHORT].sub;

    int VAR_4 = VAR_2->size / VAR_2->fmode[FT_MEDIUM].sub;

    int VAR_5 = tctx->avctx->VAR_5;

    float VAR_6 = VAR_5 == 1 ? 2. : 1.;



    for (VAR_0 = 0; VAR_0 < 3; VAR_0++) {

        int VAR_7 = tctx->VAR_2->size/tctx->VAR_2->fmode[VAR_0].sub;

        ff_mdct_init(&tctx->mdct_ctx[VAR_0], av_log2(VAR_7) + 1, 1,

                     -sqrt(VAR_6/VAR_7) / (1<<15));

    }



    tctx->tmp_buf  = av_malloc(VAR_2->size            * sizeof(*tctx->tmp_buf));



    tctx->spectrum  = av_malloc(2*VAR_2->size*VAR_5*sizeof(float));

    tctx->curr_frame = av_malloc(2*VAR_2->size*VAR_5*sizeof(float));

    tctx->prev_frame  = av_malloc(2*VAR_2->size*VAR_5*sizeof(float));



    for (VAR_0 = 0; VAR_0 < 3; VAR_0++) {

        int VAR_8 = 4*VAR_2->size/VAR_2->fmode[VAR_0].sub;

        double VAR_9 = 2*M_PI/VAR_8;

        tctx->cos_tabs[VAR_0] = av_malloc((VAR_8/4)*sizeof(*tctx->cos_tabs));



        for (VAR_1 = 0; VAR_1 <= VAR_8/8; VAR_1++)

            tctx->cos_tabs[VAR_0][VAR_1] = cos((2*VAR_1 + 1)*VAR_9);

        for (VAR_1 = 1; VAR_1 <  VAR_8/8; VAR_1++)

            tctx->cos_tabs[VAR_0][VAR_8/4-VAR_1] = tctx->cos_tabs[VAR_0][VAR_1];

    }





    ff_init_ff_sine_windows(av_log2(VAR_4));

    ff_init_ff_sine_windows(av_log2(VAR_3/2));

    ff_init_ff_sine_windows(av_log2(VAR_2->size));

}

static av_cold void FUNC_0(TwinContext *tctx)
{ int VAR_0,VAR_1; const ModeTab *VAR_2 = tctx->VAR_2; int VAR_3 = VAR_2->size / VAR_2->fmode[FT_SHORT].sub; int VAR_4 = VAR_2->size / VAR_2->fmode[FT_MEDIUM].sub; int VAR_5 = tctx->avctx->VAR_5; float VAR_6 = VAR_5 == 1 ? 2. : 1.; for (VAR_0 = 0; VAR_0 < 3; VAR_0++) { int VAR_7 = tctx->VAR_2->size/tctx->VAR_2->fmode[VAR_0].sub; ff_mdct_init(&tctx->mdct_ctx[VAR_0], av_log2(VAR_7) + 1, 1,
-sqrt(VAR_6/VAR_7) / (1<<15)); } tctx->tmp_buf  = av_malloc(VAR_2->size            * sizeof(*tctx->tmp_buf)); tctx->spectrum  = av_malloc(2*VAR_2->size*VAR_5*sizeof(float)); tctx->curr_frame = av_malloc(2*VAR_2->size*VAR_5*sizeof(float)); tctx->prev_frame  = av_malloc(2*VAR_2->size*VAR_5*sizeof(float)); for (VAR_0 = 0; VAR_0 < 3; VAR_0++) { int VAR_8 = 4*VAR_2->size/VAR_2->fmode[VAR_0].sub; double VAR_9 = 2*M_PI/VAR_8; tctx->cos_tabs[VAR_0] = av_malloc((VAR_8/4)*sizeof(*tctx->cos_tabs)); for (VAR_1 = 0; VAR_1 <= VAR_8/8; VAR_1++) tctx->cos_tabs[VAR_0][VAR_1] = cos((2*VAR_1 + 1)*VAR_9); for (VAR_1 = 1; VAR_1 <  VAR_8/8; VAR_1++) tctx->cos_tabs[VAR_0][VAR_8/4-VAR_1] = tctx->cos_tabs[VAR_0][VAR_1]; } ff_init_ff_sine_windows(av_log2(VAR_4)); ff_init_ff_sine_windows(av_log2(VAR_3/2)); ff_init_ff_sine_windows(av_log2(VAR_2->size)); }