CHECK_FREE(s->me_scratchpad);
void MPV_common_end(MpegEncContext *s){    int i;    CHECK_FREE(s->mb_type);    CHECK_FREE(s->mb_var);    CHECK_FREE(s->p_mv_table);    CHECK_FREE(s->last_p_mv_table);    CHECK_FREE(s->b_forw_mv_table);    CHECK_FREE(s->b_back_mv_table);    CHECK_FREE(s->b_bidir_forw_mv_table);    CHECK_FREE(s->b_bidir_back_mv_table);    CHECK_FREE(s->b_direct_forw_mv_table);    CHECK_FREE(s->b_direct_back_mv_table);    CHECK_FREE(s->b_direct_mv_table);    CHECK_FREE(s->motion_val);    CHECK_FREE(s->dc_val[0]);    CHECK_FREE(s->ac_val[0]);    CHECK_FREE(s->coded_block);    CHECK_FREE(s->mbintra_table);    CHECK_FREE(s->mbskip_table);    for(i=0;i<3;i++) {        int j;        CHECK_FREE(s->last_picture_base[i]);        CHECK_FREE(s->next_picture_base[i]);        CHECK_FREE(s->aux_picture_base[i]);        for(j=0; j<REORDER_BUFFER_SIZE; j++){            CHECK_FREE(s->picture_buffer[j][i]);        }    }    s->context_initialized = 0;}