source: soft/giet_vm/applications/rosenfeld/nrc2/include/nrmem2x.h @ 792

Last change on this file since 792 was 772, checked in by meunier, 9 years ago
  • Ajout de l'application rosenfeld
  • Changement du nom du flag O_CREATE en O_CREAT
File size: 9.7 KB
Line 
1/* ----------------- */
2/* --- nrmem2x.h --- */
3/* ----------------- */
4
5/*
6 * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved
7 * Univ Paris Sud XI, CNRS
8*
9*/
10
11#ifndef _NRMEM2X_H_
12#define _NRMEM2X_H_
13
14#ifdef __cplusplus
15#ifdef PRAGMA_VERBOSE
16#pragma message ("C++")
17#endif
18extern "C" {
19#endif
20
21/* ------------------------------------------ */
22/* --- ATTENTION ---------------------------- */
23/* ------------------------------------------ */
24/* l'utilisation des fonctions endline        */
25/* necessite l'allocation d'une ligne de plus */
26/* (a cause du m[i+1]                         */
27/* ------------------------------------------ */
28
29IMAGE_EXPORT(void) reset_endline_bmatrix   (byte   **m, long nrl, long nrh, long ncl, long nch);
30IMAGE_EXPORT(void) reset_endline_i16matrix (int16  **m, long nrl, long nrh, long ncl, long nch);
31IMAGE_EXPORT(void) reset_endline_ui16matrix(uint16 **m, long nrl, long nrh, long ncl, long nch);
32IMAGE_EXPORT(void) reset_endline_imatrix   (int    **m, long nrl, long nrh, long ncl, long nch);
33IMAGE_EXPORT(void) reset_endline_i32matrix (int32  **m, long nrl, long nrh, long ncl, long nch);
34IMAGE_EXPORT(void) reset_endline_ui32matrix(uint32 **m, long nrl, long nrh, long ncl, long nch);
35IMAGE_EXPORT(void) reset_endline_i64matrix (int64  **m, long nrl, long nrh, long ncl, long nch);
36
37IMAGE_EXPORT(void) endline_bmatrix   (byte   **m, long i, long l);
38IMAGE_EXPORT(void) endline_i16matrix (int16  **m, long i, long l);
39IMAGE_EXPORT(void) endline_ui16matrix(uint16 **m, long i, long l);
40IMAGE_EXPORT(void) endline_imatrix   (int    **m, long i, long l);
41IMAGE_EXPORT(void) endline_i32matrix (int32  **m, long i, long l);
42IMAGE_EXPORT(void) endline_ui32matrix(uint32 **m, long i, long l);
43IMAGE_EXPORT(void) endline_i64matrix (int64  **m, long i, long l);
44
45IMAGE_EXPORT(void) endline0_bmatrix   (byte   **m, long i, long l, long ncl);
46IMAGE_EXPORT(void) endline0_i16matrix (int16  **m, long i, long l, long ncl);
47IMAGE_EXPORT(void) endline0_ui16matrix(uint16 **m, long i, long l, long ncl);
48IMAGE_EXPORT(void) endline0_imatrix   (int    **m, long i, long l, long ncl);
49IMAGE_EXPORT(void) endline0_i32matrix (int32  **m, long i, long l, long ncl);
50IMAGE_EXPORT(void) endline0_ui32matrix(uint32 **m, long i, long l, long ncl);
51IMAGE_EXPORT(void) endline0_i64matrix (int64  **m, long i, long l, long ncl);
52
53IMAGE_EXPORT(void) endline1_bmatrix   (byte   **m, long i, long l, long ncl);
54IMAGE_EXPORT(void) endline1_i16matrix (int16  **m, long i, long l, long ncl);
55IMAGE_EXPORT(void) endline1_ui16matrix(uint16 **m, long i, long l, long ncl);
56IMAGE_EXPORT(void) endline1_imatrix   (int    **m, long i, long l, long ncl);
57IMAGE_EXPORT(void) endline1_i32matrix (int32  **m, long i, long l, long ncl);
58IMAGE_EXPORT(void) endline1_ui32matrix(uint32 **m, long i, long l, long ncl);
59IMAGE_EXPORT(void) endline1_i64matrix (int64  **m, long i, long l, long ncl);
60
61IMAGE_EXPORT(void) resize_si16Pmatrix(si16Point **m, long nrl, long nrh, long ncl, long nch);
62IMAGE_EXPORT(void) resize_ui16Pmatrix(ui16Point **m, long nrl, long nrh, long ncl, long nch);
63IMAGE_EXPORT(void) resize_si32Pmatrix(si32Point **m, long nrl, long nrh, long ncl, long nch);
64IMAGE_EXPORT(void) resize_ui32Pmatrix(ui32Point **m, long nrl, long nrh, long ncl, long nch);
65IMAGE_EXPORT(void) resize_f32Pmatrix(f32Point   **m, long nrl, long nrh, long ncl, long nch);
66
67// Triplet Matrix
68IMAGE_EXPORT(void) resize_si16Tmatrix(si16Triplet **m, long nrl, long nrh, long ncl, long nch);
69IMAGE_EXPORT(void) resize_ui16Tmatrix(ui16Triplet **m, long nrl, long nrh, long ncl, long nch);
70IMAGE_EXPORT(void) resize_si32Tmatrix(si32Triplet **m, long nrl, long nrh, long ncl, long nch);
71IMAGE_EXPORT(void) resize_ui32Tmatrix(ui32Triplet **m, long nrl, long nrh, long ncl, long nch);
72IMAGE_EXPORT(void) resize_f32Tmatrix (f32Triplet  **m, long nrl, long nrh, long ncl, long nch);
73
74
75
76
77/*
78 * --------------
79 * matrix_reverse
80 * --------------
81 */
82
83//IMAGE_EXPORT(void) bmatrix_reverse (byte   **m, long nrl, long nrh, long ncl, long nch);
84//IMAGE_EXPORT(void) si16matrix_reverse (sint16   **m, long nrl, long nrh, long ncl, long nch);
85//IMAGE_EXPORT(void) usmatrix_reverse(uint16 **m, long nrl, long nrh, long ncl, long nch);
86
87/* copie */
88IMAGE_EXPORT(void) copyc_bmatrix(byte **src,long nrl,long nrh,long ncl, long nch, byte **cond, byte c, byte **dst);
89
90IMAGE_EXPORT(void) complete_border_bmatrix (byte **m, long nrl,long nrh,long ncl, long nch, long n);
91IMAGE_EXPORT(void) complete_border1_bmatrix(byte **m, long nrl,long nrh,long ncl, long nch);
92IMAGE_EXPORT(void) complete_border2_bmatrix(byte **m, long nrl,long nrh,long ncl, long nch);
93
94IMAGE_EXPORT(void) copy1c_bmatrix    (byte    **X, long nc, byte    **Y, long nrl, long nrh, long ncl, long nch);
95IMAGE_EXPORT(void) copy1c_si16matrix (sint16  **X, long nc, sint16  **Y, long nrl, long nrh, long ncl, long nch);
96IMAGE_EXPORT(void) copy1c_ui16matrix (uint16  **X, long nc, uint16  **Y, long nrl, long nrh, long ncl, long nch);
97IMAGE_EXPORT(void) copy1c_si32matrix (sint32  **X, long nc, sint32  **Y, long nrl, long nrh, long ncl, long nch);
98IMAGE_EXPORT(void) copy1c_ui32matrix (uint32  **X, long nc, uint32  **Y, long nrl, long nrh, long ncl, long nch);
99IMAGE_EXPORT(void) copy1c_f32matrix  (float32 **X, long nc, float32 **Y, long nrl, long nrh, long ncl, long nch);
100IMAGE_EXPORT(void) copy1c_f64matrix  (float64 **X, long nc, float64 **Y, long nrl, long nrh, long ncl, long nch);
101IMAGE_EXPORT(void) copy1c_rgb8matrix (rgb8    **X, long nc, rgb8    **Y, long nrl, long nrh, long ncl, long nch);
102IMAGE_EXPORT(void) copy1c_rgbx8matrix(rgbx8   **X, long nc, rgbx8   **Y, long nrl, long nrh, long ncl, long nch);
103
104/*
105 * copie dans src->dst si la condition est remplie
106 * dst(i,j) = src(i,j) si cond(i,j) == c
107 */
108/*
109IMAGE_EXPORT(void) copy1r_bmatrix    (byte   **X, long nr, byte   **Y, long nrl, long nrh, long ncl, long nch);
110IMAGE_EXPORT(void) copy1r_smatrix    (sint16   **X, long nr, sint16   **Y, long nrl, long nrh, long ncl, long nch);
111IMAGE_EXPORT(void) copy1r_usmatrix   (uint16 **X, long nr, uint16 **Y, long nrl, long nrh, long ncl, long nch);
112IMAGE_EXPORT(void) copy1r_imatrix    (int    **X, long nr, int    **Y, long nrl, long nrh, long ncl, long nch);
113IMAGE_EXPORT(void) copy1r_uimatrix   (uint   **X, long nr, uint   **Y, long nrl, long nrh, long ncl, long nch);
114IMAGE_EXPORT(void) copy1r_matrix     (float  **X, long nr, float  **Y, long nrl, long nrh, long ncl, long nch);
115IMAGE_EXPORT(void) copy1r_dmatrix    (double **X, long nr, double **Y, long nrl, long nrh, long ncl, long nch);
116IMAGE_EXPORT(void) copy1r_rgb8matrix (rgb8   **X, long nr, rgb8   **Y, long nrl, long nrh, long ncl, long nch);
117IMAGE_EXPORT(void) copy1r_rgbx8matrix(rgbx8  **X, long nr, rgbx8  **Y, long nrl, long nrh, long ncl, long nch);
118
119IMAGE_EXPORT(void) copy_bmatrix    (byte   **m1, long nrl1,long nrh1,long ncl1, long nch1, byte   **m2, long nrl2, long nrh2, long ncl2, long nch2);
120IMAGE_EXPORT(void) copy_smatrix    (sint16   **m1, long nrl1,long nrh1,long ncl1, long nch1, sint16   **m2, long nrl2, long nrh2, long ncl2, long nch2);
121IMAGE_EXPORT(void) copy_usmatrix   (uint16 **m1, long nrl1,long nrh1,long ncl1, long nch1, uint16 **m2, long nrl2, long nrh2, long ncl2, long nch2);
122IMAGE_EXPORT(void) copy_imatrix    (int    **m1, long nrl1,long nrh1,long ncl1, long nch1, int    **m2, long nrl2, long nrh2, long ncl2, long nch2);
123IMAGE_EXPORT(void) copy_uimatrix   (uint   **m1, long nrl1,long nrh1,long ncl1, long nch1, uint   **m2, long nrl2, long nrh2, long ncl2, long nch2);
124IMAGE_EXPORT(void) copy_matrix     (float  **m1, long nrl1,long nrh1,long ncl1, long nch1, float  **m2, long nrl2, long nrh2, long ncl2, long nch2);
125IMAGE_EXPORT(void) copy_dmatrix    (double **m1, long nrl1,long nrh1,long ncl1, long nch1, double **m2, long nrl2, long nrh2, long ncl2, long nch2);
126IMAGE_EXPORT(void) copy_rgb8matrix (rgb8   **m1, long nrl1,long nrh1,long ncl1, long nch1, rgb8   **m2, long nrl2, long nrh2, long ncl2, long nch2);
127IMAGE_EXPORT(void) copy_rgbx8matrix(rgbx8  **m1, long nrl1,long nrh1,long ncl1, long nch1, rgbx8  **m2, long nrl2, long nrh2, long ncl2, long nch2);
128
129IMAGE_EXPORT(void) copy_sub_bmatrix(byte **src, long nrl,long nrh,long ncl, long nch, byte **dst);
130
131IMAGE_EXPORT(void) extract_bmatrix (byte   **src, long nrl,long nrh,long ncl, long nch, byte   **dst);
132IMAGE_EXPORT(void) extract_smatrix (sint16   **src, long nrl,long nrh,long ncl, long nch, sint16   **dst);
133IMAGE_EXPORT(void) extract_usmatrix(uint16 **src, long nrl,long nrh,long ncl, long nch, uint16 **dst);
134IMAGE_EXPORT(void) extract_imatrix (int    **src, long nrl,long nrh,long ncl, long nch, int    **dst);
135IMAGE_EXPORT(void) extract_uimatrix(uint   **src, long nrl,long nrh,long ncl, long nch, uint   **dst);
136IMAGE_EXPORT(void) extract_matrix  (float  **src, long nrl,long nrh,long ncl, long nch, float  **dst);
137IMAGE_EXPORT(void) extract_dmatrix (double **src, long nrl,long nrh,long ncl, long nch, double **dst);
138*/
139IMAGE_EXPORT(void) copy_center_bmatrix(byte **src, long nrl0,long nrh0,long ncl0, long nch0, byte **dst, long nrl1,long nrh1,long ncl1, long nch1);
140
141IMAGE_EXPORT(void) copy_sub_imatrix(int  **src, long nrl,long nrh,long ncl, long nch, int **dst);
142
143IMAGE_EXPORT(void) copy_sub_imatrix_index(int **src, long nrl,long nrh, long ncl, long nch, int **dst,int *index);
144
145/* --------------------- */
146/* --- De-Interleave --- */
147/* --------------------- */
148
149IMAGE_EXPORT(void) desinterlace_bmatrix   (byte **S, long nrl, long nrh, long ncl, long nch, byte **D0, byte **D1);
150IMAGE_EXPORT(void) desinterlace_rgb8matrix(rgb8 **S, long nrl, long nrh, long ncl, long nch, rgb8 **D0, rgb8 **D1);
151
152IMAGE_EXPORT(void) interlace_bmatrix   (byte **S0, long nrl, long nrh, long ncl, long nch, byte **S1, byte **D);
153IMAGE_EXPORT(void) interlace_rgb8matrix(rgb8 **S0, long nrl, long nrh, long ncl, long nch, rgb8 **S1, rgb8 **D);
154
155
156#ifdef __cplusplus
157}
158#endif
159
160#else
161//#pragma message(" Warning : attemp to re-include nrmem2x.h")
162#endif /* _NRMEM2X_H_ */
Note: See TracBrowser for help on using the repository browser.