Revision 9b6a5b87

View differences:

libavcodec/h263dec.c
301 301
        return 0;
302 302
    }
303 303

  
304
    fprintf(stderr, "slice end not reached but screenspace end (%d left %06X)\n", 
304
    fprintf(stderr, "slice end not reached but screenspace end (%d left %06X, score= %d)\n", 
305 305
            s->gb.size_in_bits - get_bits_count(&s->gb),
306
            show_bits(&s->gb, 24));
306
            show_bits(&s->gb, 24), s->padding_bug_score);
307 307
            
308 308
    ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
309 309

  
......
480 480
    }
481 481
    
482 482
    avctx->has_b_frames= !s->low_delay;
483
    
484
    if(s->xvid_build==0 && s->divx_version==0 && s->lavc_build==0){
485
        if(s->avctx->codec_tag == ff_get_fourcc("XVID") || s->avctx->codec_tag == ff_get_fourcc("XVIX"))
486
            s->xvid_build= -1;
487

  
488
        if(s->avctx->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==0)
489
            s->divx_version= 400; //divx 4
490
    }
483 491

  
484 492
    if(s->workaround_bugs&FF_BUG_AUTODETECT){
485
        if(s->padding_bug_score > -2 && !s->data_partitioning && !s->resync_marker)
493
        s->workaround_bugs &= ~FF_BUG_NO_PADDING;
494
        
495
        if(s->padding_bug_score > -2 && !s->data_partitioning && (s->divx_version || !s->resync_marker))
486 496
            s->workaround_bugs |=  FF_BUG_NO_PADDING;
487
        else
488
            s->workaround_bugs &= ~FF_BUG_NO_PADDING;
489 497

  
490 498
        if(s->avctx->codec_tag == ff_get_fourcc("XVIX")) 
491 499
            s->workaround_bugs|= FF_BUG_XVID_ILACE;
492
#if 0
493
        if(s->avctx->codec_tag == ff_get_fourcc("MP4S")) 
494
            s->workaround_bugs|= FF_BUG_AC_VLC;
495
        
496
        if(s->avctx->codec_tag == ff_get_fourcc("M4S2")) 
497
            s->workaround_bugs|= FF_BUG_AC_VLC;
498
#endif
500

  
499 501
        if(s->avctx->codec_tag == ff_get_fourcc("UMP4")){
500 502
            s->workaround_bugs|= FF_BUG_UMP4;
501 503
            s->workaround_bugs|= FF_BUG_AC_VLC;
502 504
        }
503 505

  
504
        if(s->divx_version){
506
        if(s->divx_version>=500){
505 507
            s->workaround_bugs|= FF_BUG_QPEL_CHROMA;
506 508
        }
507 509

  
......
509 511
            s->workaround_bugs|= FF_BUG_QPEL_CHROMA2;
510 512
        }
511 513

  
512
        if(s->avctx->codec_tag == ff_get_fourcc("XVID") && s->xvid_build==0)
513
            s->workaround_bugs|= FF_BUG_QPEL_CHROMA;
514
        
515
        if(s->avctx->codec_tag == ff_get_fourcc("XVID") && s->xvid_build==0)
516
            s->padding_bug_score= 256*256*256*64;
517
        
518 514
        if(s->xvid_build && s->xvid_build<=3)
519 515
            s->padding_bug_score= 256*256*256*64;
520 516
        
521 517
        if(s->xvid_build && s->xvid_build<=1)
522 518
            s->workaround_bugs|= FF_BUG_QPEL_CHROMA;
523 519

  
520
        if(s->xvid_build && s->xvid_build<=12)
521
            s->workaround_bugs|= FF_BUG_EDGE;
522

  
524 523
#define SET_QPEL_FUNC(postfix1, postfix2) \
525 524
    s->dsp.put_ ## postfix1 = ff_put_ ## postfix2;\
526 525
    s->dsp.put_no_rnd_ ## postfix1 = ff_put_no_rnd_ ## postfix2;\
......
546 545
            s->workaround_bugs|= FF_BUG_EDGE;
547 546
        }
548 547
        
549
        if(s->avctx->codec_tag == ff_get_fourcc("DIVX") && s->divx_version==0 && s->lavc_build==0 && s->xvid_build==0 && s->vo_type==0 && s->vol_control_parameters==0 && s->low_delay)
550
            s->workaround_bugs|= FF_BUG_EDGE;
551

  
552 548
#if 0
553 549
        if(s->divx_version==500)
554 550
            s->padding_bug_score= 256*256*256*64;

Also available in: Unified diff