Revision 2f16af06 libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
5226 5226
                    }
5227 5227
                }
5228 5228

  
5229
                if(s->flags & CODEC_FLAG_QP_RD){
5230
                    if(best_s.mv_type==MV_TYPE_16X16 && !(best_s.mv_dir&MV_DIRECT)){
5229
                if((s->flags & CODEC_FLAG_QP_RD) && dmin < INT_MAX){
5230
                    if(best_s.mv_type==MV_TYPE_16X16){ //FIXME move 4mv after QPRD
5231 5231
                        const int last_qp= backup_s.qscale;
5232 5232
                        int qpi, qp, dc[6];
5233 5233
                        DCTELEM ac[6][16];
......
5283 5283
                    encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_DIRECT, pb, pb2, tex_pb,
5284 5284
                                 &dmin, &next_block, mx, my);
5285 5285
                }
5286
                if(mb_type&CANDIDATE_MB_TYPE_DIRECT0){
5287
                    backup_s.dquant = 0;
5288
                    s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
5289
                    s->mb_intra= 0;
5290
                    ff_mpeg4_set_direct_mv(s, 0, 0);
5291
                    encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_DIRECT, pb, pb2, tex_pb,
5292
                                 &dmin, &next_block, 0, 0);
5293
                }
5286 5294
                s->current_picture.qscale_table[xy]= best_s.qscale;
5287 5295

  
5288 5296
                copy_context_after_encode(s, &best_s, -1);

Also available in: Unified diff