MCPcopy Create free account
hub / github.com/LASzip/LASzip / update

Method update

unused/rangedecoder.cpp:248–265  ·  view source on GitHub ↗

Update decoding state */ sy_f is the interval length (frequency of the symbol) */ lt_f is the lower end (frequency sum of < symbols) */ tot_f is the total interval length (total frequency sum) */

Source from the content-addressed store, hash-verified

246/* lt_f is the lower end (frequency sum of < symbols) */
247/* tot_f is the total interval length (total frequency sum) */
248void RangeDecoder::update(U32 sy_f, U32 lt_f, U32 tot_f)
249{
250 U32 tmp;
251 tmp = help * lt_f;
252 low -= tmp;
253#ifdef EXTRAFAST
254 this->range = help * sy_f;
255#else
256 if (lt_f + sy_f < tot_f)
257 {
258 this->range = help * sy_f;
259 }
260 else
261 {
262 this->range -= tmp;
263 }
264#endif
265}
266
267inline void RangeDecoder::normalize()
268{

Callers 1

decodeSymbolMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected