Revision c40c3482 libavcodec/h263.c

View differences:

libavcodec/h263.c
403 403
    uint16_t time_pp= s->pp_time;
404 404
    uint16_t time_pb= s->pb_time;
405 405
    int i;
406
        
406
    
407 407
    //FIXME avoid divides
408 408
    switch(s->co_located_type_table[mb_index]){
409 409
    case 0:
410
        s->mv_type= MV_TYPE_16X16;
411
        s->mv[0][0][0] = s->motion_val[xy][0]*time_pb/time_pp + mx;
412
        s->mv[0][0][1] = s->motion_val[xy][1]*time_pb/time_pp + my;
413
        s->mv[1][0][0] = mx ? s->mv[0][0][0] - s->motion_val[xy][0]
410
        s->mv[0][0][0] = s->mv[0][1][0] = s->mv[0][2][0] = s->mv[0][3][0] = s->motion_val[xy][0]*time_pb/time_pp + mx;
411
        s->mv[0][0][1] = s->mv[0][1][1] = s->mv[0][2][1] = s->mv[0][3][1] = s->motion_val[xy][1]*time_pb/time_pp + my;
412
        s->mv[1][0][0] = s->mv[1][1][0] = s->mv[1][2][0] = s->mv[1][3][0] = mx ? s->mv[0][0][0] - s->motion_val[xy][0]
414 413
                            : s->motion_val[xy][0]*(time_pb - time_pp)/time_pp;
415
        s->mv[1][0][1] = my ? s->mv[0][0][1] - s->motion_val[xy][1] 
414
        s->mv[1][0][1] = s->mv[1][1][1] = s->mv[1][2][1] = s->mv[1][3][1] = my ? s->mv[0][0][1] - s->motion_val[xy][1] 
416 415
                            : s->motion_val[xy][1]*(time_pb - time_pp)/time_pp;
416
        if((s->avctx->workaround_bugs & FF_BUG_DIRECT_BLOCKSIZE) || !s->quarter_sample)
417
            s->mv_type= MV_TYPE_16X16;
418
        else
419
            s->mv_type= MV_TYPE_8X8;
417 420
        break;
418 421
    case CO_LOCATED_TYPE_4MV:
419 422
        s->mv_type = MV_TYPE_8X8;

Also available in: Unified diff