Lines Matching refs:BitsInCache
112 UINT BitsInCache ; member
137 hBitStream->CacheWord = hBitStream->BitsInCache = 0 ;
164 hBitStream->CacheWord = hBitStream->BitsInCache = 0 ;
181 hBitStream->CacheWord = hBitStream->BitsInCache = 0 ;
212 INT missingBits = numberOfBits - hBitStream->BitsInCache; in FDKreadBits()
217 hBitStream->BitsInCache = CACHE_BITS - missingBits; in FDKreadBits()
218 return ( bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) & BitMask[numberOfBits]; in FDKreadBits()
221 hBitStream->BitsInCache -= numberOfBits; in FDKreadBits()
222 return ( hBitStream->CacheWord >> hBitStream->BitsInCache) & BitMask[numberOfBits]; in FDKreadBits()
227 if (hBitStream->BitsInCache <= numberOfBits) in FDKreadBits()
229 const INT freeBits = (CACHE_BITS-1) - hBitStream->BitsInCache ; in FDKreadBits()
232 hBitStream->BitsInCache += freeBits ; in FDKreadBits()
235 hBitStream->BitsInCache -= numberOfBits ; in FDKreadBits()
237 return (hBitStream->CacheWord >> hBitStream->BitsInCache) & validMask ; in FDKreadBits()
244 if (!hBitStream->BitsInCache) in FDKreadBit()
247 hBitStream->BitsInCache = CACHE_BITS; in FDKreadBit()
249 hBitStream->BitsInCache--; in FDKreadBit()
251 return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 1; in FDKreadBit()
268 UINT BitsInCache = hBitStream->BitsInCache; in FDKread2Bits() local
269 if (BitsInCache < 2) /* Comparison changed from 'less-equal' to 'less' */ in FDKread2Bits()
271 const INT freeBits = (CACHE_BITS-1) - BitsInCache ; in FDKread2Bits()
274 BitsInCache += freeBits; in FDKread2Bits()
276 hBitStream->BitsInCache = BitsInCache - 2; in FDKread2Bits()
277 return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 0x3; in FDKread2Bits()
293 if (hBitStream->BitsInCache <= numberOfBits) in FDKreadBitsBwd()
295 const INT freeBits = (CACHE_BITS-1) - hBitStream->BitsInCache ; in FDKreadBitsBwd()
298 hBitStream->BitsInCache += freeBits ; in FDKreadBitsBwd()
301 hBitStream->BitsInCache -= numberOfBits ; in FDKreadBitsBwd()
303 return (hBitStream->CacheWord >> hBitStream->BitsInCache) & validMask ; in FDKreadBitsBwd()
335 if ((hBitStream->BitsInCache+numberOfBits) < CACHE_BITS) in FDKwriteBits()
337 hBitStream->BitsInCache += numberOfBits ; in FDKwriteBits()
342 FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord, hBitStream->BitsInCache) ; in FDKwriteBits()
343 hBitStream->BitsInCache = numberOfBits ; in FDKwriteBits()
364 if ((hBitStream->BitsInCache+numberOfBits) <= CACHE_BITS) in FDKwriteBitsBwd()
366 hBitStream->BitsInCache += numberOfBits ; in FDKwriteBitsBwd()
371 FDK_putBwd(&hBitStream->hBitBuf, hBitStream->CacheWord, hBitStream->BitsInCache) ; in FDKwriteBitsBwd()
372 hBitStream->BitsInCache = numberOfBits ; in FDKwriteBitsBwd()
389 FDK_pushBack (&hBitStream->hBitBuf,hBitStream->BitsInCache,hBitStream->ConfigCache) ; in FDKsyncCache()
391 FDK_put(&hBitStream->hBitBuf, hBitStream->CacheWord, hBitStream->BitsInCache) ; in FDKsyncCache()
393 hBitStream->BitsInCache = 0 ; in FDKsyncCache()
407 FDK_pushForward (&hBitStream->hBitBuf,hBitStream->BitsInCache,hBitStream->ConfigCache) ; in FDKsyncCacheBwd()
409 FDK_putBwd (&hBitStream->hBitBuf, hBitStream->CacheWord, hBitStream->BitsInCache) ; in FDKsyncCacheBwd()
412 hBitStream->BitsInCache = 0 ; in FDKsyncCacheBwd()
477 FDK_ASSERT ((hBitStream->BitsInCache+numberOfBits)<=CACHE_BITS); in FDKpushBackCache()
478 hBitStream->BitsInCache += numberOfBits ; in FDKpushBackCache()
483 …if ((hBitStream->BitsInCache+numberOfBits)<CACHE_BITS && (hBitStream->ConfigCache == BS_READER) ) { in FDKpushBack()
484 hBitStream->BitsInCache += numberOfBits ; in FDKpushBack()
495 if ( (hBitStream->BitsInCache>numberOfBits) && (hBitStream->ConfigCache == BS_READER) ) { in FDKpushFor()
496 hBitStream->BitsInCache -= numberOfBits; in FDKpushFor()