source: soft/giet_vm/applications/rosenfeld/nrc2/include/nrmem2.h @ 826

Last change on this file since 826 was 826, checked in by meunier, 7 years ago
  • Mise à jour NR2 et Rosenfeld
File size: 3.8 KB
Line 
1/* ---------------- */
2/* --- nrmem2.h --- */
3/* ---------------- */
4
5/*
6 * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved
7 * Univ Paris Sud XI, CNRS
8*/
9
10#ifndef _NRMEM2_H_
11#define _NRMEM2_H_
12
13/*
14 * ------------------
15 * --- dup_matrix ---
16 * ------------------
17 */
18
19#define dup_type_matrix(t) \
20void short_name(t,dup_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y);
21
22dup_type_matrix(int8_t);
23dup_type_matrix(uint8_t);
24dup_type_matrix(int16_t);
25dup_type_matrix(uint16_t);
26dup_type_matrix(int32_t);
27dup_type_matrix(uint32_t);
28dup_type_matrix(int64_t);
29dup_type_matrix(uint64_t);
30dup_type_matrix(float);
31dup_type_matrix(double);
32dup_type_matrix(rgb8);
33dup_type_matrix(rgbx8);
34
35
36
37/*
38 * --------------
39 * --- resize ---
40 * --------------
41 */
42
43#undef resize_type_matrix
44#define resize_type_matrix(t) \
45void short_name(t,resize_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch);
46
47resize_type_matrix(int8_t);
48resize_type_matrix(uint8_t);
49resize_type_matrix(int16_t);
50resize_type_matrix(uint16_t);
51resize_type_matrix(int32_t);
52resize_type_matrix(uint32_t);
53resize_type_matrix(int64_t);
54resize_type_matrix(uint64_t);
55resize_type_matrix(float);
56resize_type_matrix(double);
57resize_type_matrix(rgb8);
58resize_type_matrix(rgbx8);
59
60
61
62/*
63 * ----------------------
64 * --- convert matrix ---
65 * ----------------------
66 */
67
68#define convert_type_matrix(t1,t2) \
69void short_name(t1,convert_,short_name(t2,matrix_,matrix))(t1 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t2 ** Y);
70
71convert_type_matrix(int8_t,int16_t);
72convert_type_matrix(int8_t,int32_t);
73convert_type_matrix(int8_t,float);
74convert_type_matrix(int8_t,double);
75convert_type_matrix(uint8_t,uint16_t);
76convert_type_matrix(uint8_t,uint32_t);
77convert_type_matrix(uint8_t,float);
78convert_type_matrix(uint8_t,double);
79convert_type_matrix(uint8_t,rgb8);
80convert_type_matrix(uint8_t,rgbx8);
81convert_type_matrix(int16_t,int32_t);
82convert_type_matrix(int16_t,float);
83convert_type_matrix(int16_t,double);
84convert_type_matrix(uint16_t,uint32_t);
85convert_type_matrix(uint16_t,float);
86convert_type_matrix(uint16_t,double);
87convert_type_matrix(int32_t,float);
88convert_type_matrix(int32_t,double);
89convert_type_matrix(uint32_t,float);
90convert_type_matrix(uint32_t,double);
91
92convert_type_matrix(int16_t,int8_t);
93convert_type_matrix(uint16_t,uint8_t);
94convert_type_matrix(int32_t,int8_t);
95convert_type_matrix(uint32_t,uint8_t);
96convert_type_matrix(int32_t,int16_t);
97convert_type_matrix(uint32_t,uint16_t);
98convert_type_matrix(float,int8_t);
99convert_type_matrix(float,uint8_t);
100convert_type_matrix(float,int16_t);
101convert_type_matrix(float,uint16_t);
102convert_type_matrix(float,int32_t);
103convert_type_matrix(float,uint32_t);
104convert_type_matrix(double,int8_t);
105convert_type_matrix(double,uint8_t);
106convert_type_matrix(double,int16_t);
107convert_type_matrix(double,uint16_t);
108convert_type_matrix(double,int32_t);
109convert_type_matrix(double,uint32_t);
110convert_type_matrix(double,float);
111convert_type_matrix(rgb8,uint8_t);
112
113
114
115/*
116 * ----------------------
117 * --- lowpart_matrix ---
118 * ----------------------
119 */
120
121void lowpart_ui16matrix_ui8matrix(uint16_t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, uint8_t ** Y);
122void lowpart_ui32matrix_ui8matrix(uint32_t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, uint8_t ** Y);
123
124
125/*
126 * -------------------
127 * --- split-merge ---
128 * -------------------
129 */
130
131void split_rgb8matrix(rgb8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, uint8_t ** R, uint8_t ** G, uint8_t ** B);
132void merge_rgb8matrix(uint8_t ** R, uint8_t ** G, uint8_t ** B, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgb8 ** X);
133
134#endif /* _NRMEM2_H_ */
135
136// Local Variables:
137// tab-width: 4
138// c-basic-offset: 4
139// c-file-offsets:((innamespace . 0)(inline-open . 0))
140// indent-tabs-mode: nil
141// End:
142
143// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
144
Note: See TracBrowser for help on using the repository browser.