• Home
  • Raw
  • Download

Lines Matching +full:count +full:- +full:threshold

5  * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
32 * Free Software Foundation. This program is dual-licensed; you may select
37 * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
56 /*-**************************************************************
57 * FSE NCount encoding-decoding
66 int threshold; in FSE_readNCount() local
82 threshold = 1 << nbBits; in FSE_readNCount()
90 if (ip < iend - 5) { in FSE_readNCount()
109 if ((ip <= iend - 7) || (ip + (bitCount >> 3) <= iend - 4)) { in FSE_readNCount()
118 int const max = (2 * threshold - 1) - remaining; in FSE_readNCount()
119 int count; in FSE_readNCount() local
121 if ((bitStream & (threshold - 1)) < (U32)max) { in FSE_readNCount()
122 count = bitStream & (threshold - 1); in FSE_readNCount()
123 bitCount += nbBits - 1; in FSE_readNCount()
125 count = bitStream & (2 * threshold - 1); in FSE_readNCount()
126 if (count >= threshold) in FSE_readNCount()
127 count -= max; in FSE_readNCount()
131 count--; /* extra accuracy */ in FSE_readNCount()
132 remaining -= count < 0 ? -count : count; /* -1 means +1 */ in FSE_readNCount()
133 normalizedCounter[charnum++] = (short)count; in FSE_readNCount()
134 previous0 = !count; in FSE_readNCount()
135 while (remaining < threshold) { in FSE_readNCount()
136 nbBits--; in FSE_readNCount()
137 threshold >>= 1; in FSE_readNCount()
140 if ((ip <= iend - 7) || (ip + (bitCount >> 3) <= iend - 4)) { in FSE_readNCount()
144 bitCount -= (int)(8 * (iend - 4 - ip)); in FSE_readNCount()
145 ip = iend - 4; in FSE_readNCount()
154 *maxSVPtr = charnum - 1; in FSE_readNCount()
157 return ip - istart; in FSE_readNCount()
180 oSize = iSize - 127; in HUF_readStats_wksp()
197 …ze = FSE_decompress_wksp(huffWeight, hwSize - 1, ip + 1, iSize, 6, workspace, workspaceSize); /* m… in HUF_readStats_wksp()
217 /* get last non-null symbol weight (implied, total must be 2^n) */ in HUF_readStats_wksp()
226 U32 const rest = total - weightTotal; in HUF_readStats_wksp()