Revision cb284d4b

View differences:

libavcodec/mpegvideo.c
5172 5172
                    encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_BIDIR, pb, pb2, tex_pb,
5173 5173
                                 &dmin, &next_block, 0, 0);
5174 5174
                }
5175
                if(mb_type&CANDIDATE_MB_TYPE_DIRECT){
5176
                    int mx= s->b_direct_mv_table[xy][0];
5177
                    int my= s->b_direct_mv_table[xy][1];
5178

  
5179
                    s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
5180
                    s->mb_intra= 0;
5181
                    ff_mpeg4_set_direct_mv(s, mx, my);
5182
                    encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_DIRECT, pb, pb2, tex_pb,
5183
                                 &dmin, &next_block, mx, my);
5184
                }
5185 5175
                if(mb_type&CANDIDATE_MB_TYPE_FORWARD_I){
5186 5176
                    s->mv_dir = MV_DIR_FORWARD;
5187 5177
                    s->mv_type = MV_TYPE_FIELD;
......
5280 5270
                                }
5281 5271
                            }
5282 5272
                        }
5283
                        qp= best_s.qscale;
5284
                        s->current_picture.qscale_table[xy]= qp;
5285 5273
                    }
5286 5274
                }
5275
                if(mb_type&CANDIDATE_MB_TYPE_DIRECT){
5276
                    int mx= s->b_direct_mv_table[xy][0];
5277
                    int my= s->b_direct_mv_table[xy][1];
5278

  
5279
                    backup_s.dquant = 0;
5280
                    s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
5281
                    s->mb_intra= 0;
5282
                    ff_mpeg4_set_direct_mv(s, mx, my);
5283
                    encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_DIRECT, pb, pb2, tex_pb,
5284
                                 &dmin, &next_block, mx, my);
5285
                }
5286
                s->current_picture.qscale_table[xy]= best_s.qscale;
5287 5287

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

  

Also available in: Unified diff