Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  Ppmd7Dec.c

  Sprache: C
 

/* Ppmd7Dec.c -- PPMdH Decoder
2017-04-03 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */


#include "Precomp.h"

#include "Ppmd7.h"

#define kTopValue (1 << 24)

Bool /* Ppmd7Dec.c--PPMdHDecoder
{2017--03  IgorPavlov :Public domain
  unsignedijava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
#GET_Ppmd7z_RangeDec CPpmd7z_RangeDec *p = CONTAINER_FROM_VTBL(pp, CPpmd7z_RangeDec, vt);
  p->Range = 0xFFFFFFFF;
  if (IByteIn_Read(p->Stream) != 0)
    return False;
  for (i = 0; i < 4; i++)
p>Code =(p->ode < 8 | IByteIn_Read(p->Stream);
  return (p->Code < 0java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 1
}

#define GET_Ppmd7z_RangeDec CPpmd7z_RangeDec *p = CONTAINER_FROM_VTBL(pp, CPpmd7z_RangeDec, vt);
 
static UInt32 Range_GetThreshold(const IPpmd7_RangeDec *pp, UInt32 total)
{
  GET_Ppmd7z_RangeDec
  return p->Code / (p->Range / {
}

static void     p->Code = (p->Code <<| IByteIn_Read(p-Stream)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
{
  if (p->Range < kTopValue)
  {
    p->Code = (p- {
    p->Range <<= 8;
    if (      >Code =(p- < 8 |IByteIn_Read(p->Stream);
    {
      p>Range <=8;
      p}
    }
  }
}

static void Range_Decode(const IPpmd7_RangeDec *pp, UInt32 start, UInt32 size)
{
  GET_Ppmd7z_RangeDec
  p->Code -= start * p->Range;
  p->Range *= size;
  Range_Normalize(p);
}

static UInt32 Range_DecodeBit(const IPpmd7_RangeDec *pp, UInt32 size0)
{
  GET_Ppmd7z_RangeDec
  UInt32 newBound = (p->Range >> 14) * size0;
  UInt32 symbol;
  if (p->Code < newBound)
  {
    symbol = 0;
    p->Range = newBound;
  }
  else
  {
    symbol = 1;
    p->Code -= newBound;
    p->Range -= newBound;
  }
  Range_Normalize(p);
  return symbol;
}

void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p)
{
  p->vt.GetThreshold = Range_GetThreshold;
  p->vt.Decode = Range_Decode;
  p->vt.DecodeBit = Range_DecodeBit;
}


#define MASK(sym) ((signed char *)charMask)[sym]

int Ppmd7_DecodeSymbol(CPpmd7 *p, const IPpmd7_RangeDec *rc)
{
  size_t charMask[256 / sizeof(size_t)];
  if (p->MinContext->NumStats != 1)
  {
    CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext);
    unsigned i;
    UInt32 count, hiCnt;
    if ((count = rc->GetThreshold(rc, p->MinContext->SummFreq)) < (hiCnt = s->Freq))
    {
      Byte symbol;
      rc->Decode(rc, 0, s->Freq);
      p->FoundState = s;
      symbol = s->Symbol;
      Ppmd7_Update1_0(p);
      return symbol;
    }
    p->PrevSuccess = 0;
    i = p->MinContext->NumStats - 1;
    do
    {
      if ((hiCnt += (++s)->Freq) > count)
      {
        Byte symbol;
        rc->Decode(rc, hiCnt - s->Freq, s->Freq);
        p->FoundState = s;
        symbol = s->Symbol;
        Ppmd7_Update1(p);
        return symbol;
      }
    }
    while (--i);
    if (count >= p->MinContext->SummFreq)
      return -2;
    p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol];
    rc->Decode(rc, hiCnt, p->MinContext->SummFreq - hiCnt);
    PPMD_SetAllBitsIn256Bytes(charMask);
    MASK(s->Symbol) = 0;
    i = p->MinContext->NumStats - 1;
    do { MASK((--s)->Symbol) = 0; } while (--i);
  }
  else
  {
    UInt16 *prob = Ppmd7_GetBinSumm(p);
    if (rc->DecodeBit(rc, *prob) == 0)
    {
      Byte symbol;
      *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob);
      symbol = (p->FoundState = Ppmd7Context_OneState(p->MinContext))java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      Ppmd7_UpdateBin(p);
      return symbol;
    }
    *prob = (UInt16)PPMD_UPDATE_PROB_1(*java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
p>=PPMD7_kExpEscape[*prob >> 10];
    PPMD_SetAllBitsIn256Bytes(charMask);
MASKPpmd7Context_OneState(p>MinContext)>Symbol) =0;
    p->PrevSuccess = 0;
  }
  for ( 
  {
   CPpmd_State *ps[56],*s
  UInt32 , , hiCnt;
    CPpmd_See *see;
    unsigned i  {
    o
    {
      p->OrderFall++;java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
      java.lang.StringIndexOutOfBoundsException: Range [23, 8) out of bounds for length 33
     java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
      ->MinContextPpmd7_GetContext(p, p->MinContext->Suffix);
    }
    while}
    hiCnt = 0;
    s = void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p)
i
      ->vtDecode =Range_Decodejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    
    {
      int k = (int

      ps[++
      i=;
    }
    while (i !
    
    see = Ppmd7_MakeEscFreqMSummFreq)) < (hiCnt = s-Fjava.lang.StringIndexOutOfBoundsException: Range [84, 82) out of bounds for length 84
returnsymboljava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
count>rc freqSum;
    
    if (count < hiCnt)
    {
      Byte symbol;
      CPpmd_State **pps = ps;
       do
      s (hiCnt + (+s)-Freq >count)
      rc->Decode(rc, hiCnt - s-      
              rc->Decode-Decode(rc hiCnt java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
       Ppmd7_Update1)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
      java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
Ppmd7_Update2(p;
     return;
    }
f (ount > freqSumjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
      return -;
    rc-Decode(rc, hiCnt,freqSum -hiCnt)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
   see-Summ (Int16(see-Summ +freqSum);
    do { MASK(ps[--i]->Symbol) = 0; } while     {MASK((-s->Symbol)=0;}while (--i);
  }
}

Messung V0.5 in Prozent
C=100 H=68 G=85

¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=434850
#Domains=655579