• Home
  • Raw
  • Download

Lines Matching refs:node_info

570             *node_info;  in AssignImageColors()  local
592 node_info=cube.root; in AssignImageColors()
596 if (node_info->child[id] == (NodeInfo *) NULL) in AssignImageColors()
598 node_info=node_info->child[id]; in AssignImageColors()
606 ClosestColor(image,&cube,node_info->parent); in AssignImageColors()
772 *node_info; in ClassifyImageColors() local
837 node_info=cube_info->root; in ClassifyImageColors()
849 if (node_info->child[id] == (NodeInfo *) NULL) in ClassifyImageColors()
854 node_info->child[id]=GetNodeInfo(cube_info,id,level,node_info); in ClassifyImageColors()
855 if (node_info->child[id] == (NodeInfo *) NULL) in ClassifyImageColors()
868 node_info=node_info->child[id]; in ClassifyImageColors()
878 node_info->quantize_error+=count*sqrt(distance); in ClassifyImageColors()
879 cube_info->root->quantize_error+=node_info->quantize_error; in ClassifyImageColors()
885 node_info->number_unique+=count; in ClassifyImageColors()
886 node_info->total_color.red+=count*QuantumScale*ClampPixel(pixel.red); in ClassifyImageColors()
887 node_info->total_color.green+=count*QuantumScale*ClampPixel(pixel.green); in ClassifyImageColors()
888 node_info->total_color.blue+=count*QuantumScale*ClampPixel(pixel.blue); in ClassifyImageColors()
890 node_info->total_color.alpha+=count*QuantumScale* in ClassifyImageColors()
893 node_info->total_color.alpha+=count*QuantumScale* in ClassifyImageColors()
944 node_info=cube_info->root; in ClassifyImageColors()
956 if (node_info->child[id] == (NodeInfo *) NULL) in ClassifyImageColors()
961 node_info->child[id]=GetNodeInfo(cube_info,id,level,node_info); in ClassifyImageColors()
962 if (node_info->child[id] == (NodeInfo *) NULL) in ClassifyImageColors()
975 node_info=node_info->child[id]; in ClassifyImageColors()
985 node_info->quantize_error+=count*sqrt(distance); in ClassifyImageColors()
986 cube_info->root->quantize_error+=node_info->quantize_error; in ClassifyImageColors()
992 node_info->number_unique+=count; in ClassifyImageColors()
993 node_info->total_color.red+=count*QuantumScale*ClampPixel(pixel.red); in ClassifyImageColors()
994 node_info->total_color.green+=count*QuantumScale*ClampPixel(pixel.green); in ClassifyImageColors()
995 node_info->total_color.blue+=count*QuantumScale*ClampPixel(pixel.blue); in ClassifyImageColors()
997 node_info->total_color.alpha+=count*QuantumScale* in ClassifyImageColors()
1000 node_info->total_color.alpha+=count*QuantumScale* in ClassifyImageColors()
1089 const NodeInfo *node_info) in ClosestColor() argument
1102 if (node_info->child[i] != (NodeInfo *) NULL) in ClosestColor()
1103 ClosestColor(image,cube_info,node_info->child[i]); in ClosestColor()
1104 if (node_info->number_unique != 0) in ClosestColor()
1123 p=image->colormap+node_info->color_number; in ClosestColor()
1152 cube_info->color_number=node_info->color_number; in ClosestColor()
1236 NodeInfo *node_info) in DefineImageColormap() argument
1249 if (node_info->child[i] != (NodeInfo *) NULL) in DefineImageColormap()
1250 (void) DefineImageColormap(image,cube_info,node_info->child[i]); in DefineImageColormap()
1251 if (node_info->number_unique != 0) in DefineImageColormap()
1263 alpha=(double) ((MagickOffsetType) node_info->number_unique); in DefineImageColormap()
1268 node_info->total_color.red); in DefineImageColormap()
1270 node_info->total_color.green); in DefineImageColormap()
1272 node_info->total_color.blue); in DefineImageColormap()
1280 opacity=(double) (alpha*QuantumRange*node_info->total_color.alpha); in DefineImageColormap()
1285 node_info->total_color.red); in DefineImageColormap()
1287 node_info->total_color.green); in DefineImageColormap()
1289 node_info->total_color.blue); in DefineImageColormap()
1299 node_info->total_color.red); in DefineImageColormap()
1301 node_info->total_color.green); in DefineImageColormap()
1303 node_info->total_color.blue); in DefineImageColormap()
1304 if (node_info->number_unique > cube_info->transparent_pixels) in DefineImageColormap()
1306 cube_info->transparent_pixels=node_info->number_unique; in DefineImageColormap()
1311 node_info->color_number=image->colors++; in DefineImageColormap()
1610 *node_info; in FloydSteinbergDither() local
1618 node_info=cube.root; in FloydSteinbergDither()
1622 if (node_info->child[node_id] == (NodeInfo *) NULL) in FloydSteinbergDither()
1624 node_info=node_info->child[node_id]; in FloydSteinbergDither()
1632 ClosestColor(image,&cube,node_info->parent); in FloydSteinbergDither()
1866 *node_info; in RiemersmaDither() local
1874 node_info=p->root; in RiemersmaDither()
1878 if (node_info->child[id] == (NodeInfo *) NULL) in RiemersmaDither()
1880 node_info=node_info->child[id]; in RiemersmaDither()
1888 ClosestColor(image,p,node_info->parent); in RiemersmaDither()
2115 *node_info; in GetNodeInfo() local
2139 node_info=cube_info->next_node++; in GetNodeInfo()
2140 (void) memset(node_info,0,sizeof(*node_info)); in GetNodeInfo()
2141 node_info->parent=parent; in GetNodeInfo()
2142 node_info->id=id; in GetNodeInfo()
2143 node_info->level=level; in GetNodeInfo()
2144 return(node_info); in GetNodeInfo()
2498 static void PruneChild(CubeInfo *cube_info,const NodeInfo *node_info) in PruneChild() argument
2514 if (node_info->child[i] != (NodeInfo *) NULL) in PruneChild()
2515 PruneChild(cube_info,node_info->child[i]); in PruneChild()
2519 parent=node_info->parent; in PruneChild()
2520 parent->number_unique+=node_info->number_unique; in PruneChild()
2521 parent->total_color.red+=node_info->total_color.red; in PruneChild()
2522 parent->total_color.green+=node_info->total_color.green; in PruneChild()
2523 parent->total_color.blue+=node_info->total_color.blue; in PruneChild()
2524 parent->total_color.alpha+=node_info->total_color.alpha; in PruneChild()
2525 parent->child[node_info->id]=(NodeInfo *) NULL; in PruneChild()
2554 static void PruneLevel(CubeInfo *cube_info,const NodeInfo *node_info) in PruneLevel() argument
2567 if (node_info->child[i] != (NodeInfo *) NULL) in PruneLevel()
2568 PruneLevel(cube_info,node_info->child[i]); in PruneLevel()
2569 if (node_info->level == cube_info->depth) in PruneLevel()
2570 PruneChild(cube_info,node_info); in PruneLevel()
2599 static void PruneToCubeDepth(CubeInfo *cube_info,const NodeInfo *node_info) in PruneToCubeDepth() argument
2612 if (node_info->child[i] != (NodeInfo *) NULL) in PruneToCubeDepth()
2613 PruneToCubeDepth(cube_info,node_info->child[i]); in PruneToCubeDepth()
2614 if (node_info->level > cube_info->depth) in PruneToCubeDepth()
2615 PruneChild(cube_info,node_info); in PruneToCubeDepth()
2909 const NodeInfo *node_info,const ssize_t offset,double *quantize_error) in QuantizeErrorFlatten() argument
2920 quantize_error[offset]=node_info->quantize_error; in QuantizeErrorFlatten()
2924 if (node_info->child[i] != (NodeInfo *) NULL) in QuantizeErrorFlatten()
2925 n+=QuantizeErrorFlatten(cube_info,node_info->child[i],offset+n, in QuantizeErrorFlatten()
2955 static void Reduce(CubeInfo *cube_info,const NodeInfo *node_info) in Reduce() argument
2968 if (node_info->child[i] != (NodeInfo *) NULL) in Reduce()
2969 Reduce(cube_info,node_info->child[i]); in Reduce()
2970 if (node_info->quantize_error <= cube_info->pruning_threshold) in Reduce()
2971 PruneChild(cube_info,node_info); in Reduce()
2977 if (node_info->number_unique > 0) in Reduce()
2979 if (node_info->quantize_error < cube_info->next_threshold) in Reduce()
2980 cube_info->next_threshold=node_info->quantize_error; in Reduce()