MCPcopy Create free account
hub / github.com/DentonW/DevIL / initnet

Function initnet

DevIL/src-IL/src/il_neuquant.cpp:108–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106// -----------------------------------------------------------------------
107
108void initnet(ILubyte *thepic, ILint len, ILint sample)
109{
110 ILint i;
111 ILint *p;
112
113 thepicture = thepic;
114 lengthcount = len;
115 samplefac = sample;
116
117 for (i=0; i<netsizethink; i++) {
118 p = network[i];
119 p[0] = p[1] = p[2] = (i << (netbiasshift+8))/netsize;
120 freq[i] = intbias/netsizethink; // 1/netsize
121 bias[i] = 0;
122 }
123 return;
124}
125
126
127// Unbias network to give byte values 0..255 and record position i to prepare for sort

Callers 1

iNeuQuantFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected