Lines Matching refs:Freq
312 s->Freq = 1; in RestartModel()
380 upState.Freq = ONE_STATE(c)->Freq; in CreateSuccessors()
386 cf = s->Freq - 1; in CreateSuccessors()
388 … upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0)))); in CreateSuccessors()
429 if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) in UpdateModel()
436 if (s->Freq < 32) in UpdateModel()
437 s->Freq++; in UpdateModel()
445 if (s[0].Freq >= s[-1].Freq) in UpdateModel()
451 if (s->Freq < MAX_FREQ - 9) in UpdateModel()
453 s->Freq += 2; in UpdateModel()
503 s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - (p->FoundState->Freq - 1); in UpdateModel()
543 if (s->Freq < MAX_FREQ / 4 - 1) in UpdateModel()
544 s->Freq <<= 1; in UpdateModel()
546 s->Freq = MAX_FREQ - 4; in UpdateModel()
547 c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 3)); in UpdateModel()
549 cf = 2 * (UInt32)p->FoundState->Freq * (c->SummFreq + 6); in UpdateModel()
565 s->Freq = (Byte)cf; in UpdateModel()
583 escFreq = p->MinContext->SummFreq - s->Freq; in Rescale()
584 s->Freq += 4; in Rescale()
586 s->Freq = (Byte)((s->Freq + adder) >> 1); in Rescale()
587 sumFreq = s->Freq; in Rescale()
592 escFreq -= (++s)->Freq; in Rescale()
593 s->Freq = (Byte)((s->Freq + adder) >> 1); in Rescale()
594 sumFreq += s->Freq; in Rescale()
595 if (s[0].Freq > s[-1].Freq) in Rescale()
601 while (--s1 != stats && tmp.Freq > s1[-1].Freq); in Rescale()
607 if (s->Freq == 0) in Rescale()
611 do { i++; } while ((--s)->Freq == 0); in Rescale()
619 tmp.Freq = (Byte)(tmp.Freq - (tmp.Freq >> 1)); in Rescale()
673 s->Freq += 4; in Ppmd7_Update1()
675 if (s[0].Freq > s[-1].Freq) in Ppmd7_Update1()
679 if (s->Freq > MAX_FREQ) in Ppmd7_Update1()
687 p->PrevSuccess = (2 * p->FoundState->Freq > p->MinContext->SummFreq); in Ppmd7_Update1_0()
690 if ((p->FoundState->Freq += 4) > MAX_FREQ) in Ppmd7_Update1_0()
697 p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 128 ? 1: 0)); in Ppmd7_UpdateBin()
706 if ((p->FoundState->Freq += 4) > MAX_FREQ) in Ppmd7_Update2()