Hi,

Please find attached a patch which should solve the problem. It's
untested on a 64bit machine however. Feel free to test and report the
result.

Thanks,

Peter (p2).
diff -ruN orig/opencv-0.9.6/tests/cv/src/apyramids.cpp 
opencv-0.9.6/tests/cv/src/apyramids.cpp
--- orig/opencv-0.9.6/tests/cv/src/apyramids.cpp        2005-08-11 
00:27:36.000000000 +0100
+++ opencv-0.9.6/tests/cv/src/apyramids.cpp     2005-08-10 23:54:45.000000000 
+0100
@@ -186,7 +186,7 @@
     const int   r = 2;
     int         code = TRS_OK;
 
-    int         param = (int)arg;
+    int         param = ((int *)arg)[0];
     int         depth = param/2 != 0 ? IPL_DEPTH_32F : IPL_DEPTH_8U;
     int         channels = param % 2 == 1 ? 3 : 1;
 
@@ -318,7 +318,7 @@
     const int   r = 2;
     int         code = TRS_OK;
 
-    int         param = (int)arg;
+    int         param = ((int *)arg)[0];
     int         depth = param/2 != 0 ? IPL_DEPTH_32F : IPL_DEPTH_8U;
     int         channels = param % 2 == 1 ? 3 : 1;
 
@@ -448,10 +448,10 @@
     }
 }
 
-#define _8U_C1    0
-#define _8U_C3    1
-#define _32F_C1   2
-#define _32F_C3   3
+#define _8U_C1    (int []) { 0 }
+#define _8U_C3    (int []) { 1 }
+#define _32F_C1   (int []) { 2 }
+#define _32F_C3   (int []) { 3 }
 
 void InitAPyramids( void )
 {

Attachment: signature.asc
Description: Digital signature

Reply via email to