Author: j16sdiz
Date: 2009-04-18 17:11:05 +0000 (Sat, 18 Apr 2009)
New Revision: 26998

Modified:
   trunk/contrib/fec/src/com/onionnetworks/fec/Native8Code.java
   trunk/contrib/fec/src/csrc/fec.c
   trunk/contrib/fec/src/csrc/fec8-jinterf.c
Log:
FEC debug code for Tommy[D]

Modified: trunk/contrib/fec/src/com/onionnetworks/fec/Native8Code.java
===================================================================
--- trunk/contrib/fec/src/com/onionnetworks/fec/Native8Code.java        
2009-04-18 17:08:29 UTC (rev 26997)
+++ trunk/contrib/fec/src/com/onionnetworks/fec/Native8Code.java        
2009-04-18 17:11:05 UTC (rev 26998)
@@ -36,6 +36,7 @@
                synchronized(Native8Code.class) {
                        code = nativeNewFEC(k,n);
                }
+               System.out.println("java-new code = " + code);
     }
 
     protected void encode(byte[][] src, int[] srcOff, byte[][] repair, 
@@ -51,6 +52,7 @@
         if (!inOrder) {
             shuffle(pkts,pktsOff,index,k);
         }
+               System.out.println("java-decode code = " + code);
         nativeDecode(code,pkts,pktsOff,index,k,packetLength);
     }
 

Modified: trunk/contrib/fec/src/csrc/fec.c
===================================================================
--- trunk/contrib/fec/src/csrc/fec.c    2009-04-18 17:08:29 UTC (rev 26997)
+++ trunk/contrib/fec/src/csrc/fec.c    2009-04-18 17:11:05 UTC (rev 26998)
@@ -607,6 +607,7 @@
 void
 fec_free(struct fec_parms *p)
 {
+       fprintf(stderr, "-- fec - free %p\n", p);
     if (p==NULL ||
        p->magic != ( ( (FEC_MAGIC ^ p->k) ^ p->n) ^ (long)(p->enc_matrix)) ) {
        fprintf(stderr, "bad parameters to fec_free\n");
@@ -674,6 +675,7 @@
     DDB(fprintf(stderr, "--- %ld us to build encoding matrix\n",
            ticks[3]);)
     DEB(pr_matrix(retval->enc_matrix, n, k, "encoding_matrix");)
+       fprintf(stderr, "-- fec - code %p\n", retval);
     return retval ;
 }
 
@@ -792,6 +794,7 @@
 int
 fec_decode(struct fec_parms *code, gf *pkt[], int index[], int sz)
 {
+       fprintf(stderr, "-- fec - decode %p\n", code);
     gf *m_dec ; 
     gf **new_pkt ;
     int row, col , k = code->k ;

Modified: trunk/contrib/fec/src/csrc/fec8-jinterf.c
===================================================================
--- trunk/contrib/fec/src/csrc/fec8-jinterf.c   2009-04-18 17:08:29 UTC (rev 
26997)
+++ trunk/contrib/fec/src/csrc/fec8-jinterf.c   2009-04-18 17:11:05 UTC (rev 
26998)
@@ -125,6 +125,7 @@
     Java_com_onionnetworks_fec_Native8Code_nativeDecode
     (JNIEnv *env, jobject obj, jlong code, jobjectArray data, jintArray 
dataOff,
      jintArray whichdata, jint k, jint packetLength) {
+       fprintf(stderr, "Java_com_onionnetworks_fec_Native8Code_nativeDecode 
code = %p\n", code);
 
     jint *localWhich, *localDataOff;
        jbyteArray *inArr;
@@ -192,8 +193,10 @@
     (JNIEnv * env, jobject obj, jint k, jint n) {
     
     // uintptr_t is needed for systems where sizeof(void*) < sizeof(long)
-    return (long)(uintptr_t)fec_new(k,n);
+    long code = (long)(uintptr_t)fec_new(k,n);
 
+       fprintf(stderr, "Java_com_onionnetworks_fec_Native8Code_nativeNewFEC 
code = %p\n", code);
+       return code;
 }
 
 JNIEXPORT void JNICALL

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to