diff options
Diffstat (limited to 'converter/other/cameratopam/foveon.c')
-rw-r--r-- | converter/other/cameratopam/foveon.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/converter/other/cameratopam/foveon.c b/converter/other/cameratopam/foveon.c index 5a26777b..23cffe67 100644 --- a/converter/other/cameratopam/foveon.c +++ b/converter/other/cameratopam/foveon.c @@ -339,6 +339,8 @@ foveon_fixed (void * const ptr, return 1; } + + static float foveon_avg (unsigned short *pix, int range[2], float cfilt) { int i; @@ -353,6 +355,8 @@ static float foveon_avg (unsigned short *pix, int range[2], float cfilt) return (sum - min - max) / (range[1] - range[0] - 1); } + + static short *foveon_make_curve (double max, double mul, double filt) { short *curve; @@ -373,6 +377,8 @@ static short *foveon_make_curve (double max, double mul, double filt) return curve; } + + static void foveon_make_curves (short **curvep, float dq[3], float div[3], float filt) { @@ -384,12 +390,16 @@ static void foveon_make_curves FORC3 curvep[c] = foveon_make_curve (max, mul[c], filt); } + + static int foveon_apply_curve (short *curve, int i) { if (abs(i) >= (unsigned short)curve[0]) return 0; return i < 0 ? -(unsigned short)curve[1-i] : (unsigned short)curve[1+i]; } + + void foveon_interpolate(Image const image, float coeff[3][4]) { @@ -797,3 +807,6 @@ foveon_interpolate(Image const image, width = i; height = row; } + + + |