static void copy_context_after_encode(MpegEncContext *d, MpegEncContext *s, int type){

    int i;



    memcpy(d->mv, s->mv, 2*4*2*sizeof(int)); 

    memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster then a loop?

    

    /* mpeg1 */

    d->mb_incr= s->mb_incr;

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

        d->last_dc[i]= s->last_dc[i];

    

    /* statistics */

    d->mv_bits= s->mv_bits;

    d->i_tex_bits= s->i_tex_bits;

    d->p_tex_bits= s->p_tex_bits;

    d->i_count= s->i_count;

    d->p_count= s->p_count;

    d->skip_count= s->skip_count;

    d->misc_bits= s->misc_bits;



    d->mb_intra= s->mb_intra;

    d->mb_skiped= s->mb_skiped;

    d->mv_type= s->mv_type;

    d->mv_dir= s->mv_dir;

    d->pb= s->pb;

    d->block= s->block;

    for(i=0; i<6; i++)

        d->block_last_index[i]= s->block_last_index[i];

}

static void copy_context_after_encode(MpegEncContext *d, MpegEncContext *s, int type){

    int i;



    memcpy(d->mv, s->mv, 2*4*2*sizeof(int)); 

    memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); 

    

    

    d->mb_incr= s->mb_incr;

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

        d->last_dc[i]= s->last_dc[i];

    

    

    d->mv_bits= s->mv_bits;

    d->i_tex_bits= s->i_tex_bits;

    d->p_tex_bits= s->p_tex_bits;

    d->i_count= s->i_count;

    d->p_count= s->p_count;

    d->skip_count= s->skip_count;

    d->misc_bits= s->misc_bits;



    d->mb_intra= s->mb_intra;

    d->mb_skiped= s->mb_skiped;

    d->mv_type= s->mv_type;

    d->mv_dir= s->mv_dir;

    d->pb= s->pb;

    d->block= s->block;

    for(i=0; i<6; i++)

        d->block_last_index[i]= s->block_last_index[i];

}

static void FUNC_0(MpegEncContext *VAR_0, MpegEncContext *VAR_1, int VAR_2){

    int VAR_3;



    memcpy(VAR_0->mv, VAR_1->mv, 2*4*2*sizeof(int)); 

    memcpy(VAR_0->last_mv, VAR_1->last_mv, 2*2*2*sizeof(int)); 

    

    

    VAR_0->mb_incr= VAR_1->mb_incr;

    for(VAR_3=0; VAR_3<3; VAR_3++)

        VAR_0->last_dc[VAR_3]= VAR_1->last_dc[VAR_3];

    

    

    VAR_0->mv_bits= VAR_1->mv_bits;

    VAR_0->i_tex_bits= VAR_1->i_tex_bits;

    VAR_0->p_tex_bits= VAR_1->p_tex_bits;

    VAR_0->i_count= VAR_1->i_count;

    VAR_0->p_count= VAR_1->p_count;

    VAR_0->skip_count= VAR_1->skip_count;

    VAR_0->misc_bits= VAR_1->misc_bits;



    VAR_0->mb_intra= VAR_1->mb_intra;

    VAR_0->mb_skiped= VAR_1->mb_skiped;

    VAR_0->mv_type= VAR_1->mv_type;

    VAR_0->mv_dir= VAR_1->mv_dir;

    VAR_0->pb= VAR_1->pb;

    VAR_0->block= VAR_1->block;

    for(VAR_3=0; VAR_3<6; VAR_3++)

        VAR_0->block_last_index[VAR_3]= VAR_1->block_last_index[VAR_3];

}

static void FUNC_0(MpegEncContext *VAR_0, MpegEncContext *VAR_1, int VAR_2){ int VAR_3; memcpy(VAR_0->mv, VAR_1->mv, 2*4*2*sizeof(int)); memcpy(VAR_0->last_mv, VAR_1->last_mv, 2*2*2*sizeof(int)); VAR_0->mb_incr= VAR_1->mb_incr; for(VAR_3=0; VAR_3<3; VAR_3++) VAR_0->last_dc[VAR_3]= VAR_1->last_dc[VAR_3]; VAR_0->mv_bits= VAR_1->mv_bits; VAR_0->i_tex_bits= VAR_1->i_tex_bits; VAR_0->p_tex_bits= VAR_1->p_tex_bits; VAR_0->i_count= VAR_1->i_count; VAR_0->p_count= VAR_1->p_count; VAR_0->skip_count= VAR_1->skip_count; VAR_0->misc_bits= VAR_1->misc_bits; VAR_0->mb_intra= VAR_1->mb_intra; VAR_0->mb_skiped= VAR_1->mb_skiped; VAR_0->mv_type= VAR_1->mv_type; VAR_0->mv_dir= VAR_1->mv_dir; VAR_0->pb= VAR_1->pb; VAR_0->block= VAR_1->block; for(VAR_3=0; VAR_3<6; VAR_3++) VAR_0->block_last_index[VAR_3]= VAR_1->block_last_index[VAR_3]; }