@@ -75,21 +75,23 @@ uint16_t *mltofx_rgba64_to_half(const uint16_t *src, int n_pixels)
7575 uint16_t * dst = malloc ((size_t ) count * sizeof (uint16_t ));
7676 if (!dst )
7777 return NULL ;
78+ int i ;
7879#ifdef _OPENMP
7980#pragma omp parallel for schedule(static)
8081#endif
81- for (int i = 0 ; i < count ; ++ i )
82+ for (i = 0 ; i < count ; ++ i )
8283 dst [i ] = f32_to_f16 ((float ) src [i ] * (1.0f / 65535.0f ));
8384 return dst ;
8485}
8586
8687void mltofx_half_to_rgba64 (const uint16_t * src , uint16_t * dst , int n_pixels )
8788{
8889 int count = n_pixels * 4 ;
90+ int i ;
8991#ifdef _OPENMP
9092#pragma omp parallel for schedule(static)
9193#endif
92- for (int i = 0 ; i < count ; ++ i ) {
94+ for (i = 0 ; i < count ; ++ i ) {
9395 float v = f16_to_f32 (src [i ]);
9496 // This clamping using >= and <= handles NaN and +/-inf
9597 v = (v >= 0.0f ) ? (v <= 1.0f ? v : 1.0f ) : 0.0f ;
@@ -103,21 +105,23 @@ float *mltofx_rgba64_to_float(const uint16_t *src, int n_pixels)
103105 float * dst = malloc ((size_t ) count * sizeof (float ));
104106 if (!dst )
105107 return NULL ;
108+ int i ;
106109#ifdef _OPENMP
107110#pragma omp parallel for schedule(static)
108111#endif
109- for (int i = 0 ; i < count ; ++ i )
112+ for (i = 0 ; i < count ; ++ i )
110113 dst [i ] = (float ) src [i ] * (1.0f / 65535.0f );
111114 return dst ;
112115}
113116
114117void mltofx_float_to_rgba64 (const float * src , uint16_t * dst , int n_pixels )
115118{
116119 int count = n_pixels * 4 ;
120+ int i ;
117121#ifdef _OPENMP
118122#pragma omp parallel for schedule(static)
119123#endif
120- for (int i = 0 ; i < count ; ++ i ) {
124+ for (i = 0 ; i < count ; ++ i ) {
121125 float v = src [i ];
122126 // This clamping using >= and <= handles NaN and +/-inf
123127 v = (v >= 0.0f ) ? (v <= 1.0f ? v : 1.0f ) : 0.0f ;
0 commit comments