if(s->avctx->debug&FF_DEBUG_SKIP){ int x,y; for(y=0; y<s->mb_height; y++){ for(x=0; x<s->mb_width; x++){ int count= s->mbskip_table[x + y*s->mb_width]; if(count>9) count=9; printf(" %1d", count); } printf("\n"); } printf("pict type: %d\n", s->pict_type); }
void MPV_frame_end(MpegEncContext *s){    int i;    /* draw edge for correct motion prediction if outside */    if(s->codec_id!=CODEC_ID_SVQ1){        if (s->pict_type != B_TYPE && !s->intra_only && !(s->flags&CODEC_FLAG_EMU_EDGE)) {            draw_edges(s->current_picture.data[0], s->linesize  , s->h_edge_pos   , s->v_edge_pos   , EDGE_WIDTH  );            draw_edges(s->current_picture.data[1], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2);            draw_edges(s->current_picture.data[2], s->uvlinesize, s->h_edge_pos>>1, s->v_edge_pos>>1, EDGE_WIDTH/2);        }    }    emms_c();        s->last_pict_type    = s->pict_type;    if(s->pict_type!=B_TYPE){        s->last_non_b_pict_type= s->pict_type;    }#if 0        /* copy back current_picture variables */    for(i=0; i<MAX_PICTURE_COUNT; i++){        if(s->picture[i].data[0] == s->current_picture.data[0]){            s->picture[i]= s->current_picture;            break;        }        }    assert(i<MAX_PICTURE_COUNT);#endif        s->current_picture_ptr->quality= s->qscale; //FIXME get average of qscale_table    s->current_picture_ptr->pict_type= s->pict_type;    s->current_picture_ptr->key_frame= s->pict_type == I_TYPE;    /* release non refernce frames */    for(i=0; i<MAX_PICTURE_COUNT; i++){        if(s->picture[i].data[0] && !s->picture[i].reference /*&& s->picture[i].type!=FF_BUFFER_TYPE_SHARED*/)            s->avctx->release_buffer(s->avctx, (AVFrame*)&s->picture[i]);    }    if(s->avctx->debug&FF_DEBUG_SKIP){        int x,y;                for(y=0; y<s->mb_height; y++){            for(x=0; x<s->mb_width; x++){                int count= s->mbskip_table[x + y*s->mb_width];                if(count>9) count=9;                printf(" %1d", count);            }            printf("\n");        }        printf("pict type: %d\n", s->pict_type);    }    // clear copies, to avoid confusion#if 0    memset(&s->last_picture, 0, sizeof(Picture));    memset(&s->next_picture, 0, sizeof(Picture));    memset(&s->current_picture, 0, sizeof(Picture));#endif}