Revision c40c3482

View differences:

libavcodec/avcodec.h
16 16

  
17 17
#define LIBAVCODEC_VERSION_INT 0x000406
18 18
#define LIBAVCODEC_VERSION     "0.4.6"
19
#define LIBAVCODEC_BUILD       4654
20
#define LIBAVCODEC_BUILD_STR   "4654"
19
#define LIBAVCODEC_BUILD       4655
20
#define LIBAVCODEC_BUILD_STR   "4655"
21 21

  
22 22
enum CodecID {
23 23
    CODEC_ID_NONE, 
......
531 531
#define FF_BUG_QPEL_CHROMA      64
532 532
#define FF_BUG_STD_QPEL         128
533 533
#define FF_BUG_QPEL_CHROMA2     256
534
#define FF_BUG_DIRECT_BLOCKSIZE 512
534 535
//#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100%
535 536
        
536 537
    /**
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;
libavcodec/h263dec.c
332 332
    return -1;
333 333
}
334 334

  
335
/**
336
 * draws an line from (ex, ey) -> (sx, sy).
337
 * @param w width of the image
338
 * @param h height of the image
339
 * @param stride stride/linesize of the image
340
 * @param color color of the arrow
341
 */
335 342
static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color){
336 343
    int t, x, y, f;
337 344
    
......
368 375
    }
369 376
}
370 377

  
378
/**
379
 * draws an arrow from (ex, ey) -> (sx, sy).
380
 * @param w width of the image
381
 * @param h height of the image
382
 * @param stride stride/linesize of the image
383
 * @param color color of the arrow
384
 */
371 385
static void draw_arrow(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color){ 
372 386
    int dx= ex - sx;
373 387
    int dy= ey - sy;
......
510 524
        if(s->lavc_build && s->lavc_build<4653)
511 525
            s->workaround_bugs|= FF_BUG_STD_QPEL;
512 526
        
527
        if(s->lavc_build && s->lavc_build<4655)
528
            s->workaround_bugs|= FF_BUG_DIRECT_BLOCKSIZE;
529

  
530
        if(s->divx_version)
531
            s->workaround_bugs|= FF_BUG_DIRECT_BLOCKSIZE;
513 532
//printf("padding_bug_score: %d\n", s->padding_bug_score);
514 533
#if 0
515 534
        if(s->divx_version==500)
libavcodec/motion_est.c
241 241
        int fxy= (fx&3) + 4*(fy&3);\
242 242
        int bxy= (bx&3) + 4*(by&3);\
243 243
\
244
        qpel_put[0][fxy](s->me.scratchpad, (ref_y ) + (fx>>2) + (fy>>2)*(stride), stride);\
245
        qpel_avg[0][bxy](s->me.scratchpad, (ref2_y) + (bx>>2) + (by>>2)*(stride), stride);\
244
        qpel_put[1][fxy](s->me.scratchpad               , (ref_y ) + (fx>>2) + (fy>>2)*(stride)               , stride);\
245
        qpel_put[1][fxy](s->me.scratchpad + 8           , (ref_y ) + (fx>>2) + (fy>>2)*(stride) + 8           , stride);\
246
        qpel_put[1][fxy](s->me.scratchpad     + 8*stride, (ref_y ) + (fx>>2) + (fy>>2)*(stride)     + 8*stride, stride);\
247
        qpel_put[1][fxy](s->me.scratchpad + 8 + 8*stride, (ref_y ) + (fx>>2) + (fy>>2)*(stride) + 8 + 8*stride, stride);\
248
        qpel_avg[1][bxy](s->me.scratchpad               , (ref2_y) + (bx>>2) + (by>>2)*(stride)               , stride);\
249
        qpel_avg[1][bxy](s->me.scratchpad + 8           , (ref2_y) + (bx>>2) + (by>>2)*(stride) + 8           , stride);\
250
        qpel_avg[1][bxy](s->me.scratchpad     + 8*stride, (ref2_y) + (bx>>2) + (by>>2)*(stride)     + 8*stride, stride);\
251
        qpel_avg[1][bxy](s->me.scratchpad + 8 + 8*stride, (ref2_y) + (bx>>2) + (by>>2)*(stride) + 8 + 8*stride, stride);\
246 252
    }\
247 253
    d = cmp_func(s, s->me.scratchpad, src_y, stride);\
248 254
}else\

Also available in: Unified diff