diff --git a/TODO b/TODO index 5cc732f3..b67d0a3e 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,7 @@ +- started bandjoinconst + + see also unaryconst.c + - looks like we have a race in tiled threadcache? see https://github.com/jcupitt/libvips/issues/347 diff --git a/libvips/conversion/bandjoin.c b/libvips/conversion/bandjoin.c index 6b616060..b04a332e 100644 --- a/libvips/conversion/bandjoin.c +++ b/libvips/conversion/bandjoin.c @@ -261,3 +261,22 @@ vips_bandjoin2( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) return( result ); } + +typedef struct _VipsBandjoinConst { + VipsBandary parent_instance; + + VipsImage *in; + VipsArrayDouble *c; + + /* The constant expanded to in's format, ready to be appended to each + * pixel. + */ + int n; + VipsPel *c_ready; + +} VipsBandjoinConst; + +typedef VipsBandaryClass VipsBandjoinConstClass; + +G_DEFINE_TYPE( VipsBandjoinConst, vips_bandjoin_const, VIPS_TYPE_BANDARY ); +