Update of /cvsroot/ufraw/ufraw
In directory vz-cvs-2.sog:/tmp/cvs-serv24283
Modified Files:
dcraw_indi.c ufraw_ufraw.c
Log Message:
Beautify code.
Index: ufraw_ufraw.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_ufraw.c,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -d -r1.260 -r1.261
--- ufraw_ufraw.c 22 Mar 2011 01:45:23 -0000 1.260
+++ ufraw_ufraw.c 17 Apr 2011 11:00:29 -0000 1.261
@@ -38,11 +38,12 @@
static void ufraw_convert_image_vignetting(ufraw_data *uf,
ufraw_image_data *img, UFRectangle *area);
static void ufraw_convert_image_tca(ufraw_data *uf, ufraw_image_data *img,
- ufraw_image_data *outimg, UFRectangle *area);
+ ufraw_image_data *outimg,
+ UFRectangle *area);
void ufraw_prepare_tca(ufraw_data *uf);
#endif
static void ufraw_image_format(int *colors, int *bytes, ufraw_image_data *img,
- const char *formats, const char *caller);
+ const char *formats, const char *caller);
static void ufraw_convert_image_raw(ufraw_data *uf, UFRawPhase phase);
static void ufraw_convert_image_first(ufraw_data *uf, UFRawPhase phase);
static void ufraw_convert_image_transform(ufraw_data *uf, ufraw_image_data
*img,
@@ -53,7 +54,7 @@
ufraw_image_data *img, int width, int height);
static void ufraw_convert_reverse_wb(ufraw_data *uf, UFRawPhase phase);
static void ufraw_convert_import_buffer(ufraw_data *uf, UFRawPhase phase,
- dcraw_image_data *dcimg);
+ dcraw_image_data *dcimg);
static int make_temporary(char *basefilename, char **tmpfilename)
{
@@ -885,7 +886,8 @@
* - use uf->rgbMax (check, must be about 64k)
*/
static void ufraw_shave_hotpixels(ufraw_data *uf, dcraw_image_type *img,
- int width, int height, int colors, unsigned rgbMax)
+ int width, int height, int colors,
+ unsigned rgbMax)
{
int w, h, c, i, count;
unsigned delta, t, v, hi;
@@ -945,7 +947,7 @@
}
static void ufraw_despeckle_line(guint16 *base, int step, int size, int window,
- double decay, int colors, int c)
+ double decay, int colors, int c)
{
unsigned lum[size];
int i, j, start, end, next, v, cold, hot, coldj, hotj, fix;
@@ -1063,7 +1065,7 @@
* only calculated later in ufraw_convert_prepare_transform_buffer().
* Therefore, if size > 0, scale = 1 will be returned.
* Since the first call is from ufraw_convert_prepare_first_buffer(),
- * this is not a real issue. There should always be a second call to
+ * this is not a real issue. There should always be a second call to
* this function before the actual buffer allocation. */
dcraw_data *raw = uf->raw;
int scale = 1;
@@ -1075,8 +1077,8 @@
scale = uf->conf->shrink * MIN(raw->pixel_aspect, 1 /
raw->pixel_aspect);
} else if (uf->conf->interpolation == half_interpolation) {
scale = 2;
- /* Wanted size is smaller than raw size (size is after a raw->shrink)
- * (assuming there are filters). */
+ /* 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) {
int cropHeight = uf->conf->CropY2 - uf->conf->CropY1;
int cropWidth = uf->conf->CropX2 - uf->conf->CropX1;
@@ -1235,7 +1237,8 @@
#ifdef HAVE_LENSFUN
/* Apply TCA */
static void ufraw_convert_image_tca(ufraw_data *uf, ufraw_image_data *img,
- ufraw_image_data *outimg, UFRectangle *area)
+ ufraw_image_data *outimg,
+ UFRectangle *area)
{
if (uf->TCAmodifier == NULL)
return;
@@ -1288,7 +1291,7 @@
#endif // HAVE_LENSFUN
static void ufraw_convert_import_buffer(ufraw_data *uf, UFRawPhase phase,
- dcraw_image_data *dcimg)
+ dcraw_image_data *dcimg)
{
ufraw_image_data *img = &uf->Images[phase];
@@ -1301,7 +1304,7 @@
}
static void ufraw_image_init(ufraw_image_data *img,
- int width, int height, int bitdepth)
+ int width, int height, int bitdepth)
{
if (img->height == height && img->width == width &&
img->depth == bitdepth && img->buffer != NULL)
@@ -1358,7 +1361,8 @@
#ifdef HAVE_LENSFUN
void ufraw_convert_prepare_transform(ufraw_data *uf,
- int width, int height, gboolean reverse, float scale);
+ int width, int height, gboolean reverse,
+ float scale);
#endif
static void ufraw_convert_prepare_transform_buffer(ufraw_data *uf,
@@ -1505,7 +1509,7 @@
* constants by variables may turn off some compiler optimizations.
*/
static void ufraw_image_format(int *colors, int *bytes, ufraw_image_data *img,
- const char *formats, const char *caller)
+ const char *formats, const char *caller)
{
int b, c;
@@ -1538,7 +1542,7 @@
}
ufraw_image_data *ufraw_get_image(ufraw_data *uf, UFRawPhase phase,
- gboolean bufferok)
+ gboolean bufferok)
{
ufraw_convert_prepare_buffers(uf, phase);
// Find the closest phase that is actually rendered:
Index: dcraw_indi.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/dcraw_indi.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- dcraw_indi.c 13 Apr 2011 11:45:22 -0000 1.89
+++ dcraw_indi.c 17 Apr 2011 11:00:28 -0000 1.90
@@ -115,9 +115,11 @@
}
void CLASS wavelet_denoise_INDI(ushort(*image)[4], const int black,
- const int iheight, const int iwidth, const int height, const int width,
- const int colors, const int shrink, const float pre_mul[4],
- const float threshold, const unsigned filters)
+ const int iheight, const int iwidth,
+ const int height, const int width,
+ const int colors, const int shrink,
+ const float pre_mul[4], const float threshold,
+ const unsigned filters)
{
float *fimg = 0, /* *temp,*/ thold, mul[2], avg, diff;
int /*scale=1,*/ size, lev, hpass, lpass, row, col, nc, c, i, wlast;
@@ -206,9 +208,9 @@
}
void CLASS scale_colors_INDI(int maximum, const int black,
- const int use_camera_wb, const float cam_mul[4], const int colors,
- float pre_mul[4], const unsigned filters, /*const*/ ushort white[8][8],
- const char *ifname_display, void *dcraw)
+const int use_camera_wb, const float cam_mul[4], const int colors,
+float pre_mul[4], const unsigned filters, /*const*/ ushort white[8][8],
+const char *ifname_display, void *dcraw)
{
unsigned /*bottom, right, size,*/ row, col, /*ur, uc, i, x, y,*/ c, sum[8];
int val, dark, sat;
@@ -248,8 +250,8 @@
}
FORC4 scale_mul[c] = (pre_mul[c] /= dmax) * 65535.0 / maximum;
dcraw_message(dcraw, DCRAW_VERBOSE,
- _("Scaling with darkness %d, saturation %d, and\nmultipliers"),
- dark, sat);
+ _("Scaling with darkness %d, saturation %d, and\nmultipliers"),
+ dark, sat);
FORC4 dcraw_message(dcraw, DCRAW_VERBOSE, " %f", pre_mul[c]);
dcraw_message(dcraw, DCRAW_VERBOSE, "\n");
@@ -257,7 +259,7 @@
}
void CLASS border_interpolate_INDI(const int height, const int width,
- ushort(*image)[4], const unsigned filters, int colors, int border)
+ushort(*image)[4], const unsigned filters, int colors, int border)
{
int row, col, y, x, f, c, sum[8];
@@ -280,7 +282,7 @@
}
void CLASS lin_interpolate_INDI(ushort(*image)[4], const unsigned filters,
- const int width, const int height, const int colors, void *dcraw) /*UF*/
+const int width, const int height, const int colors, void *dcraw) /*UF*/
{
int code[16][16][32], *ip, sum[4];
int c, i, x, y, row, col, shift, color;
@@ -337,7 +339,7 @@
Gradients are numbered clockwise from NW=0 to W=7.
*/
void CLASS vng_interpolate_INDI(ushort(*image)[4], const unsigned filters,
- const int width, const int height, const int colors, void *dcraw) /*UF*/
+const int width, const int height, const int colors, void *dcraw) /*UF*/
{
static const signed char *cp, terms[] = {
-2, -2, +0, -1, 0, 0x01, -2, -2, +0, +0, 1, 0x01, -2, -1, -1, +0, 0,
0x01,
@@ -481,7 +483,8 @@
Patterned Pixel Grouping Interpolation by Alain Desbiolles
*/
void CLASS ppg_interpolate_INDI(ushort(*image)[4], const unsigned filters,
- const int width, const int height, const int colors, void *dcraw)
+ const int width, const int height,
+ const int colors, void *dcraw)
{
int dir[5] = { 1, width, -1, -width, 1 };
int row, col, diff[2], guess[2], c, d, i;
@@ -559,8 +562,9 @@
#define TS 256 /* Tile Size */
void CLASS ahd_interpolate_INDI(ushort(*image)[4], const unsigned filters,
- const int width, const int height, const int colors,
- const float rgb_cam[3][4], void *dcraw)
+ const int width, const int height,
+ const int colors, const float rgb_cam[3][4],
+ void *dcraw)
{
int i, j, k, top, left, row, col, tr, tc, c, d, val, hm[2];
ushort(*pix)[4], (*rix)[3];
@@ -748,7 +752,7 @@
// Just making this function inline speeds up ahd_interpolate_INDI() up to 15%
static inline ushort eahd_median(int row, int col, int color,
- ushort(*image)[4], const int width)
+ ushort(*image)[4], const int width)
{
//declare the pixel array
int pArray[9];
@@ -780,7 +784,7 @@
// Add the color smoothing from Kimmel as suggested in the AHD paper
// Algorithm updated by Michael Goertz
void CLASS color_smooth(ushort(*image)[4], const int width, const int height,
- const int passes)
+ const int passes)
{
int row, col;
int row_start = 2;
@@ -810,8 +814,8 @@
}
void CLASS fuji_rotate_INDI(ushort(**image_p)[4], int *height_p,
- int *width_p, int *fuji_width_p, const int colors, const double step,
- void *dcraw)
+ int *width_p, int *fuji_width_p, const int colors,
+ const double step, void *dcraw)
{
int height = *height_p, width = *width_p, fuji_width = *fuji_width_p;
/*UF*/
ushort(*image)[4] = *image_p; /*UF*/
@@ -859,7 +863,7 @@
}
void CLASS flip_image_INDI(ushort(*image)[4], int *height_p, int *width_p,
- /*const*/ int flip) /*UF*/
+ /*const*/ int flip) /*UF*/
{
unsigned *flag;
int size, base, dest, next, row, col;
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs