min/max error initing x/y
This commit is contained in:
parent
b400918541
commit
15f7568423
16
TODO
16
TODO
@ -1,17 +1,15 @@
|
||||
- various failures in make check
|
||||
|
||||
setting x in vipsmin to nonsense
|
||||
|
||||
also vipsmax?
|
||||
|
||||
|
||||
|
||||
- move ifthenelse / blend to conversion? or arithmetic?
|
||||
|
||||
not ternary arithmetic ops since the condition image is always ucharo
|
||||
|
||||
maybe a subclass of binary, since the then & else images do need to be
|
||||
upcast to match
|
||||
|
||||
|
||||
|
||||
- try an area operation, like conv, VipsArea? oops no
|
||||
|
||||
- try an area operation, like conv, VipsArea? oops no haha what name should we
|
||||
use?
|
||||
|
||||
|
||||
|
||||
|
@ -150,17 +150,17 @@ static int
|
||||
vips_max_stop( VipsStatistic *statistic, void *seq )
|
||||
{
|
||||
VipsMax *global = (VipsMax *) statistic;
|
||||
VipsMax *max = (VipsMax *) seq;
|
||||
VipsMax *local = (VipsMax *) seq;
|
||||
|
||||
if( max->set &&
|
||||
(!global->set || max->max > global->max) ) {
|
||||
global->max = max->max;
|
||||
global->x = max->x;
|
||||
global->y = max->y;
|
||||
if( local->set &&
|
||||
(!global->set || local->max > global->max) ) {
|
||||
global->max = local->max;
|
||||
global->x = local->x;
|
||||
global->y = local->y;
|
||||
global->set = TRUE;
|
||||
}
|
||||
|
||||
g_free( max );
|
||||
g_free( local );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
@ -173,8 +173,11 @@ vips_max_stop( VipsStatistic *statistic, void *seq )
|
||||
\
|
||||
if( max->set ) \
|
||||
m = max->max; \
|
||||
else \
|
||||
else { \
|
||||
m = p[0]; \
|
||||
max->x = x; \
|
||||
max->y = y; \
|
||||
} \
|
||||
\
|
||||
for( i = 0; i < sz; i++ ) { \
|
||||
if( p[i] > m ) { \
|
||||
@ -196,8 +199,11 @@ vips_max_stop( VipsStatistic *statistic, void *seq )
|
||||
\
|
||||
if( max->set ) \
|
||||
m = max->max; \
|
||||
else \
|
||||
else { \
|
||||
m = p[0]; \
|
||||
max->x = x; \
|
||||
max->y = y; \
|
||||
} \
|
||||
\
|
||||
for( i = 0; i < sz; i++ ) { \
|
||||
if( p[i] > m ) { \
|
||||
@ -221,8 +227,11 @@ vips_max_stop( VipsStatistic *statistic, void *seq )
|
||||
\
|
||||
if( max->set ) \
|
||||
m = max->max; \
|
||||
else \
|
||||
else { \
|
||||
m = p[0] * p[0] + p[1] * p[1]; \
|
||||
max->x = x; \
|
||||
max->y = y; \
|
||||
} \
|
||||
\
|
||||
for( i = 0; i < sz; i++ ) { \
|
||||
double mod; \
|
||||
|
@ -173,8 +173,11 @@ vips_min_stop( VipsStatistic *statistic, void *seq )
|
||||
\
|
||||
if( min->set ) \
|
||||
m = min->min; \
|
||||
else \
|
||||
else { \
|
||||
m = p[0]; \
|
||||
min->x = x; \
|
||||
min->y = y; \
|
||||
} \
|
||||
\
|
||||
for( i = 0; i < sz; i++ ) { \
|
||||
if( p[i] < m ) { \
|
||||
@ -196,8 +199,11 @@ vips_min_stop( VipsStatistic *statistic, void *seq )
|
||||
\
|
||||
if( min->set ) \
|
||||
m = min->min; \
|
||||
else \
|
||||
else { \
|
||||
m = p[0]; \
|
||||
min->x = x; \
|
||||
min->y = y; \
|
||||
} \
|
||||
\
|
||||
for( i = 0; i < sz; i++ ) { \
|
||||
if( p[i] < m ) { \
|
||||
@ -221,8 +227,11 @@ vips_min_stop( VipsStatistic *statistic, void *seq )
|
||||
\
|
||||
if( min->set ) \
|
||||
m = min->min; \
|
||||
else \
|
||||
else { \
|
||||
m = p[0] * p[0] + p[1] * p[1]; \
|
||||
min->x = x; \
|
||||
min->y = y; \
|
||||
} \
|
||||
\
|
||||
for( i = 0; i < sz; i++ ) { \
|
||||
double mod; \
|
||||
|
Loading…
Reference in New Issue
Block a user