- Timestamp:
- May 6, 2016, 3:06:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/rosenfeld/nrc2/include/nrarith2.h
r772 r821 11 11 #define _NRARITH2_H_ 12 12 13 #ifdef __cplusplus 14 #ifdef PRAGMA_VERBOSE 15 #pragma message ("C++") 16 #endif 17 extern "C" { 18 #endif 19 20 #ifdef PRAGMA_VERBOSE 21 //#pragma message("- include nrarith.h") 22 #endif 13 #include "nrc_os_config.h" 23 14 24 15 /* ------------------ */ … … 26 17 /* ------------------ */ 27 18 28 IMAGE_EXPORT(sint8) min_si8matrix (sint8 **m, long nrl,long nrh,long ncl, long nch); 29 IMAGE_EXPORT(uint8) min_ui8matrix (uint8 **m, long nrl,long nrh,long ncl, long nch); 30 IMAGE_EXPORT(sint16) min_si16matrix (sint16 **m, long nrl,long nrh,long ncl, long nch); 31 IMAGE_EXPORT(uint16) min_ui16matrix (uint16 **m, long nrl,long nrh,long ncl, long nch); 32 IMAGE_EXPORT(sint32) min_si32matrix (sint32 **m, long nrl,long nrh,long ncl, long nch); 33 IMAGE_EXPORT(uint32) min_ui32matrix (uint32 **m, long nrl,long nrh,long ncl, long nch); 34 IMAGE_EXPORT(sint64) min_si64matrix (sint64 **m, long nrl,long nrh,long ncl, long nch); 35 IMAGE_EXPORT(uint64) min_ui64matrix (uint64 **m, long nrl,long nrh,long ncl, long nch); 36 IMAGE_EXPORT(float32) min_f32matrix (float32 **m, long nrl,long nrh,long ncl, long nch); 37 IMAGE_EXPORT(float64) min_f64matrix (float64 **m, long nrl,long nrh,long ncl, long nch); 19 #define min_type_matrix(t) \ 20 t short_name(t,min_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch) 21 22 min_type_matrix(int8_t); 23 min_type_matrix(uint8_t); 24 min_type_matrix(int16_t); 25 min_type_matrix(uint16_t); 26 min_type_matrix(int32_t); 27 min_type_matrix(uint32_t); 28 min_type_matrix(int64_t); 29 min_type_matrix(uint64_t); 30 min_type_matrix(float); 31 min_type_matrix(double); 32 38 33 39 34 /* ------------------ */ … … 41 36 /* ------------------ */ 42 37 43 IMAGE_EXPORT(sint8) max_si8matrix (sint8 **m, long nrl,long nrh,long ncl, long nch); 44 IMAGE_EXPORT(uint8) max_ui8matrix (uint8 **m, long nrl,long nrh,long ncl, long nch); 45 IMAGE_EXPORT(sint16) max_si16matrix (sint16 **m, long nrl,long nrh,long ncl, long nch); 46 IMAGE_EXPORT(uint16) max_ui16matrix (uint16 **m, long nrl,long nrh,long ncl, long nch); 47 IMAGE_EXPORT(sint32) max_si32matrix (sint32 **m, long nrl,long nrh,long ncl, long nch); 48 IMAGE_EXPORT(uint32) max_ui32matrix (uint32 **m, long nrl,long nrh,long ncl, long nch); 49 IMAGE_EXPORT(sint64) max_si64matrix (sint64 **m, long nrl,long nrh,long ncl, long nch); 50 IMAGE_EXPORT(uint64) max_ui64matrix (uint64 **m, long nrl,long nrh,long ncl, long nch); 51 IMAGE_EXPORT(float32) max_f32matrix (float32 **m, long nrl,long nrh,long ncl, long nch); 52 IMAGE_EXPORT(float64) max_f64matrix (float64 **m, long nrl,long nrh,long ncl, long nch); 38 #define max_type_matrix(t) \ 39 t short_name(t,max_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch) 40 41 max_type_matrix(int8_t); 42 max_type_matrix(uint8_t); 43 max_type_matrix(int16_t); 44 max_type_matrix(uint16_t); 45 max_type_matrix(int32_t); 46 max_type_matrix(uint32_t); 47 max_type_matrix(int64_t); 48 max_type_matrix(uint64_t); 49 max_type_matrix(float); 50 max_type_matrix(double); 51 53 52 54 53 /* ------------------ */ … … 56 55 /* ------------------ */ 57 56 58 IMAGE_EXPORT(void) add_si8matrix (sint8 **X, long nrl,long nrh,long ncl, long nch, sint8 **Y, sint8 **Z); 59 IMAGE_EXPORT(void) add_ui8matrix (uint8 **X, long nrl,long nrh,long ncl, long nch, uint8 **Y, uint8 **Z); 60 IMAGE_EXPORT(void) add_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y, sint16 **Z); 61 IMAGE_EXPORT(void) add_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y, uint16 **Z); 62 IMAGE_EXPORT(void) add_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 **Y, sint32 **Z); 63 IMAGE_EXPORT(void) add_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 **Y, uint32 **Z); 64 IMAGE_EXPORT(void) add_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 **Y, sint64 **Z); 65 IMAGE_EXPORT(void) add_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 **Y, uint64 **Z); 66 67 IMAGE_EXPORT(void) add_f32matrix (float32 **X, long nrl,long nrh,long ncl, long nch, float32 **Y, float32 **Z); 68 IMAGE_EXPORT(void) add_f64matrix (float64 **X, long nrl,long nrh,long ncl, long nch, float64 **Y, float64 **Z); 69 70 IMAGE_EXPORT(void) add_rgb8matrix (rgb8 **X, long nrl,long nrh,long ncl, long nch, rgb8 **Y, rgb8 **Z); 71 IMAGE_EXPORT(void) add_rgbx8matrix(rgbx8 **X, long nrl,long nrh,long ncl, long nch, rgbx8 **Y, rgbx8 **Z); 57 #define add_type_matrix(t) \ 58 void short_name(t,add_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z) 59 60 add_type_matrix(int8_t); 61 add_type_matrix(uint8_t); 62 add_type_matrix(int16_t); 63 add_type_matrix(uint16_t); 64 add_type_matrix(int32_t); 65 add_type_matrix(uint32_t); 66 add_type_matrix(int64_t); 67 add_type_matrix(uint64_t); 68 add_type_matrix(float); 69 add_type_matrix(double); 70 71 void add_rgb8matrix (rgb8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgb8 ** Y, rgb8 ** Z); 72 void add_rgbx8matrix(rgbx8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgbx8 ** Y, rgbx8 ** Z); 73 72 74 73 75 /* -------------------- */ … … 75 77 /* -------------------- */ 76 78 77 IMAGE_EXPORT(void) addc_si8matrix (sint8 **X, long nrl,long nrh,long ncl, long nch, sint8 y, sint8 **Z); 78 IMAGE_EXPORT(void) addc_ui8matrix (uint8 **X, long nrl,long nrh,long ncl, long nch, uint8 y, uint8 **Z); 79 IMAGE_EXPORT(void) addc_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 y, sint16 **Z); 80 IMAGE_EXPORT(void) addc_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 y, uint16 **Z); 81 IMAGE_EXPORT(void) addc_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 y, sint32 **Z); 82 IMAGE_EXPORT(void) addc_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 y, uint32 **Z); 83 IMAGE_EXPORT(void) addc_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 y, sint64 **Z); 84 IMAGE_EXPORT(void) addc_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 y, uint64 **Z); 85 86 IMAGE_EXPORT(void) addc_f32matrix (float32 **X, long nrl,long nrh,long ncl, long nch, float32 y, float32 **Z); 87 IMAGE_EXPORT(void) addc_f64matrix (float64 **X, long nrl,long nrh,long ncl, long nch, float64 y, float64 **Z); 88 89 IMAGE_EXPORT(void) addc_rgb8matrix (rgb8 **X, long nrl,long nrh,long ncl, long nch, rgb8 y, rgb8 **Z); 90 IMAGE_EXPORT(void) addc_rgbx8matrix(rgbx8 **X, long nrl,long nrh,long ncl, long nch, rgbx8 y, rgbx8 **Z); 79 #define addc_type_matrix(t) \ 80 void short_name(t,addc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z) 81 82 addc_type_matrix(int8_t); 83 addc_type_matrix(uint8_t); 84 addc_type_matrix(int16_t); 85 addc_type_matrix(uint16_t); 86 addc_type_matrix(int32_t); 87 addc_type_matrix(uint32_t); 88 addc_type_matrix(int64_t); 89 addc_type_matrix(uint64_t); 90 addc_type_matrix(float); 91 addc_type_matrix(double); 92 93 void addc_rgb8matrix (rgb8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgb8 y, rgb8 ** Z); 94 void addc_rgbx8matrix(rgbx8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgbx8 y, rgbx8 ** Z); 95 91 96 92 97 /* ----------- */ … … 94 99 /* ----------- */ 95 100 96 IMAGE_EXPORT(void) sub_si8matrix (sint8 **X, long nrl,long nrh,long ncl, long nch, sint8 **Y, sint8 **Z); 97 IMAGE_EXPORT(void) sub_ui8matrix (uint8 **X, long nrl,long nrh,long ncl, long nch, uint8 **Y, uint8 **Z); 98 IMAGE_EXPORT(void) sub_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 **Y, sint16 **Z); 99 IMAGE_EXPORT(void) sub_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 **Y, uint16 **Z); 100 IMAGE_EXPORT(void) sub_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 **Y, sint32 **Z); 101 IMAGE_EXPORT(void) sub_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 **Y, uint32 **Z); 102 IMAGE_EXPORT(void) sub_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 **Y, sint64 **Z); 103 IMAGE_EXPORT(void) sub_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 **Y, uint64 **Z); 104 105 IMAGE_EXPORT(void) sub_f32matrix (float32 **X, long nrl,long nrh,long ncl, long nch, float32 **Y, float32 **Z); 106 IMAGE_EXPORT(void) sub_f64matrix (float64 **X, long nrl,long nrh,long ncl, long nch, float64 **Y, float64 **Z); 107 108 IMAGE_EXPORT(void) sub_rgb8matrix (rgb8 **X, long nrl,long nrh,long ncl, long nch, rgb8 **Y, rgb8 **Z); 109 IMAGE_EXPORT(void) sub_rgbx8matrix(rgbx8 **X, long nrl,long nrh,long ncl, long nch, rgbx8 **Y, rgbx8 **Z); 101 #define sub_type_matrix(t) \ 102 void short_name(t,sub_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z) 103 104 sub_type_matrix(int8_t); 105 sub_type_matrix(uint8_t); 106 sub_type_matrix(int16_t); 107 sub_type_matrix(uint16_t); 108 sub_type_matrix(int32_t); 109 sub_type_matrix(uint32_t); 110 sub_type_matrix(int64_t); 111 sub_type_matrix(uint64_t); 112 sub_type_matrix(float); 113 sub_type_matrix(double); 114 115 void sub_rgb8matrix (rgb8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgb8 ** Y, rgb8 ** Z); 116 void sub_rgbx8matrix(rgbx8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgbx8 ** Y, rgbx8 ** Z); 117 110 118 111 119 /* --------------------- */ … … 113 121 /* --------------------- */ 114 122 115 IMAGE_EXPORT(void) subc_si8matrix (sint8 **X, long nrl,long nrh,long ncl, long nch, sint8 y, sint8 **Z); 116 IMAGE_EXPORT(void) subc_ui8matrix (uint8 **X, long nrl,long nrh,long ncl, long nch, uint8 y, uint8 **Z); 117 IMAGE_EXPORT(void) subc_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 y, sint16 **Z); 118 IMAGE_EXPORT(void) subc_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 y, uint16 **Z); 119 IMAGE_EXPORT(void) subc_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 y, sint32 **Z); 120 IMAGE_EXPORT(void) subc_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 y, uint32 **Z); 121 IMAGE_EXPORT(void) subc_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 y, sint64 **Z); 122 IMAGE_EXPORT(void) subc_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 y, uint64 **Z); 123 124 IMAGE_EXPORT(void) subc_f32matrix (float32 **X, long nrl,long nrh,long ncl, long nch, float32 y, float32 **Z); 125 IMAGE_EXPORT(void) subc_f64matrix (float64 **X, long nrl,long nrh,long ncl, long nch, float64 y, float64 **Z); 126 127 IMAGE_EXPORT(void) subc_rgb8matrix (rgb8 **X, long nrl,long nrh,long ncl, long nch, rgb8 y, rgb8 **Z); 128 IMAGE_EXPORT(void) subc_rgbx8matrix(rgbx8 **X, long nrl,long nrh,long ncl, long nch, rgbx8 y, rgbx8 **Z); 129 130 /* --------------------- */ 131 /* --- Sub constante --- */ 123 #define subc_type_matrix(t) \ 124 void short_name(t,subc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z) 125 126 subc_type_matrix(int8_t); 127 subc_type_matrix(uint8_t); 128 subc_type_matrix(int16_t); 129 subc_type_matrix(uint16_t); 130 subc_type_matrix(int32_t); 131 subc_type_matrix(uint32_t); 132 subc_type_matrix(int64_t); 133 subc_type_matrix(uint64_t); 134 subc_type_matrix(float); 135 subc_type_matrix(double); 136 137 void subc_rgb8matrix (rgb8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgb8 y, rgb8 ** Z); 138 void subc_rgbx8matrix(rgbx8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgbx8 y, rgbx8 ** Z); 139 140 /* --------------------- */ 141 /* --- Mul constante --- */ 132 142 /* --------------------- */ 133 143 134 144 // Z = X * y 135 IMAGE_EXPORT(void) mulc_si8matrix (sint8 **X, long nrl,long nrh,long ncl, long nch, sint8 y, sint8 **Z); 136 IMAGE_EXPORT(void) mulc_ui8matrix (uint8 **X, long nrl,long nrh,long ncl, long nch, uint8 y, uint8 **Z); 137 IMAGE_EXPORT(void) mulc_si16matrix (sint16 **X, long nrl,long nrh,long ncl, long nch, sint16 y, sint16 **Z); 138 IMAGE_EXPORT(void) mulc_ui16matrix (uint16 **X, long nrl,long nrh,long ncl, long nch, uint16 y, uint16 **Z); 139 IMAGE_EXPORT(void) mulc_si32matrix (sint32 **X, long nrl,long nrh,long ncl, long nch, sint32 y, sint32 **Z); 140 IMAGE_EXPORT(void) mulc_ui32matrix (uint32 **X, long nrl,long nrh,long ncl, long nch, uint32 y, uint32 **Z); 141 IMAGE_EXPORT(void) mulc_si64matrix (sint64 **X, long nrl,long nrh,long ncl, long nch, sint64 y, sint64 **Z); 142 IMAGE_EXPORT(void) mulc_ui64matrix (uint64 **X, long nrl,long nrh,long ncl, long nch, uint64 y, uint64 **Z); 143 144 IMAGE_EXPORT(void) mulc_f32matrix (float32 **X, long nrl,long nrh,long ncl, long nch, float32 y, float32 **Z); 145 IMAGE_EXPORT(void) mulc_f64matrix (float64 **X, long nrl,long nrh,long ncl, long nch, float64 y, float64 **Z); 146 147 IMAGE_EXPORT(void) mulc_rgb8matrix (rgb8 **X, long nrl,long nrh,long ncl, long nch, rgb8 y, rgb8 **Z); 148 IMAGE_EXPORT(void) mulc_rgbx8matrix(rgbx8 **X, long nrl,long nrh,long ncl, long nch, rgbx8 y, rgbx8 **Z); 145 146 #define mulc_type_matrix(t) \ 147 void short_name(t,mulc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z) 148 149 mulc_type_matrix(int8_t); 150 mulc_type_matrix(uint8_t); 151 mulc_type_matrix(int16_t); 152 mulc_type_matrix(uint16_t); 153 mulc_type_matrix(int32_t); 154 mulc_type_matrix(uint32_t); 155 mulc_type_matrix(int64_t); 156 mulc_type_matrix(uint64_t); 157 mulc_type_matrix(float); 158 mulc_type_matrix(double); 159 160 void mulc_rgb8matrix (rgb8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgb8 y, rgb8 ** Z); 161 void mulc_rgbx8matrix(rgbx8 ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgbx8 y, rgbx8 ** Z); 162 149 163 150 164 /* --------------- */ 151 165 /* --- MulFrac --- */ 152 166 /* --------------- */ 153 // m2 = (a*m1)/b 154 IMAGE_EXPORT(void) mulfrac_bmatrix (byte **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 b, byte **m2); 155 IMAGE_EXPORT(void) mulfrac_si16matrix (sint16 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 b, sint16 **m2); 156 IMAGE_EXPORT(void) mulfrac_ui16matrix (uint16 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 b, uint16 **m2); 157 IMAGE_EXPORT(void) mulfrac_si32matrix (sint32 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 b, sint32 **m2); 158 IMAGE_EXPORT(void) mulfrac_ui32matrix (uint32 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 b, uint32 **m2); 159 IMAGE_EXPORT(void) mulfrac_rgb8matrix (rgb8 **m1, long nrl,long nrh,long ncl, long nch, rgb32 a, rgb32 b, rgb8 **m2); 160 IMAGE_EXPORT(void) mulfrac_rgbx8matrix(rgbx8 **m1, long nrl,long nrh,long ncl, long nch, rgbx32 a, rgbx32 b, rgbx8 **m2); 161 162 IMAGE_EXPORT(void) mulfrack_rgb8matrix (rgb8 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 b, rgb8 **m2); 163 IMAGE_EXPORT(void) mulfrack_rgbx8matrix(rgbx8 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 b, rgbx8 **m2); 167 168 // m2 = (a * m1) / b 169 170 #define mulfrac_type_matrix(t) \ 171 void short_name(t,mulfrac_,matrix)(t ** X, int32_t nrl, int32_t nrh, \ 172 int32_t ncl, int32_t nch, int32_t a, int32_t b, t ** Y) 173 174 mulfrac_type_matrix(int8_t); 175 mulfrac_type_matrix(uint8_t); 176 mulfrac_type_matrix(int16_t); 177 mulfrac_type_matrix(uint16_t); 178 mulfrac_type_matrix(int32_t); 179 mulfrac_type_matrix(uint32_t); 180 mulfrac_type_matrix(int64_t); 181 mulfrac_type_matrix(uint64_t); 182 mulfrac_type_matrix(float); 183 mulfrac_type_matrix(double); 184 185 void mulfrack_rgb8matrix (rgb8 ** m1, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32 a, int32 b, rgb8 ** m2); 186 void mulfrack_rgbx8matrix(rgbx8 ** m1, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32 a, int32 b, rgbx8 ** m2); 187 164 188 165 189 /* ---------------- */ 166 190 /* --- MulShift --- */ 167 191 /* ---------------- */ 168 // m3 = (a*m1)>>s 169 IMAGE_EXPORT(void) mulshift_bmatrix (byte **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 s, byte **m2); 170 IMAGE_EXPORT(void) mulshift_i16matrix (int16 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 s, int16 **m2); 171 IMAGE_EXPORT(void) mulshift_ui16matrix (uint16 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 s, uint16 **m2); 172 IMAGE_EXPORT(void) mulshift_i32matrix (int32 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 s, int32 **m2); 173 IMAGE_EXPORT(void) mulshift_ui32matrix (uint32 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 s, uint32 **m2); 174 IMAGE_EXPORT(void) mulshift_rgb8matrix (rgb8 **m1, long nrl,long nrh,long ncl, long nch, rgb32 a, rgb32 s, rgb8 **m2); 175 IMAGE_EXPORT(void) mulshift_rgbx8matrix(rgbx8 **m1, long nrl,long nrh,long ncl, long nch, rgbx32 a, rgbx32 s, rgbx8 **m2); 176 177 IMAGE_EXPORT(void) mulshiftk_rgb8matrix (rgb8 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 s, rgb8 **m2); 178 IMAGE_EXPORT(void) mulshiftk_rgbx8matrix(rgbx8 **m1, long nrl,long nrh,long ncl, long nch, int32 a, int32 s, rgbx8 **m2); 179 180 IMAGE_EXPORT(void) quadratic_error_si16matrix(sint16 **m1,long nrl,long nrh,long ncl, long nch, sint16 **m2, sint16 **m3); 181 182 183 #ifdef __cplusplus 184 } 185 #endif 192 // m3 = (a * m1) >> s 193 194 #define mulshift_type_matrix(t) \ 195 void short_name(t,mulshift_,matrix)(t ** X, int32_t nrl, int32_t nrh, \ 196 int32_t ncl, int32_t nch, int32_t a, int32_t s, t ** Y) 197 198 mulshift_type_matrix(int8_t); 199 mulshift_type_matrix(uint8_t); 200 mulshift_type_matrix(int16_t); 201 mulshift_type_matrix(uint16_t); 202 mulshift_type_matrix(int32_t); 203 mulshift_type_matrix(uint32_t); 204 mulshift_type_matrix(int64_t); 205 mulshift_type_matrix(uint64_t); 206 mulshift_type_matrix(float); 207 mulshift_type_matrix(double); 208 209 void mulshift_rgb8matrix (rgb8 **m1, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgb32 a, rgb32 s, rgb8 ** m2); 210 void mulshift_rgbx8matrix(rgbx8 **m1, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, rgbx32 a, rgbx32 s, rgbx8 ** m2); 211 212 void mulshiftk_rgb8matrix (rgb8 ** m1, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32 a, int32 s, rgb8 ** m2); 213 void mulshiftk_rgbx8matrix(rgbx8 ** m1, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, int32 a, int32 s, rgbx8 ** m2); 214 215 void quadratic_error_si16matrix(sint16 ** m1, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, sint16 ** m2, sint16 ** m3); 216 186 217 187 218 #endif /* _NRARITH2_H_ */ 219 220 // Local Variables: 221 // tab-width: 4 222 // c-basic-offset: 4 223 // c-file-offsets:((innamespace . 0)(inline-open . 0)) 224 // indent-tabs-mode: nil 225 // End: 226 227 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 228
Note: See TracChangeset
for help on using the changeset viewer.