[772] | 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 | |
---|
[826] | 19 | #define dup_type_matrix(t) \ |
---|
| 20 | void short_name(t,dup_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y); |
---|
[772] | 21 | |
---|
[826] | 22 | dup_type_matrix(int8_t); |
---|
| 23 | dup_type_matrix(uint8_t); |
---|
| 24 | dup_type_matrix(int16_t); |
---|
| 25 | dup_type_matrix(uint16_t); |
---|
| 26 | dup_type_matrix(int32_t); |
---|
| 27 | dup_type_matrix(uint32_t); |
---|
| 28 | dup_type_matrix(int64_t); |
---|
| 29 | dup_type_matrix(uint64_t); |
---|
| 30 | dup_type_matrix(float); |
---|
| 31 | dup_type_matrix(double); |
---|
| 32 | dup_type_matrix(rgb8); |
---|
| 33 | dup_type_matrix(rgbx8); |
---|
[772] | 34 | |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | /* |
---|
| 38 | * -------------- |
---|
| 39 | * --- resize --- |
---|
| 40 | * -------------- |
---|
| 41 | */ |
---|
| 42 | |
---|
[826] | 43 | #undef resize_type_matrix |
---|
| 44 | #define resize_type_matrix(t) \ |
---|
| 45 | void short_name(t,resize_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch); |
---|
[772] | 46 | |
---|
[826] | 47 | resize_type_matrix(int8_t); |
---|
| 48 | resize_type_matrix(uint8_t); |
---|
| 49 | resize_type_matrix(int16_t); |
---|
| 50 | resize_type_matrix(uint16_t); |
---|
| 51 | resize_type_matrix(int32_t); |
---|
| 52 | resize_type_matrix(uint32_t); |
---|
| 53 | resize_type_matrix(int64_t); |
---|
| 54 | resize_type_matrix(uint64_t); |
---|
| 55 | resize_type_matrix(float); |
---|
| 56 | resize_type_matrix(double); |
---|
| 57 | resize_type_matrix(rgb8); |
---|
| 58 | resize_type_matrix(rgbx8); |
---|
[772] | 59 | |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | /* |
---|
| 63 | * ---------------------- |
---|
| 64 | * --- convert matrix --- |
---|
| 65 | * ---------------------- |
---|
| 66 | */ |
---|
| 67 | |
---|
[826] | 68 | #define convert_type_matrix(t1,t2) \ |
---|
| 69 | void 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); |
---|
[772] | 70 | |
---|
[826] | 71 | convert_type_matrix(int8_t,int16_t); |
---|
| 72 | convert_type_matrix(int8_t,int32_t); |
---|
| 73 | convert_type_matrix(int8_t,float); |
---|
| 74 | convert_type_matrix(int8_t,double); |
---|
| 75 | convert_type_matrix(uint8_t,uint16_t); |
---|
| 76 | convert_type_matrix(uint8_t,uint32_t); |
---|
| 77 | convert_type_matrix(uint8_t,float); |
---|
| 78 | convert_type_matrix(uint8_t,double); |
---|
| 79 | convert_type_matrix(uint8_t,rgb8); |
---|
| 80 | convert_type_matrix(uint8_t,rgbx8); |
---|
| 81 | convert_type_matrix(int16_t,int32_t); |
---|
| 82 | convert_type_matrix(int16_t,float); |
---|
| 83 | convert_type_matrix(int16_t,double); |
---|
| 84 | convert_type_matrix(uint16_t,uint32_t); |
---|
| 85 | convert_type_matrix(uint16_t,float); |
---|
| 86 | convert_type_matrix(uint16_t,double); |
---|
| 87 | convert_type_matrix(int32_t,float); |
---|
| 88 | convert_type_matrix(int32_t,double); |
---|
| 89 | convert_type_matrix(uint32_t,float); |
---|
| 90 | convert_type_matrix(uint32_t,double); |
---|
[772] | 91 | |
---|
[826] | 92 | convert_type_matrix(int16_t,int8_t); |
---|
| 93 | convert_type_matrix(uint16_t,uint8_t); |
---|
| 94 | convert_type_matrix(int32_t,int8_t); |
---|
| 95 | convert_type_matrix(uint32_t,uint8_t); |
---|
| 96 | convert_type_matrix(int32_t,int16_t); |
---|
| 97 | convert_type_matrix(uint32_t,uint16_t); |
---|
| 98 | convert_type_matrix(float,int8_t); |
---|
| 99 | convert_type_matrix(float,uint8_t); |
---|
| 100 | convert_type_matrix(float,int16_t); |
---|
| 101 | convert_type_matrix(float,uint16_t); |
---|
| 102 | convert_type_matrix(float,int32_t); |
---|
| 103 | convert_type_matrix(float,uint32_t); |
---|
| 104 | convert_type_matrix(double,int8_t); |
---|
| 105 | convert_type_matrix(double,uint8_t); |
---|
| 106 | convert_type_matrix(double,int16_t); |
---|
| 107 | convert_type_matrix(double,uint16_t); |
---|
| 108 | convert_type_matrix(double,int32_t); |
---|
| 109 | convert_type_matrix(double,uint32_t); |
---|
| 110 | convert_type_matrix(double,float); |
---|
| 111 | convert_type_matrix(rgb8,uint8_t); |
---|
[772] | 112 | |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | /* |
---|
| 116 | * ---------------------- |
---|
| 117 | * --- lowpart_matrix --- |
---|
| 118 | * ---------------------- |
---|
| 119 | */ |
---|
| 120 | |
---|
[826] | 121 | void lowpart_ui16matrix_ui8matrix(uint16_t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, uint8_t ** Y); |
---|
| 122 | void lowpart_ui32matrix_ui8matrix(uint32_t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, uint8_t ** Y); |
---|
[772] | 123 | |
---|
[826] | 124 | |
---|
[772] | 125 | /* |
---|
| 126 | * ------------------- |
---|
| 127 | * --- split-merge --- |
---|
| 128 | * ------------------- |
---|
| 129 | */ |
---|
| 130 | |
---|
[826] | 131 | void 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); |
---|
| 132 | void 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); |
---|
[772] | 133 | |
---|
[826] | 134 | #endif /* _NRMEM2_H_ */ |
---|
[772] | 135 | |
---|
[826] | 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: |
---|
[772] | 142 | |
---|
[826] | 143 | // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
| 144 | |
---|