source: soft/giet_vm/applications/rosenfeld/nrc2/include/nrarith1.h @ 772

Last change on this file since 772 was 772, checked in by meunier, 8 years ago
  • Ajout de l'application rosenfeld
  • Changement du nom du flag O_CREATE en O_CREAT
File size: 4.8 KB
Line 
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
17extern "C" {
18#endif
19
20#ifdef PRAGMA_VERBOSE
21//#pragma message("- include nrarith1.h")
22#endif
23
24/* ======================================================================== */
25/* === Beta reduction ===================================================== */
26/* ======================================================================== */
27
28IMAGE_EXPORT(int32) sum_bvector (byte  *v, long nl, long nh);
29IMAGE_EXPORT(int32) sum_si16vector (sint16  *v, long nl, long nh);
30IMAGE_EXPORT(int32) sum_si32vector (sint32   *v, long nl, long nh);
31IMAGE_EXPORT(float) sum_f32vector  (float32 *v, long nl, long nh);
32
33// ==================
34// === min_vector ===
35// ==================
36
37IMAGE_EXPORT(sint8)   min_si8vector  (sint8   *v, long nl, long nh);
38IMAGE_EXPORT(uint8)   min_ui8vector  (uint8   *v, long nl, long nh);
39IMAGE_EXPORT(sint16)  min_si16vector (sint16  *v, long nl, long nh);
40IMAGE_EXPORT(uint16)  min_ui16vector (uint16  *v, long nl, long nh);
41IMAGE_EXPORT(sint32)  min_si32vector (sint32  *v, long nl, long nh);
42IMAGE_EXPORT(uint32)  min_ui32vector (uint32  *v, long nl, long nh);
43IMAGE_EXPORT(float32) min_f32vector  (float32 *v, long nl, long nh);
44IMAGE_EXPORT(float64) min_f64vector  (float64 *v, long nl, long nh);
45
46// ==================
47// === max_vector ===
48// ==================
49
50IMAGE_EXPORT(sint8)  max_si8vector  (sint8   *v, long nl, long nh);
51IMAGE_EXPORT(uint8)  max_ui8vector  (uint8   *v, long nl, long nh);
52IMAGE_EXPORT(sint16) max_si16vector (sint16  *v, long nl, long nh);
53IMAGE_EXPORT(uint16) max_ui16vector (uint16  *v, long nl, long nh);
54IMAGE_EXPORT(sint32) max_si32vector (sint32  *v, long nl, long nh);
55IMAGE_EXPORT(uint32) max_ui32vector (uint32  *v, long nl, long nh);
56
57IMAGE_EXPORT(float32) max_f32vector (float32 *v, long nl, long nh);
58IMAGE_EXPORT(float64) max_f64vector (float64 *v, long nl, long nh);
59
60// ======================
61// === min_vector_pos ===
62// ======================
63
64IMAGE_EXPORT(sint8)  min_si8vector_pos  (sint8  *v, long nl, long nh, int *pos);
65IMAGE_EXPORT(uint8)  min_ui8vector_pos  (uint8  *v, long nl, long nh, int *pos);
66IMAGE_EXPORT(sint16) min_si16vector_pos (sint16 *v, long nl, long nh, int *pos);
67IMAGE_EXPORT(uint16) min_ui16vector_pos (uint16 *v, long nl, long nh, int *pos);
68IMAGE_EXPORT(sint32) min_si32vector_pos (sint32 *v, long nl, long nh, int *pos);
69IMAGE_EXPORT(uint32) min_ui32vector_pos (uint32 *v, long nl, long nh, int *pos);
70
71IMAGE_EXPORT(float32)min_f32vector_pos (float32 *v, long nl, long nh, int *pos);
72IMAGE_EXPORT(float64)min_f64vector_pos (float64 *v, long nl, long nh, int *pos);
73
74// ======================
75// === max_vector_pos ===
76// ======================
77
78IMAGE_EXPORT(sint8)  max_si8vector_pos  (sint8  *v, long nl, long nh, int *pos);
79IMAGE_EXPORT(uint8)  max_ui8vector_pos  (uint8  *v, long nl, long nh, int *pos);
80IMAGE_EXPORT(sint16) max_si16vector_pos (sint16 *v, long nl, long nh, int *pos);
81IMAGE_EXPORT(uint16) max_ui16vector_pos (uint16 *v, long nl, long nh, int *pos);
82IMAGE_EXPORT(sint32) max_si32vector_pos (sint32 *v, long nl, long nh, int *pos);
83IMAGE_EXPORT(uint32) max_ui32vector_pos (uint32 *v, long nl, long nh, int *pos);
84
85IMAGE_EXPORT(float32)max_f32vector_pos (float32 *v, long nl, long nh, int *pos);
86IMAGE_EXPORT(float64)max_f64vector_pos (float64 *v, long nl, long nh, int *pos);
87
88// =============
89// === other ===
90// =============
91
92IMAGE_EXPORT(void) beta_sum_rgb32vector    (rgb32 *S,long nl,long nh, rgb32 *D);
93IMAGE_EXPORT(void) beta_average_rgb32vector(rgb32 *S,long nl,long nh, rgb32 *D);
94
95IMAGE_EXPORT(void) add_i32vector(int32 *S1, long nl,long nh, int32 *S2, int32 *D);
96IMAGE_EXPORT(void) sub_i32vector(int32 *S1, long nl,long nh, int32 *S2, int32 *D);
97
98IMAGE_EXPORT(void) cumulleft_i32vector  (int32 *S, long nl, long nh, int32 *D);
99IMAGE_EXPORT(void) cumulleft_rgb32vector(rgb32 *S, long nl, long nh, rgb32 *D);
100
101IMAGE_EXPORT(void) cumulright_i32vector  (int32 *S, long nl, long nh, int32 *D);
102IMAGE_EXPORT(void) cumulright_rgb32vector(rgb32 *S, long nl, long nh, rgb32 *D);
103
104IMAGE_EXPORT(void) mulc_i32vector     (int32 *S, long nl, long nh, int32 c, int32 *D);
105IMAGE_EXPORT(void) mulc_rgb32vector   (rgb32 *S, long nl, long nh, int32 c, rgb32 *D);
106IMAGE_EXPORT(void) divc_i32vector     (int32 *S, long nl, long nh, int32 c, int32 *D);
107IMAGE_EXPORT(void) divc_rgb32vector   (rgb32 *S, long nl, long nh, int32 c, rgb32 *D);
108
109IMAGE_EXPORT(void) mulfrac_i32vector  (int32 *S, long nl, long nh, int32 a, int32 b, int32 *D);
110IMAGE_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_ */
Note: See TracBrowser for help on using the repository browser.