示例#1
0
文件: palette.hpp 项目: hxford/FLIF
 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);
 }
示例#2
0
文件: bounds.hpp 项目: nabePi/FLIF
 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);
 }
示例#3
0
 void minmax(const int p, const prevPlanes &pp, ColorVal &minv, ColorVal &maxv) const override { ranges->minmax(p,pp,minv,maxv); }
示例#4
0
文件: yiq.hpp 项目: nabePi/FLIF
 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);
 }
示例#6
0
文件: yc1c2.hpp 项目: DarkZeros/FLIF
 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);
 }