1 | /* ---------------- */ |
---|
2 | /* --- nrmem1.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 __NRMEM1_H__ |
---|
12 | #define __NRMEM1_H__ |
---|
13 | |
---|
14 | #ifdef __cplusplus |
---|
15 | #pragma message ("C++") |
---|
16 | extern "C" { |
---|
17 | #endif |
---|
18 | |
---|
19 | #ifdef VERBOSE_PRAGMA |
---|
20 | //#pragma message ("- *** include nrmem1.h ***") |
---|
21 | #endif |
---|
22 | |
---|
23 | |
---|
24 | IMAGE_EXPORT(void) dup_si8vector (sint8 *X, long nl, long nh, sint8 *Y); |
---|
25 | IMAGE_EXPORT(void) dup_ui8vector (uint8 *X, long nl, long nh, uint8 *Y); |
---|
26 | IMAGE_EXPORT(void) dup_si16vector (sint16 *X, long nl, long nh, sint16 *Y); |
---|
27 | IMAGE_EXPORT(void) dup_ui16vector (uint16 *X, long nl, long nh, uint16 *Y); |
---|
28 | IMAGE_EXPORT(void) dup_si32vector (sint32 *X, long nl, long nh, sint32 *Y); |
---|
29 | IMAGE_EXPORT(void) dup_ui32vector (uint32 *X, long nl, long nh, uint32 *Y); |
---|
30 | IMAGE_EXPORT(void) dup_si64vector (sint64 *X, long nl, long nh, sint64 *Y); |
---|
31 | IMAGE_EXPORT(void) dup_ui64vector (uint64 *X, long nl, long nh, uint64 *Y); |
---|
32 | IMAGE_EXPORT(void) dup_f32vector (float32 *X, long nl, long nh, float32 *Y); |
---|
33 | IMAGE_EXPORT(void) dup_f64vector (float64 *X, long nl, long nh, float64 *Y); |
---|
34 | IMAGE_EXPORT(void) dup_rgb8vector (rgb8 *X, long nl, long nh, rgb8 *Y); |
---|
35 | IMAGE_EXPORT(void) dup_rgbx8vector (rgbx8 *X, long nl, long nh, rgbx8 *Y); |
---|
36 | |
---|
37 | /* ---------------- */ |
---|
38 | /* -- Convertion -- */ |
---|
39 | /* ---------------- */ |
---|
40 | |
---|
41 | // UP |
---|
42 | |
---|
43 | IMAGE_EXPORT(void) convert_si8vector_si16vector (sint8 *X, long nl, long nh, sint16 *Y); |
---|
44 | IMAGE_EXPORT(void) convert_si8vector_si32vector (sint8 *X, long nl, long nh, sint32 *Y); |
---|
45 | IMAGE_EXPORT(void) convert_si8vector_f32vector (sint8 *X, long nl, long nh, float32 *Y); |
---|
46 | IMAGE_EXPORT(void) convert_si8vector_f64vector (sint8 *X, long nl, long nh, float64 *Y); |
---|
47 | |
---|
48 | IMAGE_EXPORT(void) convert_ui8vector_ui16vector (uint8 *X, long nl, long nh, uint16 *Y); |
---|
49 | IMAGE_EXPORT(void) convert_ui8vector_ui32vector (uint8 *X, long nl, long nh, uint32 *Y); |
---|
50 | IMAGE_EXPORT(void) convert_ui8vector_f32vector (uint8 *X, long nl, long nh, float32 *Y); |
---|
51 | IMAGE_EXPORT(void) convert_ui8vector_f64vector (uint8 *X, long nl, long nh, float64 *Y); |
---|
52 | IMAGE_EXPORT(void) convert_ui8vector_rgb8vector (uint8 *X, long nl, long nh, rgb8 *Y); |
---|
53 | IMAGE_EXPORT(void) convert_ui8vector_rgbx8vector(uint8 *X, long nl, long nh, rgbx8 *Y); |
---|
54 | |
---|
55 | IMAGE_EXPORT(void) convert_si16vector_si32vector (sint16 *X, long nl, long nh, sint32 *Y); |
---|
56 | IMAGE_EXPORT(void) convert_si16vector_f32vector (sint16 *X, long nl, long nh, float32 *Y); |
---|
57 | IMAGE_EXPORT(void) convert_si16vector_f64vector (sint16 *X, long nl, long nh, float64 *Y); |
---|
58 | |
---|
59 | IMAGE_EXPORT(void) convert_ui16vector_ui32vector (uint16 *X, long nl, long nh, uint32 *Y); |
---|
60 | IMAGE_EXPORT(void) convert_ui16vector_f32vector (uint16 *X, long nl, long nh, float32 *Y); |
---|
61 | IMAGE_EXPORT(void) convert_ui16vector_f64vector (uint16 *X, long nl, long nh, float64 *Y); |
---|
62 | |
---|
63 | IMAGE_EXPORT(void) convert_si32vector_f32vector (sint32 *X, long nl, long nh, float32 *Y); |
---|
64 | IMAGE_EXPORT(void) convert_si32vector_f64vector (sint32 *X, long nl, long nh, float64 *Y); |
---|
65 | |
---|
66 | IMAGE_EXPORT(void) convert_ui32vector_f32vector (uint32 *X, long nl, long nh, float32 *Y); |
---|
67 | IMAGE_EXPORT(void) convert_ui32vector_f64vector (uint32 *X, long nl, long nh, float64 *Y); |
---|
68 | |
---|
69 | IMAGE_EXPORT(void) convert_f32vector_f64vector (float32 *X, long nl, long nh, float64 *Y); |
---|
70 | |
---|
71 | // DOWN |
---|
72 | |
---|
73 | IMAGE_EXPORT(void) convert_si16vector_si8vector(sint16 *X, long nl, long nh, sint8 *Y); |
---|
74 | |
---|
75 | IMAGE_EXPORT(void) convert_ui16vector_ui8vector(uint16 *X, long nl, long nh, uint8 *Y); |
---|
76 | |
---|
77 | IMAGE_EXPORT(void) convert_si32vector_si8vector (sint32 *X, long nl, long nh, sint8 *Y); |
---|
78 | IMAGE_EXPORT(void) convert_si32vector_si16vector(sint32 *X, long nl, long nh, sint16 *Y); |
---|
79 | |
---|
80 | IMAGE_EXPORT(void) convert_ui32vector_ui8vector (uint32 *X, long nl, long nh, uint8 *Y); |
---|
81 | IMAGE_EXPORT(void) convert_ui32vector_ui16vector(uint32 *X, long nl, long nh, uint16 *Y); |
---|
82 | |
---|
83 | IMAGE_EXPORT(void) convert_f32vector_si8vector (float32 *X, long nl, long nh, sint8 *Y); |
---|
84 | IMAGE_EXPORT(void) convert_f32vector_ui8vector (float32 *X, long nl, long nh, uint8 *Y); |
---|
85 | IMAGE_EXPORT(void) convert_f32vector_si16vector(float32 *X, long nl, long nh, sint16 *Y); |
---|
86 | IMAGE_EXPORT(void) convert_f32vector_ui16vector(float32 *X, long nl, long nh, uint16 *Y); |
---|
87 | IMAGE_EXPORT(void) convert_f32vector_si32vector(float32 *X, long nl, long nh, sint32 *Y); |
---|
88 | IMAGE_EXPORT(void) convert_f32vector_ui32vector(float32 *X, long nl, long nh, uint32 *Y); |
---|
89 | |
---|
90 | IMAGE_EXPORT(void) convert_f64vector_si8vector (float64 *X, long nl, long nh, sint8 *Y); |
---|
91 | IMAGE_EXPORT(void) convert_f64vector_ui8vector (float64 *X, long nl, long nh, uint8 *Y); |
---|
92 | IMAGE_EXPORT(void) convert_f64vector_si16vector(float64 *X, long nl, long nh, sint16 *Y); |
---|
93 | IMAGE_EXPORT(void) convert_f64vector_ui16vector(float64 *X, long nl, long nh, uint16 *Y); |
---|
94 | IMAGE_EXPORT(void) convert_f64vector_si32vector(float64 *X, long nl, long nh, sint32 *Y); |
---|
95 | IMAGE_EXPORT(void) convert_f64vector_ui32vector(float64 *X, long nl, long nh, uint32 *Y); |
---|
96 | IMAGE_EXPORT(void) convert_f64vector_f32vector (float64 *X, long nl, long nh, float32 *Y); |
---|
97 | |
---|
98 | IMAGE_EXPORT(void) convert_rgb8vector_ui8vector (rgb8 *X, long nl, long nh, uint8 *Y); |
---|
99 | IMAGE_EXPORT(void) convert_rgbx8vector_ui8vector(rgbx8 *X, long nl, long nh, uint8 *Y); |
---|
100 | |
---|
101 | /* |
---|
102 | * --------------- |
---|
103 | * --- LowPart --- |
---|
104 | * --------------- |
---|
105 | */ |
---|
106 | |
---|
107 | IMAGE_EXPORT(void) lowpart_ui16vector_ui8vector(uint16 *X, long nl,long nh, uint8 *Y); |
---|
108 | IMAGE_EXPORT(void) lowpart_ui32vector_ui8vector(uint32 *X, long nl,long nh, uint8 *Y); |
---|
109 | |
---|
110 | /* --------------------- */ |
---|
111 | /* --- split & merge --- */ |
---|
112 | /* --------------------- */ |
---|
113 | |
---|
114 | IMAGE_EXPORT(void) split_rgb8vector(rgb8 *X, long nl, long nh, uint8 *R, uint8 *G, uint8 *B); |
---|
115 | IMAGE_EXPORT(void) split_rgb32vector(rgb32 *X, long nl, long nh, uint32 *R, uint32 *G, uint32 *B); |
---|
116 | |
---|
117 | IMAGE_EXPORT(void) merge_rgb8vector(uint8 *R, uint8 *G, uint8 *B, long nl, long nh, rgb8 *X); |
---|
118 | IMAGE_EXPORT(void) merge_rgb32vector(uint32 *R, uint32 *G, uint32 *B, long nl, long nh, rgb32 *X); |
---|
119 | |
---|
120 | #ifdef __cplusplus |
---|
121 | } |
---|
122 | #endif |
---|
123 | |
---|
124 | #endif /* __NRMEM1_H__ */ |
---|