changeset 760:e858fe220ce0 libavcodec

xvid qpel bug workaround
author michaelni
date Tue, 22 Oct 2002 18:55:20 +0000
parents 21b506d700cc
children 7f4cc2f6d642
files avcodec.h h263dec.c mpegvideo.c
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Sun Oct 20 17:02:41 2002 +0000
+++ b/avcodec.h	Tue Oct 22 18:55:20 2002 +0000
@@ -426,6 +426,7 @@
 #define FF_BUG_UMP4             8
 #define FF_BUG_NO_PADDING       16
 #define FF_BUG_AC_VLC           32
+#define FF_BUG_QPEL_CHROMA      64
 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100%
         
     /**
--- a/h263dec.c	Sun Oct 20 17:02:41 2002 +0000
+++ b/h263dec.c	Tue Oct 22 18:55:20 2002 +0000
@@ -372,6 +372,10 @@
             s->workaround_bugs|= FF_BUG_UMP4;
             s->workaround_bugs|= FF_BUG_AC_VLC;
         }
+
+        if(s->divx_version){
+            s->workaround_bugs|= FF_BUG_QPEL_CHROMA;
+        }
 //printf("padding_bug_score: %d\n", s->padding_bug_score);
 #if 0
         if(s->divx_version==500)
--- a/mpegvideo.c	Sun Oct 20 17:02:41 2002 +0000
+++ b/mpegvideo.c	Tue Oct 22 18:55:20 2002 +0000
@@ -1384,7 +1384,7 @@
     if(field_based){
         mx= motion_x/2;
         my= motion_y>>1;
-    }else if(s->divx_version){
+    }else if(s->workaround_bugs&FF_BUG_QPEL_CHROMA){
         mx= (motion_x>>1)|(motion_x&1);
         my= (motion_y>>1)|(motion_y&1);
     }else{