av_log(s->avctx, AV_LOG_ERROR, "AVFrame.motion_subsample_log2 doesnt match! (%d!=%d)\n",
av_log(s->avctx, AV_LOG_ERROR, "AVFrame.motion_subsample_log2 doesn't match! (%d!=%d)\n",
static void copy_picture_attributes(MpegEncContext *s, AVFrame *dst, AVFrame *src){    int i;    dst->pict_type              = src->pict_type;    dst->quality                = src->quality;    dst->coded_picture_number   = src->coded_picture_number;    dst->display_picture_number = src->display_picture_number;//    dst->reference              = src->reference;    dst->pts                    = src->pts;    dst->interlaced_frame       = src->interlaced_frame;    dst->top_field_first        = src->top_field_first;    if(s->avctx->me_threshold){        if(!src->motion_val[0])            av_log(s->avctx, AV_LOG_ERROR, "AVFrame.motion_val not set!\n");        if(!src->mb_type)            av_log(s->avctx, AV_LOG_ERROR, "AVFrame.mb_type not set!\n");        if(!src->ref_index[0])            av_log(s->avctx, AV_LOG_ERROR, "AVFrame.ref_index not set!\n");        if(src->motion_subsample_log2 != dst->motion_subsample_log2)            av_log(s->avctx, AV_LOG_ERROR, "AVFrame.motion_subsample_log2 doesnt match! (%d!=%d)\n",            src->motion_subsample_log2, dst->motion_subsample_log2);        memcpy(dst->mb_type, src->mb_type, s->mb_stride * s->mb_height * sizeof(dst->mb_type[0]));                for(i=0; i<2; i++){            int stride= ((16*s->mb_width )>>src->motion_subsample_log2) + 1;            int height= ((16*s->mb_height)>>src->motion_subsample_log2);            if(src->motion_val[i] && src->motion_val[i] != dst->motion_val[i]){                memcpy(dst->motion_val[i], src->motion_val[i], 2*stride*height*sizeof(int16_t));            }            if(src->ref_index[i] && src->ref_index[i] != dst->ref_index[i]){                memcpy(dst->ref_index[i], src->ref_index[i], s->b8_stride*2*s->mb_height*sizeof(int8_t));            }        }    }}