Update of /cvsroot/ufraw/ufraw
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31527
Modified Files:
ufraw_ufraw.c
Log Message:
Simplify (and improve) calculation of ConvertShrink.
Index: ufraw_ufraw.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_ufraw.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- ufraw_ufraw.c 29 Sep 2009 01:03:11 -0000 1.188
+++ ufraw_ufraw.c 29 Sep 2009 03:52:13 -0000 1.189
@@ -715,25 +715,20 @@
else
temp_width = raw->raw.width;
+ uf->ConvertShrink = 1;
/* We can do a simple interpolation in the following cases:
* We shrink by an integer value.
- * If pixel_aspect<1 (e.g. NIKON D1X) shrink must be at least 4.
- * Wanted size is smaller than raw size (size is after a raw->shrink).
- * There are no filters (Foveon). */
- uf->ConvertShrink = 1;
- if ( uf->conf->interpolation==half_interpolation ||
- ( uf->conf->size==0 && uf->conf->shrink>1 ) ||
- ( uf->conf->size>0 &&
- uf->conf->size<=MAX(temp_height, temp_width) ) ||
- !uf->HaveFilters ) {
- if (uf->conf->size==0 && uf->conf->shrink>1 &&
- (int)(uf->conf->shrink*raw->pixel_aspect)%2==0)
- uf->ConvertShrink = uf->conf->shrink * raw->pixel_aspect;
- else if (uf->conf->interpolation==half_interpolation)
- uf->ConvertShrink = 2;
- else if ( uf->HaveFilters)
- uf->ConvertShrink = 2;
- }
+ * If pixel_aspect<1 (e.g. NIKON D1X) shrink must be at least 4. */
+ if (uf->conf->size==0 && uf->conf->shrink>1)
+ uf->ConvertShrink = uf->conf->shrink * raw->pixel_aspect;
+ else if (uf->conf->interpolation==half_interpolation)
+ uf->ConvertShrink = 2;
+ /* Wanted size is smaller than raw size (size is after a raw->shrink)
+ * (assuming there are filters). */
+ else if ( uf->conf->size>0 && uf->HaveFilters &&
+ uf->conf->size<=MAX(temp_height, temp_width) )
+ uf->ConvertShrink = 2;
+
return UFRAW_SUCCESS;
}
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs