Lines Matching refs:Freq

314     s->Freq = 1;  in RestartModel()
382 upState.Freq = ONE_STATE(c)->Freq; in CreateSuccessors()
388 cf = s->Freq - 1; in CreateSuccessors()
390 … upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0)))); in CreateSuccessors()
431 if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) in UpdateModel()
438 if (s->Freq < 32) in UpdateModel()
439 s->Freq++; in UpdateModel()
447 if (s[0].Freq >= s[-1].Freq) in UpdateModel()
453 if (s->Freq < MAX_FREQ - 9) in UpdateModel()
455 s->Freq += 2; in UpdateModel()
505 s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - (p->FoundState->Freq - 1); in UpdateModel()
545 if (s->Freq < MAX_FREQ / 4 - 1) in UpdateModel()
546 s->Freq <<= 1; in UpdateModel()
548 s->Freq = MAX_FREQ - 4; in UpdateModel()
549 c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 3)); in UpdateModel()
551 cf = 2 * (UInt32)p->FoundState->Freq * (c->SummFreq + 6); in UpdateModel()
567 s->Freq = (Byte)cf; in UpdateModel()
585 escFreq = p->MinContext->SummFreq - s->Freq; in Rescale()
586 s->Freq += 4; in Rescale()
588 s->Freq = (Byte)((s->Freq + adder) >> 1); in Rescale()
589 sumFreq = s->Freq; in Rescale()
594 escFreq -= (++s)->Freq; in Rescale()
595 s->Freq = (Byte)((s->Freq + adder) >> 1); in Rescale()
596 sumFreq += s->Freq; in Rescale()
597 if (s[0].Freq > s[-1].Freq) in Rescale()
603 while (--s1 != stats && tmp.Freq > s1[-1].Freq); in Rescale()
609 if (s->Freq == 0) in Rescale()
613 do { i++; } while ((--s)->Freq == 0); in Rescale()
621 tmp.Freq = (Byte)(tmp.Freq - (tmp.Freq >> 1)); in Rescale()
675 s->Freq += 4; in Ppmd7_Update1()
677 if (s[0].Freq > s[-1].Freq) in Ppmd7_Update1()
681 if (s->Freq > MAX_FREQ) in Ppmd7_Update1()
689 p->PrevSuccess = (2 * p->FoundState->Freq > p->MinContext->SummFreq); in Ppmd7_Update1_0()
692 if ((p->FoundState->Freq += 4) > MAX_FREQ) in Ppmd7_Update1_0()
699 p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 128 ? 1: 0)); in Ppmd7_UpdateBin()
708 if ((p->FoundState->Freq += 4) > MAX_FREQ) in Ppmd7_Update2()