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 | |
---|
15 | /* ------------------------------------------ */ |
---|
16 | /* --- ATTENTION ---------------------------- */ |
---|
17 | /* ------------------------------------------ */ |
---|
18 | /* l'utilisation des fonctions endline */ |
---|
19 | /* necessite l'allocation d'une ligne de plus */ |
---|
20 | /* (a cause du m[i+1] */ |
---|
21 | /* ------------------------------------------ */ |
---|
22 | |
---|
23 | #define reset_endline_type_matrix(t) \ |
---|
24 | void short_name(t,reset_endline_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \ |
---|
25 | void short_name(t,endline_,matrix)(t ** m, int32_t i, int32_t l); \ |
---|
26 | void short_name(t,endline0_,matrix)(t ** m, int32_t i, int32_t l, int32_t ncl); \ |
---|
27 | void short_name(t,endline1_,matrix)(t ** m, int32_t i, int32_t l, int32_t ncl); |
---|
28 | |
---|
29 | reset_endline_type_matrix(int8_t); |
---|
30 | reset_endline_type_matrix(uint8_t); |
---|
31 | reset_endline_type_matrix(int16_t); |
---|
32 | reset_endline_type_matrix(uint16_t); |
---|
33 | reset_endline_type_matrix(int32_t); |
---|
34 | reset_endline_type_matrix(uint32_t); |
---|
35 | reset_endline_type_matrix(int64_t); |
---|
36 | reset_endline_type_matrix(uint64_t); |
---|
37 | |
---|
38 | |
---|
39 | #undef resize_type_matrix |
---|
40 | #define resize_type_matrix(t) \ |
---|
41 | void short_name(t,resize_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); |
---|
42 | |
---|
43 | resize_type_matrix(si16Point); |
---|
44 | resize_type_matrix(ui16Point); |
---|
45 | resize_type_matrix(si32Point); |
---|
46 | resize_type_matrix(ui32Point); |
---|
47 | resize_type_matrix(f32Point); |
---|
48 | resize_type_matrix(si16Triplet); |
---|
49 | resize_type_matrix(ui16Triplet); |
---|
50 | resize_type_matrix(si32Triplet); |
---|
51 | resize_type_matrix(ui32Triplet); |
---|
52 | resize_type_matrix(f32Triplet); |
---|
53 | |
---|
54 | |
---|
55 | #define type_matrix_reverse(t) \ |
---|
56 | void short_name(t,,matrix_reverse)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); |
---|
57 | |
---|
58 | type_matrix_reverse(int8_t); |
---|
59 | type_matrix_reverse(uint8_t); |
---|
60 | type_matrix_reverse(int16_t); |
---|
61 | type_matrix_reverse(uint16_t); |
---|
62 | type_matrix_reverse(int32_t); |
---|
63 | type_matrix_reverse(uint32_t); |
---|
64 | type_matrix_reverse(int64_t); |
---|
65 | type_matrix_reverse(uint64_t); |
---|
66 | type_matrix_reverse(float); |
---|
67 | type_matrix_reverse(double); |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | #define desinterlace_type_matrix(t) \ |
---|
72 | void short_name(t,desinterlace_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** D0, t ** D1); |
---|
73 | |
---|
74 | desinterlace_type_matrix(int8_t); |
---|
75 | desinterlace_type_matrix(uint8_t); |
---|
76 | desinterlace_type_matrix(int16_t); |
---|
77 | desinterlace_type_matrix(uint16_t); |
---|
78 | desinterlace_type_matrix(int32_t); |
---|
79 | desinterlace_type_matrix(uint32_t); |
---|
80 | desinterlace_type_matrix(int64_t); |
---|
81 | desinterlace_type_matrix(uint64_t); |
---|
82 | desinterlace_type_matrix(float); |
---|
83 | desinterlace_type_matrix(double); |
---|
84 | desinterlace_type_matrix(rgb8); |
---|
85 | desinterlace_type_matrix(rgbx8); |
---|
86 | |
---|
87 | |
---|
88 | #define interlace_type_matrix(t) \ |
---|
89 | void short_name(t,interlace_,matrix)(t ** S0, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** S1, t ** D); |
---|
90 | |
---|
91 | interlace_type_matrix(int8_t); |
---|
92 | interlace_type_matrix(uint8_t); |
---|
93 | interlace_type_matrix(int16_t); |
---|
94 | interlace_type_matrix(uint16_t); |
---|
95 | interlace_type_matrix(int32_t); |
---|
96 | interlace_type_matrix(uint32_t); |
---|
97 | interlace_type_matrix(int64_t); |
---|
98 | interlace_type_matrix(uint64_t); |
---|
99 | interlace_type_matrix(float); |
---|
100 | interlace_type_matrix(double); |
---|
101 | interlace_type_matrix(rgb8); |
---|
102 | interlace_type_matrix(rgbx8); |
---|
103 | |
---|
104 | |
---|
105 | #define copyc_type_matrix(t) \ |
---|
106 | void short_name(t,copyc_,matrix)(t ** src, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** cond, t c, t ** dst) \ |
---|
107 | |
---|
108 | /* |
---|
109 | * copie dans src->dst si la condition est remplie |
---|
110 | * dst(i,j) = src(i,j) si cond(i,j) == c |
---|
111 | */ |
---|
112 | |
---|
113 | copyc_type_matrix(int8_t); |
---|
114 | copyc_type_matrix(uint8_t); |
---|
115 | copyc_type_matrix(int16_t); |
---|
116 | copyc_type_matrix(uint16_t); |
---|
117 | copyc_type_matrix(int32_t); |
---|
118 | copyc_type_matrix(uint32_t); |
---|
119 | copyc_type_matrix(int64_t); |
---|
120 | copyc_type_matrix(uint64_t); |
---|
121 | copyc_type_matrix(float); |
---|
122 | copyc_type_matrix(double); |
---|
123 | copyc_type_matrix(rgb8); |
---|
124 | copyc_type_matrix(rgbx8); |
---|
125 | |
---|
126 | |
---|
127 | #define complete_border_type_matrix(t) \ |
---|
128 | void short_name(t,complete_border_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t n); \ |
---|
129 | void short_name(t,complete_border1_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \ |
---|
130 | void short_name(t,complete_border2_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); |
---|
131 | |
---|
132 | complete_border_type_matrix(int8_t); |
---|
133 | complete_border_type_matrix(uint8_t); |
---|
134 | complete_border_type_matrix(int16_t); |
---|
135 | complete_border_type_matrix(uint16_t); |
---|
136 | complete_border_type_matrix(int32_t); |
---|
137 | complete_border_type_matrix(uint32_t); |
---|
138 | complete_border_type_matrix(int64_t); |
---|
139 | complete_border_type_matrix(uint64_t); |
---|
140 | complete_border_type_matrix(float); |
---|
141 | complete_border_type_matrix(double); |
---|
142 | complete_border_type_matrix(rgb8); |
---|
143 | complete_border_type_matrix(rgbx8); |
---|
144 | |
---|
145 | |
---|
146 | #define copy1c_type_matrix(t) \ |
---|
147 | void short_name(t,copy1c_,matrix)(t ** X, int32_t nc, t ** Y, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \ |
---|
148 | void short_name(t,copy1r_,matrix)(t ** X, int32_t nr, t ** Y, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); |
---|
149 | |
---|
150 | copy1c_type_matrix(int8_t); |
---|
151 | copy1c_type_matrix(uint8_t); |
---|
152 | copy1c_type_matrix(int16_t); |
---|
153 | copy1c_type_matrix(uint16_t); |
---|
154 | copy1c_type_matrix(int32_t); |
---|
155 | copy1c_type_matrix(uint32_t); |
---|
156 | copy1c_type_matrix(int64_t); |
---|
157 | copy1c_type_matrix(uint64_t); |
---|
158 | copy1c_type_matrix(float); |
---|
159 | copy1c_type_matrix(double); |
---|
160 | copy1c_type_matrix(rgb8); |
---|
161 | copy1c_type_matrix(rgbx8); |
---|
162 | |
---|
163 | |
---|
164 | #endif /* _NRMEM2X_H_ */ |
---|
165 | |
---|