"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/camera/mitsunaga99_numerical.cpp" between
pfstools-2.1.0.tgz and pfstools-2.2.0.tgz

About: pfstools are a set of command line programs (and one GUI program) for reading, writing, manipulating, and viewing high-dynamic range (HDR) images and video frames (similar as the netpbm package does for low-dynamic range images).

mitsunaga99_numerical.cpp  (pfstools-2.1.0.tgz):mitsunaga99_numerical.cpp  (pfstools-2.2.0.tgz)
skipping to change at line 128 skipping to change at line 128
if( n >= NR_LINEAR_EQUATIONS_MAX) { if( n >= NR_LINEAR_EQUATIONS_MAX) {
fprintf( stderr, "WARNING: too many equations (nr_solver_linear_e quations())\n"); fprintf( stderr, "WARNING: too many equations (nr_solver_linear_e quations())\n");
return 1; return 1;
} }
float dd; float dd;
int N = n+1; int N = n+1;
int indx[N]; int *indx = new int[N];
float bb[N]; float *bb = new float[N];
// int indx[N];
// float bb[N];
float** aa; float** aa;
aa = (float**)malloc(sizeof(float*) * N); aa = (float**)malloc(sizeof(float*) * N);
for(int i = 0; i < N; i++) for(int i = 0; i < N; i++)
aa[i] = (float*)malloc(sizeof(float) * N); aa[i] = (float*)malloc(sizeof(float) * N);
for( int i = 0; i < n; i++) { for( int i = 0; i < n; i++) {
bb[i+1] = b[i]; bb[i+1] = b[i];
for( int j = 0; j < n; j ++) { for( int j = 0; j < n; j ++) {
aa[i+1][j+1] = a[i][j]; aa[i+1][j+1] = a[i][j];
skipping to change at line 156 skipping to change at line 159
for(int i = 0; i < N; i++) for(int i = 0; i < N; i++)
if( aa[i] != NULL) if( aa[i] != NULL)
free(aa[i]); free(aa[i]);
if( aa != NULL) if( aa != NULL)
free(aa); free(aa);
for( int i = 0; i < n; i++) { for( int i = 0; i < n; i++) {
b[i] = bb[i+1]; b[i] = bb[i+1];
} }
delete[] indx;
delete[] bb;
return 0; return 0;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)