stuff
This commit is contained in:
parent
8d7071c0a2
commit
ea2285f315
18
TODO
18
TODO
@ -2,16 +2,11 @@
|
||||
|
||||
- shouldn't it be im_remainder_vec()?
|
||||
|
||||
- im_add(), im_subtract() etc. could all be in one file and share macros like
|
||||
boolean.c
|
||||
im_remainderconst_vec() is better? cf.
|
||||
|
||||
quite hard, because of things like complex *, / and liboil
|
||||
|
||||
- rint/ceil/floor can all common up too
|
||||
|
||||
- powtra, expntra as well
|
||||
|
||||
- im__math() no longer needs to be global?
|
||||
im_andimage()
|
||||
im_andimageconst()
|
||||
im_andimage_vec()
|
||||
|
||||
- booolean needs gtkdoc
|
||||
|
||||
@ -30,6 +25,11 @@
|
||||
|
||||
- Joe's new def
|
||||
|
||||
- im_add(), im_subtract() etc. could all be in one file and share macros like
|
||||
boolean.c
|
||||
|
||||
quite hard, because of things like complex *, / and liboil
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5,27 +5,26 @@ libarithmetic_la_SOURCES = \
|
||||
im_abs.c \
|
||||
im_add.c \
|
||||
im_avg.c \
|
||||
im_point_bilinear.c \
|
||||
im_bandmean.c \
|
||||
im_cross_phase.c \
|
||||
im_deviate.c \
|
||||
im_divide.c \
|
||||
im_expntra.c \
|
||||
im_invert.c \
|
||||
im_linreg.c \
|
||||
im_lintra.c \
|
||||
im_maxpos.c \
|
||||
im_maxpos_avg.c \
|
||||
im_maxpos.c \
|
||||
im_maxpos_vec.c \
|
||||
im_measure.c \
|
||||
im_minpos.c \
|
||||
im_multiply.c \
|
||||
im_powtra.c \
|
||||
im_point_bilinear.c \
|
||||
im_remainder.c \
|
||||
round.c \
|
||||
im_sign.c \
|
||||
math.c \
|
||||
im_stats.c \
|
||||
im_subtract.c
|
||||
im_subtract.c \
|
||||
math.c \
|
||||
power.c \
|
||||
round.c
|
||||
|
||||
INCLUDES = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/internal.h>
|
||||
|
||||
#ifdef WITH_DMALLOC
|
||||
#include <dmalloc.h>
|
||||
@ -75,9 +76,9 @@
|
||||
|
||||
/* Operator with a single constant on a buffer.
|
||||
*/
|
||||
#define CONST1_BUFFER( NAME, FUN ) \
|
||||
#define CONST1_BUFFER( FUN ) \
|
||||
static void \
|
||||
NAME ## 1_buffer( PEL *p, PEL *q, int n, PEL *vector, IMAGE *im ) \
|
||||
FUN ## 1_buffer( PEL *p, PEL *q, int n, PEL *vector, IMAGE *im ) \
|
||||
{ \
|
||||
/* Complex just doubles the size. \
|
||||
*/ \
|
||||
@ -165,12 +166,12 @@ FUN ## n_buffer( PEL *p, PEL *q, int n, PEL *vector, IMAGE *im ) \
|
||||
double x = (double) (X); \
|
||||
double e = (double) (E); \
|
||||
\
|
||||
if( f == 0.0 && e < 0.0 ) \
|
||||
if( x == 0.0 && e < 0.0 ) \
|
||||
/* Division by zero! Difficult to report tho' \
|
||||
*/ \
|
||||
(Y) = 0.0; \
|
||||
else \
|
||||
(Y) = pow( f, e ); \
|
||||
(Y) = pow( x, e ); \
|
||||
}
|
||||
|
||||
CONST1_BUFFER( POW )
|
||||
@ -179,12 +180,10 @@ CONSTN_BUFFER( POW )
|
||||
|
||||
/* Save a bit of typing.
|
||||
*/
|
||||
#define UC IM_BANDFMT_UCHAR
|
||||
#define C IM_BANDFMT_CHAR
|
||||
#define US IM_BANDFMT_USHORT
|
||||
#define S IM_BANDFMT_SHORT
|
||||
#define UI IM_BANDFMT_UINT
|
||||
#define I IM_BANDFMT_INT
|
||||
#define F IM_BANDFMT_FLOAT
|
||||
#define X IM_BANDFMT_COMPLEX
|
||||
#define D IM_BANDFMT_DOUBLE
|
||||
#define DX IM_BANDFMT_DPCOMPLEX
|
||||
|
||||
/* Type conversions for boolean.
|
||||
*/
|
||||
|
@ -140,7 +140,6 @@ int im__arith_binary_const( const char *name,
|
||||
IMAGE *in, IMAGE *out, int n, double *c,
|
||||
int format_table[10],
|
||||
im_wrapone_fn fn1, im_wrapone_fn fnn );
|
||||
int im__math( const char *name, IMAGE *in, IMAGE *out, im_wrapone_fn gen );
|
||||
int im__value( IMAGE *im, double *value );
|
||||
typedef int (*im__wrapscan_fn)( void *p, int n, void *seq, void *a, void *b );
|
||||
int im__wrapscan( IMAGE *in,
|
||||
|
Loading…
Reference in New Issue
Block a user