]> git.sesse.net Git - ffmpeg/commitdiff
Correctly detect when use hpel or qpel mode
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 3 Jul 2006 17:22:18 +0000 (17:22 +0000)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 3 Jul 2006 17:22:18 +0000 (17:22 +0000)
Originally committed as revision 5601 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/vc1.c

index 047cdeec2b10b97d5c64b6bf5c602aec8f4a8aa9..eec0efc14c215093e7fc521fc9d02389747f018c 100644 (file)
@@ -1330,7 +1330,12 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
         }
         if(v->mv_mode == MV_PMODE_1MV_HPEL || v->mv_mode == MV_PMODE_1MV_HPEL_BILIN)
             v->s.quarter_sample = 0;
-        else
+        else if(v->mv_mode == MV_PMODE_INTENSITY_COMP) {
+            if(v->mv_mode2 == MV_PMODE_1MV_HPEL || v->mv_mode2 == MV_PMODE_1MV_HPEL_BILIN)
+                v->s.quarter_sample = 0;
+            else
+                v->s.quarter_sample = 1;
+        } else
             v->s.quarter_sample = 1;
 
         if ((v->mv_mode == MV_PMODE_INTENSITY_COMP &&