changeset 1997:7bd3932bc918 libavcodec

AMV bug workaround
author michael
date Fri, 30 Apr 2004 18:56:33 +0000
parents f481d3309ad0
children 5bc1a9ad6c33
files avcodec.h h263.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Fri Apr 30 18:11:34 2004 +0000
+++ b/avcodec.h	Fri Apr 30 18:56:33 2004 +0000
@@ -841,6 +841,7 @@
 #define FF_BUG_XVID_ILACE       4
 #define FF_BUG_UMP4             8
 #define FF_BUG_NO_PADDING       16
+#define FF_BUG_AMV              32
 #define FF_BUG_AC_VLC           0  ///< will be removed, libavcodec can now handle these non compliant files by default
 #define FF_BUG_QPEL_CHROMA      64
 #define FF_BUG_STD_QPEL         128
--- a/h263.c	Fri Apr 30 18:11:34 2004 +0000
+++ b/h263.c	Fri Apr 30 18:56:33 2004 +0000
@@ -3221,6 +3221,9 @@
     int x, y, mb_v, sum, dx, dy, shift;
     int len = 1 << (s->f_code + 4);
     const int a= s->sprite_warping_accuracy;
+    
+    if(s->workaround_bugs & FF_BUG_AMV)
+        len >>= s->quarter_sample;
 
     if(s->real_sprite_warping_points==1){
         if(s->divx_version==500 && s->divx_build==413)