Index: soft/giet_vm/applications/rosenfeld/nrc2/include/nrmem2xx.h
===================================================================
--- soft/giet_vm/applications/rosenfeld/nrc2/include/nrmem2xx.h	(revision 772)
+++ soft/giet_vm/applications/rosenfeld/nrc2/include/nrmem2xx.h	(revision 826)
@@ -8,124 +8,45 @@
 #define _NRMEM2XX_H_
 
-#ifdef __cplusplus
-#ifdef PRAGMA_VERBOSE
-#pragma message ("C++")
-#endif
-extern "C" {
-#endif
 
 /* ----------------------- */
 /* -- Rotation and Flip -- */
 /* ----------------------- */
+
 // no check performed on size, S and D must be different
-IMAGE_EXPORT(void) lrotate_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch, byte   **D);
-IMAGE_EXPORT(void) lrotate_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch, short  **D);
-IMAGE_EXPORT(void) lrotate_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch, ushort **D);
-IMAGE_EXPORT(void) lrotate_si16matrix(sint16 **S, long nrl,long nrh,long ncl, long nch, sint16 **D);
-IMAGE_EXPORT(void) lrotate_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch, uint16 **D);
-IMAGE_EXPORT(void) lrotate_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch, int    **D);
-IMAGE_EXPORT(void) lrotate_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch, uint   **D);
-IMAGE_EXPORT(void) lrotate_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch, int32  **D);
-IMAGE_EXPORT(void) lrotate_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch, uint32 **D);
-IMAGE_EXPORT(void) lrotate_matrix    (float  **S, long nrl,long nrh,long ncl, long nch, float  **D);
-IMAGE_EXPORT(void) lrotate_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch, double **D);
-IMAGE_EXPORT(void) lrotate_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch, rgb8   **D);
 
-IMAGE_EXPORT(void) rrotate_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch, byte   **D);
-IMAGE_EXPORT(void) rrotate_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch, short  **D);
-IMAGE_EXPORT(void) rrotate_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch, ushort **D);
-IMAGE_EXPORT(void) rrotate_si16matrix(sint16 **S, long nrl,long nrh,long ncl, long nch, sint16 **D);
-IMAGE_EXPORT(void) rrotate_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch, uint16 **D);
-IMAGE_EXPORT(void) rrotate_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch, int    **D);
-IMAGE_EXPORT(void) rrotate_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch, uint   **D);
-IMAGE_EXPORT(void) rrotate_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch, int32  **D);
-IMAGE_EXPORT(void) rrotate_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch, uint32 **D);
-IMAGE_EXPORT(void) rrotate_matrix    (float  **S, long nrl,long nrh,long ncl, long nch, float  **D);
-IMAGE_EXPORT(void) rrotate_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch, double **D);
-IMAGE_EXPORT(void) rrotate_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch, rgb8   **D);
 
-IMAGE_EXPORT(void) lrotate1_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_si16matrix(sint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_matrix    (float  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) lrotate1_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch);
+#define rotate_flip_type_matrix(t) \
+void short_name(t,lrotate_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** D); \
+void short_name(t,rrotate_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** D); \
+void short_name(t,lrotate1_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \
+void short_name(t,rrotate1_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \
+void short_name(t,hflip_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** D); \
+void short_name(t,vflip_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** D); \
+void short_name(t,hflip1_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \
+void short_name(t,vflip1_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch);
 
-IMAGE_EXPORT(void) rrotate1_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_si16matrix(sint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_matrix    (float  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) rrotate1_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch);
+rotate_flip_type_matrix(int8_t);
+rotate_flip_type_matrix(uint8_t);
+rotate_flip_type_matrix(int16_t);
+rotate_flip_type_matrix(uint16_t);
+rotate_flip_type_matrix(int32_t);
+rotate_flip_type_matrix(uint32_t);
+rotate_flip_type_matrix(int64_t);
+rotate_flip_type_matrix(uint64_t);
+rotate_flip_type_matrix(float);
+rotate_flip_type_matrix(double);
+rotate_flip_type_matrix(rgb8);
+rotate_flip_type_matrix(rgbx8);
 
-IMAGE_EXPORT(void) hflip_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch, byte   **D);
-IMAGE_EXPORT(void) hflip_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch, short  **D);
-IMAGE_EXPORT(void) hflip_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch, ushort **D);
-IMAGE_EXPORT(void) hflip_i16matrix (int16  **S, long nrl,long nrh,long ncl, long nch, int16  **D);
-IMAGE_EXPORT(void) hflip_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch, uint16 **D);
-IMAGE_EXPORT(void) hflip_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch, int    **D);
-IMAGE_EXPORT(void) hflip_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch, uint   **D);
-IMAGE_EXPORT(void) hflip_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch, int32  **D);
-IMAGE_EXPORT(void) hflip_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch, uint32 **D);
-IMAGE_EXPORT(void) hflip_matrix    (float  **S, long nrl,long nrh,long ncl, long nch, float  **D);
-IMAGE_EXPORT(void) hflip_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch, double **D);
-IMAGE_EXPORT(void) hflip_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch, rgb8   **D);
 
-IMAGE_EXPORT(void) vflip_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch, byte   **D);
-IMAGE_EXPORT(void) vflip_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch, short  **D);
-IMAGE_EXPORT(void) vflip_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch, ushort **D);
-IMAGE_EXPORT(void) vflip_si16matrix(sint16 **S, long nrl,long nrh,long ncl, long nch, int16  **D);
-IMAGE_EXPORT(void) vflip_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch, uint16 **D);
-IMAGE_EXPORT(void) vflip_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch, int    **D);
-IMAGE_EXPORT(void) vflip_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch, uint   **D);
-IMAGE_EXPORT(void) vflip_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch, int32  **D);
-IMAGE_EXPORT(void) vflip_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch, uint32 **D);
-IMAGE_EXPORT(void) vflip_matrix    (float  **S, long nrl,long nrh,long ncl, long nch, float  **D);
-IMAGE_EXPORT(void) vflip_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch, double **D);
-IMAGE_EXPORT(void) vflip_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch, rgb8   **D);
+#endif /* _NRMEM2XX_H_ */
 
-IMAGE_EXPORT(void) hflip1_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_si16matrix(sint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_matrix    (float  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) hflip1_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch);
+// Local Variables:
+// tab-width: 4
+// c-basic-offset: 4
+// c-file-offsets:((innamespace . 0)(inline-open . 0))
+// indent-tabs-mode: nil
+// End:
 
-IMAGE_EXPORT(void) vflip1_bmatrix   (byte   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_smatrix   (short  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_usmatrix  (ushort **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_si16matrix(sint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_ui16matrix(uint16 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_imatrix   (int    **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_uimatrix  (uint   **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_i32matrix (int32  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_ui32matrix(uint32 **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_matrix    (float  **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_dmatrix   (double **S, long nrl,long nrh,long ncl, long nch);
-IMAGE_EXPORT(void) vflip1_rgb8matrix(rgb8   **S, long nrl,long nrh,long ncl, long nch);
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
 
-#ifdef __cplusplus
-}
-#endif
-
-#else
-//#pragma message(" Warning : attemp to re-include nrmem2x.h")
-#endif /* _NRMEM2XX_H_ */
