[FFmpeg-soc] [soc]: r1308 - dirac/libavcodec/dirac.c

marco subversion at mplayerhq.hu
Sun Sep 9 12:47:54 CEST 2007


Author: marco
Date: Sun Sep  9 12:47:54 2007
New Revision: 1308

Log:
generate ME data for testing

Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Sun Sep  9 12:47:54 2007
@@ -3405,6 +3405,22 @@ static int dirac_encode_blockdata(DiracC
 
     /* XXX: Fill the Motion Vectors with semi-random data for
        testing.  */
+    for (x = 0; x < s->blwidth; x++) {
+        for (y = 0; y < s->blwidth; y++) {
+            struct dirac_blockmotion *bl = &s->blmotion[y * s->blwidth + x];
+
+            bl->use_ref = (x + y) % 4;
+            bl->vect[0][0] = (y % 18) - 9;
+            bl->vect[0][1] = (x % 18) - 9;
+            bl->vect[1][0] = (y % 7)  - 5;
+            bl->vect[1][1] = (x % 7)  - 5;
+            if (!bl->use_ref) {
+                bl->dc[0] = x - y;
+                bl->dc[1] = x + y;
+                bl->dc[2] = x * y;
+            }
+        }
+    }
 
     /* Superblock splitmodes.  XXX: Just (for now) encode "2", so that
        blocks are not split at all.  */



More information about the FFmpeg-soc mailing list