"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Libtmp/Image2D/resample.c" between
PDL-2.082.tar.gz and PDL-2.083.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

resample.c  (PDL-2.082):resample.c  (PDL-2.083)
skipping to change at line 301 skipping to change at line 301
tab[0] = 1.0 ; tab[0] = 1.0 ;
tab[samples-1] = 0.0 ; tab[samples-1] = 0.0 ;
for (i=1 ; i<samples ; i++) { for (i=1 ; i<samples ; i++) {
x = 2.0 * (long double)i/(long double)(samples-1) ; x = 2.0 * (long double)i/(long double)(samples-1) ;
tab[i] = sinc(x) ; tab[i] = sinc(x) ;
tab[i] *= tab[i] ; tab[i] *= tab[i] ;
} }
} else if (!strcmp(kernel_type, "lanczos")) { } else if (!strcmp(kernel_type, "lanczos")) {
for (i=0 ; i<samples ; i++) { for (i=0 ; i<samples ; i++) {
x = (long double)KERNEL_WIDTH * (long double)i/(long doub le)(samples-1) ; x = (long double)KERNEL_WIDTH * (long double)i/(long doub le)(samples-1) ;
if (fabs(x)<2) { if (fabsl(x)<2) {
tab[i] = sinc(x) * sinc(x/2) ; tab[i] = sinc(x) * sinc(x/2) ;
} else { } else {
tab[i] = 0.00 ; tab[i] = 0.00 ;
} }
} }
} else if (!strcmp(kernel_type, "hamming")) { } else if (!strcmp(kernel_type, "hamming")) {
alpha = 0.54 ; alpha = 0.54 ;
inv_norm = 1.00 / (long double)(samples - 1) ; inv_norm = 1.00 / (long double)(samples - 1) ;
for (i=0 ; i<samples ; i++) { for (i=0 ; i<samples ; i++) {
x = (long double)i ; x = (long double)i ;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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