Revision 11ce8834 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
294 294
    s->qcompress= avctx->qcompress;
295 295
    s->qblur= avctx->qblur;
296 296
    s->avctx = avctx;
297
    s->aspect_ratio_info= avctx->aspect_ratio_info;
297 298
    
298 299
    if (s->gop_size <= 1) {
299 300
        s->intra_only = 1;
......
377 378

  
378 379
    if (s->out_format == FMT_H263)
379 380
        h263_encode_init(s);
381
    else if (s->out_format == FMT_MPEG1)
382
        mpeg1_encode_init(s);
380 383

  
381 384
    s->encoding = 1;
382 385

  
......
1075 1078
    /* Reset the average MB variance */
1076 1079
    s->avg_mb_var = 0;
1077 1080
    s->mc_mb_var = 0;
1078

  
1079 1081
    /* Estimate motion for every MB */
1080 1082
    for(mb_y=0; mb_y < s->mb_height; mb_y++) {
1081 1083
        for(mb_x=0; mb_x < s->mb_width; mb_x++) {
......
1132 1134

  
1133 1135
        for(i=MAX_FCODE; i>1; i--){
1134 1136
            loose+= mv_num[i];
1135
            if(loose > 4) break;
1137
            if(loose > 4) break; //FIXME this is pretty ineffective
1136 1138
        }
1137 1139
        s->f_code= i;
1138 1140
    }else{
1139 1141
        s->f_code= 1;
1140 1142
    }
1143

  
1141 1144
//printf("f_code %d ///\n", s->f_code);
1142 1145
    /* convert MBs with too long MVs to I-Blocks */
1143 1146
    if(s->pict_type==P_TYPE){

Also available in: Unified diff