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

Last change on this file since 827 was 826, checked in by meunier, 7 years ago
  • Mise à jour NR2 et Rosenfeld
File size: 5.2 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
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) \
24void short_name(t,reset_endline_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \
25void short_name(t,endline_,matrix)(t ** m, int32_t i, int32_t l); \
26void short_name(t,endline0_,matrix)(t ** m, int32_t i, int32_t l, int32_t ncl); \
27void short_name(t,endline1_,matrix)(t ** m, int32_t i, int32_t l, int32_t ncl);
28
29reset_endline_type_matrix(int8_t);
30reset_endline_type_matrix(uint8_t);
31reset_endline_type_matrix(int16_t);
32reset_endline_type_matrix(uint16_t);
33reset_endline_type_matrix(int32_t);
34reset_endline_type_matrix(uint32_t);
35reset_endline_type_matrix(int64_t);
36reset_endline_type_matrix(uint64_t);
37
38
39#undef resize_type_matrix
40#define resize_type_matrix(t) \
41void short_name(t,resize_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch);
42
43resize_type_matrix(si16Point);
44resize_type_matrix(ui16Point);
45resize_type_matrix(si32Point);
46resize_type_matrix(ui32Point);
47resize_type_matrix(f32Point);
48resize_type_matrix(si16Triplet);
49resize_type_matrix(ui16Triplet);
50resize_type_matrix(si32Triplet);
51resize_type_matrix(ui32Triplet);
52resize_type_matrix(f32Triplet);
53
54
55#define type_matrix_reverse(t) \
56void short_name(t,,matrix_reverse)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch);
57
58type_matrix_reverse(int8_t);
59type_matrix_reverse(uint8_t);
60type_matrix_reverse(int16_t);
61type_matrix_reverse(uint16_t);
62type_matrix_reverse(int32_t);
63type_matrix_reverse(uint32_t);
64type_matrix_reverse(int64_t);
65type_matrix_reverse(uint64_t);
66type_matrix_reverse(float);
67type_matrix_reverse(double);
68
69
70
71#define desinterlace_type_matrix(t) \
72void short_name(t,desinterlace_,matrix)(t ** S, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** D0, t ** D1);
73
74desinterlace_type_matrix(int8_t);
75desinterlace_type_matrix(uint8_t);
76desinterlace_type_matrix(int16_t);
77desinterlace_type_matrix(uint16_t);
78desinterlace_type_matrix(int32_t);
79desinterlace_type_matrix(uint32_t);
80desinterlace_type_matrix(int64_t);
81desinterlace_type_matrix(uint64_t);
82desinterlace_type_matrix(float);
83desinterlace_type_matrix(double);
84desinterlace_type_matrix(rgb8);
85desinterlace_type_matrix(rgbx8);
86
87
88#define interlace_type_matrix(t) \
89void short_name(t,interlace_,matrix)(t ** S0, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** S1, t ** D);
90
91interlace_type_matrix(int8_t);
92interlace_type_matrix(uint8_t);
93interlace_type_matrix(int16_t);
94interlace_type_matrix(uint16_t);
95interlace_type_matrix(int32_t);
96interlace_type_matrix(uint32_t);
97interlace_type_matrix(int64_t);
98interlace_type_matrix(uint64_t);
99interlace_type_matrix(float);
100interlace_type_matrix(double);
101interlace_type_matrix(rgb8);
102interlace_type_matrix(rgbx8);
103
104
105#define copyc_type_matrix(t) \
106void 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
113copyc_type_matrix(int8_t);
114copyc_type_matrix(uint8_t);
115copyc_type_matrix(int16_t);
116copyc_type_matrix(uint16_t);
117copyc_type_matrix(int32_t);
118copyc_type_matrix(uint32_t);
119copyc_type_matrix(int64_t);
120copyc_type_matrix(uint64_t);
121copyc_type_matrix(float);
122copyc_type_matrix(double);
123copyc_type_matrix(rgb8);
124copyc_type_matrix(rgbx8);
125
126
127#define complete_border_type_matrix(t) \
128void short_name(t,complete_border_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32_t n); \
129void short_name(t,complete_border1_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \
130void short_name(t,complete_border2_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch);
131
132complete_border_type_matrix(int8_t);
133complete_border_type_matrix(uint8_t);
134complete_border_type_matrix(int16_t);
135complete_border_type_matrix(uint16_t);
136complete_border_type_matrix(int32_t);
137complete_border_type_matrix(uint32_t);
138complete_border_type_matrix(int64_t);
139complete_border_type_matrix(uint64_t);
140complete_border_type_matrix(float);
141complete_border_type_matrix(double);
142complete_border_type_matrix(rgb8);
143complete_border_type_matrix(rgbx8);
144
145
146#define copy1c_type_matrix(t) \
147void short_name(t,copy1c_,matrix)(t ** X, int32_t nc, t ** Y, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); \
148void 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
150copy1c_type_matrix(int8_t);
151copy1c_type_matrix(uint8_t);
152copy1c_type_matrix(int16_t);
153copy1c_type_matrix(uint16_t);
154copy1c_type_matrix(int32_t);
155copy1c_type_matrix(uint32_t);
156copy1c_type_matrix(int64_t);
157copy1c_type_matrix(uint64_t);
158copy1c_type_matrix(float);
159copy1c_type_matrix(double);
160copy1c_type_matrix(rgb8);
161copy1c_type_matrix(rgbx8);
162
163
164#endif /* _NRMEM2X_H_ */
165
Note: See TracBrowser for help on using the repository browser.