|
Lines 1-5
Link Here
|
| 1 |
--- src/hdrhtml/hdrhtml.cpp.orig 2009-03-11 21:45:55.000000000 +0000 |
1 |
--- src/hdrhtml/hdrhtml.cpp.orig 2009-03-11 21:45:55 UTC |
| 2 |
+++ src/hdrhtml/hdrhtml.cpp 2014-02-20 19:04:01.566588122 +0000 |
2 |
+++ src/hdrhtml/hdrhtml.cpp |
| 3 |
@@ -27,6 +27,7 @@ |
3 |
@@ -27,6 +27,7 @@ |
| 4 |
|
4 |
|
| 5 |
#include "hdrhtml.h" |
5 |
#include "hdrhtml.h" |
|
Lines 17-23
Link Here
|
| 17 |
// ================================================ |
17 |
// ================================================ |
| 18 |
// Parameters controllig the web page |
18 |
// Parameters controllig the web page |
| 19 |
// ================================================ |
19 |
// ================================================ |
| 20 |
@@ -94,8 +97,8 @@ |
20 |
@@ -94,8 +97,8 @@ public: |
| 21 |
|
21 |
|
| 22 |
if( min_val > max_val ) // missing min/max info |
22 |
if( min_val > max_val ) // missing min/max info |
| 23 |
{ |
23 |
{ |
|
Lines 28-34
Link Here
|
| 28 |
|
28 |
|
| 29 |
for( int k=0; k < d_size; k++ ) { |
29 |
for( int k=0; k < d_size; k++ ) { |
| 30 |
if( data[k] > max_val ) max_val = data[k]; |
30 |
if( data[k] > max_val ) max_val = data[k]; |
| 31 |
@@ -195,6 +198,7 @@ |
31 |
@@ -195,6 +198,7 @@ public: |
| 32 |
this->y_i = new float[lut_size]; |
32 |
this->y_i = new float[lut_size]; |
| 33 |
own_y_i = true; |
33 |
own_y_i = true; |
| 34 |
memcpy(this->y_i, other.y_i, lut_size * sizeof(float)); |
34 |
memcpy(this->y_i, other.y_i, lut_size * sizeof(float)); |
|
Lines 36-42
Link Here
|
| 36 |
} |
36 |
} |
| 37 |
|
37 |
|
| 38 |
~UniformArrayLUT() |
38 |
~UniformArrayLUT() |
| 39 |
@@ -341,7 +345,7 @@ |
39 |
@@ -341,7 +345,7 @@ public: |
| 40 |
for( int k = 1; k < bin_n; k++ ) |
40 |
for( int k = 1; k < bin_n; k++ ) |
| 41 |
hist.n[k] += hist.n[k-1]; |
41 |
hist.n[k] += hist.n[k-1]; |
| 42 |
|
42 |
|
|
Lines 45-51
Link Here
|
| 45 |
assert( hist.n[bin_n-1] == d_size ); |
45 |
assert( hist.n[bin_n-1] == d_size ); |
| 46 |
} |
46 |
} |
| 47 |
|
47 |
|
| 48 |
@@ -361,7 +365,7 @@ |
48 |
@@ -361,7 +365,7 @@ public: |
| 49 |
// Text template file utils |
49 |
// Text template file utils |
| 50 |
// ================================================ |
50 |
// ================================================ |
| 51 |
|
51 |
|
|
Lines 54-60
Link Here
|
| 54 |
|
54 |
|
| 55 |
class ReplacePattern |
55 |
class ReplacePattern |
| 56 |
{ |
56 |
{ |
| 57 |
@@ -403,7 +407,7 @@ |
57 |
@@ -403,7 +407,7 @@ public: |
| 58 |
{ |
58 |
{ |
| 59 |
} |
59 |
} |
| 60 |
|
60 |
|
|
Lines 63-69
Link Here
|
| 63 |
{ |
63 |
{ |
| 64 |
if( callback != NULL ) |
64 |
if( callback != NULL ) |
| 65 |
callback( out, user_data, parameter ); |
65 |
callback( out, user_data, parameter ); |
| 66 |
@@ -567,7 +571,7 @@ |
66 |
@@ -567,7 +571,7 @@ public: |
| 67 |
// Skip white spaces |
67 |
// Skip white spaces |
| 68 |
while( line_str[pos] == ' ' || line_str[pos] == '\t' ) pos++; |
68 |
while( line_str[pos] == ' ' || line_str[pos] == '\t' ) pos++; |
| 69 |
int new_pos = line_str.find_first_of( ',', pos ); |
69 |
int new_pos = line_str.find_first_of( ',', pos ); |
|
Lines 72-78
Link Here
|
| 72 |
if( new_pos == std::string::npos ) { |
72 |
if( new_pos == std::string::npos ) { |
| 73 |
if( k != columns-1 ) { |
73 |
if( k != columns-1 ) { |
| 74 |
std::string full_message( "Missing column data in the file: " ); |
74 |
std::string full_message( "Missing column data in the file: " ); |
| 75 |
@@ -576,16 +580,16 @@ |
75 |
@@ -576,16 +580,16 @@ public: |
| 76 |
} |
76 |
} |
| 77 |
len = std::string::npos; |
77 |
len = std::string::npos; |
| 78 |
} else |
78 |
} else |
|
Lines 92-98
Link Here
|
| 92 |
value = strtof( str_beg, &str_end ); |
92 |
value = strtof( str_beg, &str_end ); |
| 93 |
if( str_beg == str_end ) { |
93 |
if( str_beg == str_end ) { |
| 94 |
std::ostringstream error_message; |
94 |
std::ostringstream error_message; |
| 95 |
@@ -643,15 +647,15 @@ |
95 |
@@ -643,15 +647,15 @@ void HDRHTMLSet::add_image( int width, i |
| 96 |
basis_table.data[0][k] = log2f( basis_table.data[0][k] ); |
96 |
basis_table.data[0][k] = log2f( basis_table.data[0][k] ); |
| 97 |
|
97 |
|
| 98 |
// Fix zero and negative values in the image, convert to log2 space, find min and max values |
98 |
// Fix zero and negative values in the image, convert to log2 space, find min and max values |
|
Lines 111-117
Link Here
|
| 111 |
for( int i=0; i < pixels; i++ ) { |
111 |
for( int i=0; i < pixels; i++ ) { |
| 112 |
if( x[i] < min_val && x[i] > 0) |
112 |
if( x[i] < min_val && x[i] > 0) |
| 113 |
min_val = x[i]; |
113 |
min_val = x[i]; |
| 114 |
@@ -741,7 +745,7 @@ |
114 |
@@ -741,7 +745,7 @@ void HDRHTMLSet::add_image( int width, i |
| 115 |
for( int k=1; k <= f8_stops+1; k++ ) { |
115 |
for( int k=1; k <= f8_stops+1; k++ ) { |
| 116 |
|
116 |
|
| 117 |
|
117 |
|
|
Lines 120-126
Link Here
|
| 120 |
|
120 |
|
| 121 |
float exp_multip = log2f(1/powf( 2, l_start + k*8 )); |
121 |
float exp_multip = log2f(1/powf( 2, l_start + k*8 )); |
| 122 |
|
122 |
|
| 123 |
@@ -796,9 +800,9 @@ |
123 |
@@ -796,9 +800,9 @@ void HDRHTMLSet::add_image( int width, i |
| 124 |
|
124 |
|
| 125 |
} |
125 |
} |
| 126 |
|
126 |
|
|
Lines 133-139
Link Here
|
| 133 |
|
133 |
|
| 134 |
void HDRHTMLSet::generate_webpage( const char *page_template, const char *image_template, |
134 |
void HDRHTMLSet::generate_webpage( const char *page_template, const char *image_template, |
| 135 |
const char *object_output, const char *html_output) |
135 |
const char *object_output, const char *html_output) |
| 136 |
@@ -852,11 +856,11 @@ |
136 |
@@ -852,11 +856,11 @@ void HDRHTMLSet::generate_webpage( const |
| 137 |
|
137 |
|
| 138 |
} |
138 |
} |
| 139 |
|
139 |
|
|
Lines 147-153
Link Here
|
| 147 |
for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) { |
147 |
for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) { |
| 148 |
std::string obj_name( "hdr_" ); |
148 |
std::string obj_name( "hdr_" ); |
| 149 |
obj_name.append( it->base_name ); |
149 |
obj_name.append( it->base_name ); |
| 150 |
@@ -882,7 +886,7 @@ |
150 |
@@ -882,7 +886,7 @@ void print_image_objects( ostream &out, |
| 151 |
|
151 |
|
| 152 |
} |
152 |
} |
| 153 |
|
153 |
|
|
Lines 156-162
Link Here
|
| 156 |
{ |
156 |
{ |
| 157 |
std::string obj_name( "hdr_" ); |
157 |
std::string obj_name( "hdr_" ); |
| 158 |
obj_name.append( it.base_name ); |
158 |
obj_name.append( it.base_name ); |
| 159 |
@@ -907,13 +911,13 @@ |
159 |
@@ -907,13 +911,13 @@ void print_image_htmlcode( ostream &out, |
| 160 |
|
160 |
|
| 161 |
} |
161 |
} |
| 162 |
|
162 |
|
|
Lines 172-178
Link Here
|
| 172 |
for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) { |
172 |
for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) { |
| 173 |
if( it->base_name.compare( parameter ) == 0 ) |
173 |
if( it->base_name.compare( parameter ) == 0 ) |
| 174 |
break; |
174 |
break; |
| 175 |
@@ -925,7 +929,7 @@ |
175 |
@@ -925,7 +929,7 @@ void print_image_htmlcode( ostream &out, |
| 176 |
|
176 |
|
| 177 |
} else { |
177 |
} else { |
| 178 |
|
178 |
|
|
Lines 181-187
Link Here
|
| 181 |
for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) { |
181 |
for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) { |
| 182 |
|
182 |
|
| 183 |
print_image_htmlcode( out, hdrhtml_set, *it ); |
183 |
print_image_htmlcode( out, hdrhtml_set, *it ); |
| 184 |
@@ -935,7 +939,7 @@ |
184 |
@@ -935,7 +939,7 @@ void print_image_htmlcode( ostream &out, |
| 185 |
|
185 |
|
| 186 |
} |
186 |
} |
| 187 |
|
187 |
|