void minmax(const int p, const prevPlanes &pp, ColorVal &minv, ColorVal &maxv) const { if (p==1) { minv=0; maxv=nb_colors-1; return; } else if (p<3) { minv=0; maxv=0; return; } else ranges->minmax(p,pp,minv,maxv); }
void minmax(const int p, const prevPlanes &pp, ColorVal &min, ColorVal &max) const { assert(p<numPlanes()); if (p==0 || p==3) { min=bounds[p].first; max=bounds[p].second; return; } // optimization for special case ranges->minmax(p, pp, min, max); if (min < bounds[p].first) min=bounds[p].first; if (max > bounds[p].second) max=bounds[p].second; if (min>max) { // should happen only if alpha=0 interpolation produces YI combination for which Q range from ColorRangesYIQ is outside bounds min=bounds[p].first; max=bounds[p].second; } assert(min <= max); }
void minmax(const int p, const prevPlanes &pp, ColorVal &minv, ColorVal &maxv) const override { ranges->minmax(p,pp,minv,maxv); }
void minmax(const int p, const prevPlanes &pp, ColorVal &minv, ColorVal &maxv) const { if (p==1) { minv=get_min_i(par, pp[0]); maxv=get_max_i(par, pp[0]); return; } else if (p==2) { minv=get_min_q(par, pp[0], pp[1]); maxv=get_max_q(par, pp[0], pp[1]); return; } else if (p==0) { minv=0; maxv=get_max_y(par); return;} else ranges->minmax(p,pp,minv,maxv); }
void minmax(const int p, const prevPlanes &pp, ColorVal &mi, ColorVal &ma) const { if (p >= 3) { mi=min(p); ma=max(p); } else ranges->minmax(p, pp, mi, ma); }
void minmax(const int p, const prevPlanes &pp, ColorVal &minv, ColorVal &maxv) const { if (p<3) { minv=min(p); maxv=max(p); return; } else ranges->minmax(p,pp,minv,maxv); }