[772] | 1 | /* ------------------ */ |
---|
| 2 | /* --- nrarith1.h --- */ |
---|
| 3 | /* ------------------ */ |
---|
| 4 | |
---|
| 5 | /* |
---|
| 6 | * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved |
---|
| 7 | * Univ Paris Sud XI, CNRS |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #ifndef _NRARITH1_H_ |
---|
| 11 | #define _NRARITH1_H_ |
---|
| 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 nrarith1.h") |
---|
| 22 | #endif |
---|
| 23 | |
---|
| 24 | /* ======================================================================== */ |
---|
| 25 | /* === Beta reduction ===================================================== */ |
---|
| 26 | /* ======================================================================== */ |
---|
| 27 | |
---|
| 28 | IMAGE_EXPORT(int32) sum_bvector (byte *v, long nl, long nh); |
---|
| 29 | IMAGE_EXPORT(int32) sum_si16vector (sint16 *v, long nl, long nh); |
---|
| 30 | IMAGE_EXPORT(int32) sum_si32vector (sint32 *v, long nl, long nh); |
---|
| 31 | IMAGE_EXPORT(float) sum_f32vector (float32 *v, long nl, long nh); |
---|
| 32 | |
---|
| 33 | // ================== |
---|
| 34 | // === min_vector === |
---|
| 35 | // ================== |
---|
| 36 | |
---|
| 37 | IMAGE_EXPORT(sint8) min_si8vector (sint8 *v, long nl, long nh); |
---|
| 38 | IMAGE_EXPORT(uint8) min_ui8vector (uint8 *v, long nl, long nh); |
---|
| 39 | IMAGE_EXPORT(sint16) min_si16vector (sint16 *v, long nl, long nh); |
---|
| 40 | IMAGE_EXPORT(uint16) min_ui16vector (uint16 *v, long nl, long nh); |
---|
| 41 | IMAGE_EXPORT(sint32) min_si32vector (sint32 *v, long nl, long nh); |
---|
| 42 | IMAGE_EXPORT(uint32) min_ui32vector (uint32 *v, long nl, long nh); |
---|
| 43 | IMAGE_EXPORT(float32) min_f32vector (float32 *v, long nl, long nh); |
---|
| 44 | IMAGE_EXPORT(float64) min_f64vector (float64 *v, long nl, long nh); |
---|
| 45 | |
---|
| 46 | // ================== |
---|
| 47 | // === max_vector === |
---|
| 48 | // ================== |
---|
| 49 | |
---|
| 50 | IMAGE_EXPORT(sint8) max_si8vector (sint8 *v, long nl, long nh); |
---|
| 51 | IMAGE_EXPORT(uint8) max_ui8vector (uint8 *v, long nl, long nh); |
---|
| 52 | IMAGE_EXPORT(sint16) max_si16vector (sint16 *v, long nl, long nh); |
---|
| 53 | IMAGE_EXPORT(uint16) max_ui16vector (uint16 *v, long nl, long nh); |
---|
| 54 | IMAGE_EXPORT(sint32) max_si32vector (sint32 *v, long nl, long nh); |
---|
| 55 | IMAGE_EXPORT(uint32) max_ui32vector (uint32 *v, long nl, long nh); |
---|
| 56 | |
---|
| 57 | IMAGE_EXPORT(float32) max_f32vector (float32 *v, long nl, long nh); |
---|
| 58 | IMAGE_EXPORT(float64) max_f64vector (float64 *v, long nl, long nh); |
---|
| 59 | |
---|
| 60 | // ====================== |
---|
| 61 | // === min_vector_pos === |
---|
| 62 | // ====================== |
---|
| 63 | |
---|
| 64 | IMAGE_EXPORT(sint8) min_si8vector_pos (sint8 *v, long nl, long nh, int *pos); |
---|
| 65 | IMAGE_EXPORT(uint8) min_ui8vector_pos (uint8 *v, long nl, long nh, int *pos); |
---|
| 66 | IMAGE_EXPORT(sint16) min_si16vector_pos (sint16 *v, long nl, long nh, int *pos); |
---|
| 67 | IMAGE_EXPORT(uint16) min_ui16vector_pos (uint16 *v, long nl, long nh, int *pos); |
---|
| 68 | IMAGE_EXPORT(sint32) min_si32vector_pos (sint32 *v, long nl, long nh, int *pos); |
---|
| 69 | IMAGE_EXPORT(uint32) min_ui32vector_pos (uint32 *v, long nl, long nh, int *pos); |
---|
| 70 | |
---|
| 71 | IMAGE_EXPORT(float32)min_f32vector_pos (float32 *v, long nl, long nh, int *pos); |
---|
| 72 | IMAGE_EXPORT(float64)min_f64vector_pos (float64 *v, long nl, long nh, int *pos); |
---|
| 73 | |
---|
| 74 | // ====================== |
---|
| 75 | // === max_vector_pos === |
---|
| 76 | // ====================== |
---|
| 77 | |
---|
| 78 | IMAGE_EXPORT(sint8) max_si8vector_pos (sint8 *v, long nl, long nh, int *pos); |
---|
| 79 | IMAGE_EXPORT(uint8) max_ui8vector_pos (uint8 *v, long nl, long nh, int *pos); |
---|
| 80 | IMAGE_EXPORT(sint16) max_si16vector_pos (sint16 *v, long nl, long nh, int *pos); |
---|
| 81 | IMAGE_EXPORT(uint16) max_ui16vector_pos (uint16 *v, long nl, long nh, int *pos); |
---|
| 82 | IMAGE_EXPORT(sint32) max_si32vector_pos (sint32 *v, long nl, long nh, int *pos); |
---|
| 83 | IMAGE_EXPORT(uint32) max_ui32vector_pos (uint32 *v, long nl, long nh, int *pos); |
---|
| 84 | |
---|
| 85 | IMAGE_EXPORT(float32)max_f32vector_pos (float32 *v, long nl, long nh, int *pos); |
---|
| 86 | IMAGE_EXPORT(float64)max_f64vector_pos (float64 *v, long nl, long nh, int *pos); |
---|
| 87 | |
---|
| 88 | // ============= |
---|
| 89 | // === other === |
---|
| 90 | // ============= |
---|
| 91 | |
---|
| 92 | IMAGE_EXPORT(void) beta_sum_rgb32vector (rgb32 *S,long nl,long nh, rgb32 *D); |
---|
| 93 | IMAGE_EXPORT(void) beta_average_rgb32vector(rgb32 *S,long nl,long nh, rgb32 *D); |
---|
| 94 | |
---|
| 95 | IMAGE_EXPORT(void) add_i32vector(int32 *S1, long nl,long nh, int32 *S2, int32 *D); |
---|
| 96 | IMAGE_EXPORT(void) sub_i32vector(int32 *S1, long nl,long nh, int32 *S2, int32 *D); |
---|
| 97 | |
---|
| 98 | IMAGE_EXPORT(void) cumulleft_i32vector (int32 *S, long nl, long nh, int32 *D); |
---|
| 99 | IMAGE_EXPORT(void) cumulleft_rgb32vector(rgb32 *S, long nl, long nh, rgb32 *D); |
---|
| 100 | |
---|
| 101 | IMAGE_EXPORT(void) cumulright_i32vector (int32 *S, long nl, long nh, int32 *D); |
---|
| 102 | IMAGE_EXPORT(void) cumulright_rgb32vector(rgb32 *S, long nl, long nh, rgb32 *D); |
---|
| 103 | |
---|
| 104 | IMAGE_EXPORT(void) mulc_i32vector (int32 *S, long nl, long nh, int32 c, int32 *D); |
---|
| 105 | IMAGE_EXPORT(void) mulc_rgb32vector (rgb32 *S, long nl, long nh, int32 c, rgb32 *D); |
---|
| 106 | IMAGE_EXPORT(void) divc_i32vector (int32 *S, long nl, long nh, int32 c, int32 *D); |
---|
| 107 | IMAGE_EXPORT(void) divc_rgb32vector (rgb32 *S, long nl, long nh, int32 c, rgb32 *D); |
---|
| 108 | |
---|
| 109 | IMAGE_EXPORT(void) mulfrac_i32vector (int32 *S, long nl, long nh, int32 a, int32 b, int32 *D); |
---|
| 110 | IMAGE_EXPORT(void) mulfrac_rgb32vector(rgb32 *S, long nl, long nh, int32 a, int32 b, rgb32 *D); |
---|
| 111 | |
---|
| 112 | #ifdef __cplusplus |
---|
| 113 | } |
---|
| 114 | #endif |
---|
| 115 | |
---|
| 116 | #endif /* _NRARITH1_H_ */ |
---|