Lines Matching defs:rgb
33 RGB rgb; // rgb's prefix of that node
49 color_prefix(stored in rgb):width
146 inline RGB operator>>(RGB rgb, int s)
149 res.r = rgb.r >> s; res.g = rgb.g >> s; res.b = rgb.b >> s;
157 inline int childIndex(RGB rgb)
159 return (((rgb.r)&1)<<2) | (((rgb.g)&1)<<1) | (((rgb.b)&1));
199 printf("width:%d weight:%lu rgb:%6x nleaf:%d mi:%lu\n",
225 * builds a single <rgb> color leaf at location <ref>
227 static void ocnodeLeaf(pool<Ocnode> *pool, Ocnode **ref, RGB rgb)
232 node->rgb = rgb;
233 node->rs = rgb.r; node->gs = rgb.g; node->bs = rgb.b;
261 if (dwitdth > 0 && node1->rgb == node2->rgb >> dwitdth)
265 int i = childIndex(node2->rgb >> (dwitdth - 1));
274 else if (dwitdth < 0 && node2->rgb == node1->rgb >> (-dwitdth))
278 int i = childIndex(node1->rgb >> (-dwitdth - 1));
297 if (dwitdth == 0 && node1->rgb == node2->rgb)
301 newnode->rgb = node1->rgb; // == node2->rgb
320 RGB rgb1 = node1->rgb >> (newwidth - node1->width);
321 RGB rgb2 = node2->rgb >> (newwidth - node2->width);
326 newnode->rgb = rgb1; // == rgb2
329 int i1 = childIndex(node1->rgb >> (newwidth - node1->width - 1));
330 int i2 = childIndex(node2->rgb >> (newwidth - node2->width - 1));
522 static int findRGB(RGB *rgbpal, int ncolor, RGB rgb)
529 int d = distRGB(rgbpal[k], rgb);
586 RGB rgb = rgbmap->getPixel(rgbmap, x, y);
587 int index = findRGB(rgbpal, ncolor, rgb);