[SCM] libav/experimental: Zero MV vectors for P frame intra blocks

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:57:58 UTC 2013


The following commit has been merged in the experimental branch:
commit 9a44385e1a640693a7f636ffa44b53152433e8e7
Author: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:   Sun Mar 18 18:07:27 2007 +0000

    Zero MV vectors for P frame intra blocks
    
    Originally committed as revision 8440 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 240ddae..eac9236 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1068,8 +1068,11 @@ static void vc1_mc_4mv_chroma(VC1Context *v)
         for(i= t1+1; i<4; i++)if(!intra[i]) {t2 = i; break;}
         tx = (mvx[t1] + mvx[t2]) / 2;
         ty = (mvy[t1] + mvy[t2]) / 2;
-    } else
+    } else {
+        s->current_picture.motion_val[1][s->block_index[0]][0] = 0;
+        s->current_picture.motion_val[1][s->block_index[0]][1] = 0;
         return; //no need to do MC for inter blocks
+    }
 
     s->current_picture.motion_val[1][s->block_index[0]][0] = tx;
     s->current_picture.motion_val[1][s->block_index[0]][1] = ty;
@@ -2004,6 +2007,8 @@ static inline void vc1_pred_mv(MpegEncContext *s, int n, int dmv_x, int dmv_y, i
     if(s->mb_intra){
         s->mv[0][n][0] = s->current_picture.motion_val[0][xy][0] = 0;
         s->mv[0][n][1] = s->current_picture.motion_val[0][xy][1] = 0;
+        s->current_picture.motion_val[1][xy][0] = 0;
+        s->current_picture.motion_val[1][xy][1] = 0;
         if(mv1) { /* duplicate motion data for 1-MV block */
             s->current_picture.motion_val[0][xy + 1][0] = 0;
             s->current_picture.motion_val[0][xy + 1][1] = 0;
@@ -2011,6 +2016,12 @@ static inline void vc1_pred_mv(MpegEncContext *s, int n, int dmv_x, int dmv_y, i
             s->current_picture.motion_val[0][xy + wrap][1] = 0;
             s->current_picture.motion_val[0][xy + wrap + 1][0] = 0;
             s->current_picture.motion_val[0][xy + wrap + 1][1] = 0;
+            s->current_picture.motion_val[1][xy + 1][0] = 0;
+            s->current_picture.motion_val[1][xy + 1][1] = 0;
+            s->current_picture.motion_val[1][xy + wrap][0] = 0;
+            s->current_picture.motion_val[1][xy + wrap][1] = 0;
+            s->current_picture.motion_val[1][xy + wrap + 1][0] = 0;
+            s->current_picture.motion_val[1][xy + wrap + 1][1] = 0;
         }
         return;
     }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list