Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Chromium
third_party/lzma_sdk/7zDec.c
static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer) { while (inSize > 0) { const void *inBuf; size_t curSize = (1 << 18); if (curSize > inSize) curSize = (size_t)inSize; RINOK(inStream->Look(inStream, &inBuf, &curSize)); if (curSize ==...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/7zFile.c
WRes InFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 0); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/7zFile.c
WRes File_Close(CSzFile *p) { #ifdef USE_WINDOWS_FILE if (p->handle != INVALID_HANDLE_VALUE) { if (!CloseHandle(p->handle)) return GetLastError(); p->handle = INVALID_HANDLE_VALUE; } #else if (p->file != NULL) { int res = fclose(p->file); if (res != 0) return res; p->file = NULL; ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/7zFile.c
WRes File_GetLength(CSzFile *p, UInt64 *length) { #ifdef USE_WINDOWS_FILE DWORD sizeHigh; DWORD sizeLow = GetFileSize(p->handle, &sizeHigh); if (sizeLow == 0xFFFFFFFF) { DWORD res = GetLastError(); if (res != NO_ERROR) return res; } *length = (((UInt64)sizeHigh) << 32) + sizeLow; return 0; ...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/7zFile.c
void FileSeqInStream_CreateVTable(CFileSeqInStream *p) { p->s.Read = FileSeqInStream_Read; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/7zFile.c
void FileOutStream_CreateVTable(CFileOutStream *p) { p->s.Write = FileOutStream_Write; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/7zStream.c
SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType) { while (size != 0) { size_t processed = size; RINOK(stream->Read(stream, buf, &processed)); if (processed == 0) return errorType; buf = (void *)((Byte *)buf + processed); size -= pro...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/7zStream.c
SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset) { Int64 t = offset; return stream->Seek(stream, &t, SZ_SEEK_SET); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/7zStream.c
SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size) { const void *lookBuf; if (*size == 0) return SZ_OK; RINOK(stream->Look(stream, &lookBuf, size)); memcpy(buf, lookBuf, *size); return stream->Skip(stream, *size); }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/7zStream.c
static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size) { SRes res = SZ_OK; CLookToRead *p = (CLookToRead *)pp; size_t size2 = p->size - p->pos; if (size2 == 0 && *size > 0) { p->pos = 0; size2 = LookToRead_BUF_SIZE; res = p->realStream-...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/Alloc.c
void MyFree(void *address) { #ifdef _SZ_ALLOC_DEBUG if (address != 0) fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); #endif free(address); }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/Alloc.c
void SetLargePageSize() { #ifdef _7ZIP_LARGE_PAGES SIZE_T size = 0; GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)GetProcAddress( GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); if (largePageMinimum == 0) return; size = largePageMinimum(); if (size == 0 || (size & (si...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/Alloc.c
static void SzBigFree(void *p, void *address) { UNUSED_VAR(p); BigFree(address); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/Bra.c
SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { SizeT i; if (size < 4) return 0; size -= 4; ip += 8; for (i = 0; i <= size; i += 4) { if (data[i + 3] == 0xEB) { UInt32 dest; UInt32 src = ((UInt32)data[i + 2] << 16) | ((UInt32)data[i + 1] << 8) | (da...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/Bra.c
SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) { SizeT i; if (size < 4) return 0; size -= 4; for (i = 0; i <= size; i += 4) { if ((data[i] >> 2) == 0x12 && (data[i + 3] & 3) == 1) { UInt32 src = ((UInt32)(data[i + 0] & 3) << 24) | ((UInt32)data[i + 1] << 16)...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/CpuArch.c
int x86cpuid_GetFirm(const Cx86cpuid *p) { unsigned i; for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++) { const UInt32 *v = kVendors[i]; if (v[0] == p->vendor[0] && v[1] == p->vendor[1] && v[2] == p->vendor[2]) return (int)i; } return -1; }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/CpuArch.c
Bool CPU_Is_Aes_Supported() { Cx86cpuid p; CHECK_SYS_SSE_SUPPORT if (!x86cpuid_CheckAndRead(&p)) return False; return (p.c >> 25) & 1; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/Delta.c
void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size) { Byte buf[DELTA_STATE_SIZE]; unsigned j = 0; MyMemCpy(buf, state, delta); { SizeT i; for (i = 0; i < size;) { for (j = 0; j < delta && i < size; i++, j++) { Byte b = data[i]; data[i] = (Byte)(b - buf[j]); ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/Delta.c
void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) { Byte buf[DELTA_STATE_SIZE]; unsigned j = 0; MyMemCpy(buf, state, delta); { SizeT i; for (i = 0; i < size;) { for (j = 0; j < delta && i < size; i++, j++) { buf[j] = data[i] = (Byte)(buf[j] + data[i]); } } ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc) { UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; if (p->directInput) { p->blockSize = blockSize; return 1; } if (!p->bufferBase || p->blockSize != blockSize) { ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
void MatchFinder_MoveBlock(CMatchFinder *p) { memmove(p->bufferBase, p->buffer - p->keepSizeBefore, (size_t)(p->streamPos - p->pos) + p->keepSizeBefore); p->buffer = p->bufferBase + p->keepSizeBefore; }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
int MatchFinder_NeedMove(CMatchFinder *p) { if (p->directInput) return 0; return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
void MatchFinder_ReadIfRequired(CMatchFinder *p) { if (p->streamEndWasReached) return; if (p->keepSizeAfter >= p->streamPos - p->pos) MatchFinder_ReadBlock(p); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc) { alloc->Free(alloc, p->hash); p->hash = NULL; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
void MatchFinder_Init_2(CMatchFinder *p, int readData) { UInt32 i; UInt32 *hash = p->hash; UInt32 num = p->hashSizeSum; for (i = 0; i < num; i++) hash[i] = kEmptyHashValue; p->cyclicBufferPos = 0; p->buffer = p->bufferBase; p->pos = p->streamPos = p->cyclicBufferSize; p->result = SZ_OK; p->strea...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
static void MatchFinder_Normalize(CMatchFinder *p) { UInt32 subValue = MatchFinder_GetSubValue(p); MatchFinder_Normalize3(subValue, p->hash, p->numRefs); MatchFinder_ReduceOffsets(p, subValue); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
UInt32 *GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, UInt32 *distances, UInt32 maxLen) { CLzRef *ptr0 = son + (_cyclicBufferPos <<...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue) { CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; CLzRef ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) { UInt32 h2, h3, d2, d3, maxLen, offset, pos; UInt32 *hash; GET_MATCHES_HEADER(4) HASH4_CALC; hash = p->hash; pos = p->pos; d2 = pos - hash[h2]; d3 = pos - hash[kFix3HashSize + h3]; curMatch = hash[kFix4HashSize + hv]; ...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) { do { SKIP_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hv]; p->hash[hv] = p->pos; SKIP_FOOTER } while (--num != 0); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzFind.c
void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) { do { SKIP_HEADER(3) HASH_ZIP_CALC; curMatch = p->hash[hv]; p->hash[hv] = p->pos; p->son[p->cyclicBufferPos] = curMatch; MOVE_POS } while (--num != 0); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/Lzma2Dec.c
static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props) { UInt32 dicSize; if (prop > 40) return SZ_ERROR_UNSUPPORTED; dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop); props[0] = (Byte)LZMA2_LCLP_MAX; props[1] = (Byte)(dicSize); props[2] = (Byte)(dicSize >> 8); props[3] = (Byte)(...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/Lzma2Dec.c
SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT outSize = *destLen, inSize = *srcLen; *srcLen = *destLen = 0; for (;;) { SizeT srcSizeCur = inSize, ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaDec.c
static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) { do { SizeT limit2 = limit; if (p->checkDicSize == 0) { UInt32 rem = p->prop.dicSize - p->processedPos; if (limit - p->dicPos > rem) limit2 = p->dicPos ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaDec.c
void LzmaDec_Init(CLzmaDec *p) { p->dicPos = 0; LzmaDec_InitDicAndState(p, True, True); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaDec.c
static void LzmaDec_InitStateReal(CLzmaDec *p) { SizeT numProbs = LzmaProps_GetNumProbs(&p->prop); SizeT i; CLzmaProb *probs = p->probs; for (i = 0; i < numProbs; i++) probs[i] = kBitModelTotal >> 1; p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; p->state = 0; p->needInitState = 0; }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaDec.c
SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { SizeT outSize = *destLen; SizeT inSize = *srcLen; *srcLen = *destLen = 0; for (;;) { SizeT inSizeCur = inSiz...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaDec.c
void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->probs); p->probs = NULL; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaDec.c
static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->dic); p->dic = NULL; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaDec.c
SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc) { CLzmaDec p; SRes res; SizeT outSize = *destLen, inSize = *srcLen; *destLen = *...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static UInt32 GetPosSlot1(UInt32 pos) { UInt32 res; BSR2_RET(pos, res); return res; } #define GetPosSlot2(pos, res) \ { \ BSR2_RET(pos, res); ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
void LzmaEnc_RestoreState(CLzmaEncHandle pp) { CLzmaEnc *dest = (CLzmaEnc *)pp; const CSaveState *p = &dest->saveState; int i; dest->lenEnc = p->lenEnc; dest->repLenEnc = p->repLenEnc; dest->state = p->state; for (i = 0; i < kNumStates; i++) { memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatc...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void RangeEnc_Init(CRangeEnc *p) { p->low = 0; p->range = 0xFFFFFFFF; p->cacheSize = 1; p->cache = 0; p->buf = p->bufBase; p->processed = 0; p->res = SZ_OK; }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void RangeEnc_FlushStream(CRangeEnc *p) { size_t num; if (p->res != SZ_OK) return; num = p->buf - p->bufBase; if (num != p->outStream->Write(p->outStream, p->bufBase, num)) p->res = SZ_ERROR_WRITE; p->processed += num; p->buf = p->bufBase; }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) { if ((UInt32)p->low < (UInt32)0xFF000000 || (unsigned)(p->low >> 32) != 0) { Byte temp = p->cache; do { Byte *buf = p->buf; *buf++ = (Byte)(temp + (Byte)(p->low >> 32)); p->buf = buf; if (buf == p->bufLim) RangeEnc_Flus...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void RangeEnc_FlushData(CRangeEnc *p) { int i; for (i = 0; i < 5; i++) RangeEnc_ShiftLow(p); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte) { UInt32 offs = 0x100; symbol |= 0x100; do { matchByte <<= 1; RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, const UInt32 *ProbPrices) { UInt32 a0 = GET_PRICE_0a(p->choice); UInt32 a1 = GET_PRICE_1a(p->choice); UInt32 b0 = a1 + GET_PRICE_0a(p->choice2); UInt32 b1 = a1 + GET_PRICE_1a(p->choice2); ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, const UInt32 *ProbPrices) { LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); p->co...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes) { UInt32 lenRes = 0, numPairs; p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); #ifdef SHOW_STAT printf("\n i = %u numPairs = %u ", g_STAT_OFF...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static void WriteEndMarker(CLzmaEnc *p, UInt32 posState) { UInt32 len; RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); p->state = kMatchNextStates[p->state]; len = LZMA_MATCH_LEN_MIN; LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static SRes CheckErrors(CLzmaEnc *p) { if (p->result != SZ_OK) return p->result; if (p->rc.res != SZ_OK) p->result = SZ_ERROR_WRITE; if (p->matchFinderBase.result != SZ_OK) p->result = SZ_ERROR_READ; if (p->result != SZ_OK) p->finished = True; return p->result; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static SRes Flush(CLzmaEnc *p, UInt32 nowPos) { p->finished = True; if (p->writeEndMark) WriteEndMarker(p, nowPos & p->pbMask); RangeEnc_FlushData(&p->rc); RangeEnc_FlushStream(&p->rc); return CheckErrors(p); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc) { alloc->Free(alloc, p->litProbs); alloc->Free(alloc, p->saveState.litProbs); p->litProbs = NULL; p->saveState.litProbs = NULL; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { UInt32 i; for (i = 0; i < (UInt32)kDicLogSizeMaxCompress; i++) if (p->dictSize <= ((UInt32)1 << i)) break; p->distTableSize = i * 2; p->finished = False; p->...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) { const CLzmaEnc *p = (CLzmaEnc *)pp; return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) { const CLzmaEnc *p = (CLzmaEnc *)pp; return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/LzmaEnc.c
static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress) { SRes res = SZ_OK; #ifndef _7ZIP_ST Byte allocaDummy[0x300]; allocaDummy[0] = 0; allocaDummy[1] = allocaDummy[0]; #endif for (;;) { res = LzmaEnc_CodeOneBlock(p, False, 0, 0); if (res != SZ_OK || p->finished) break; if ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/Util/SfxSetup/SfxSetup.c
static Bool DoesFileOrDirExist(const WCHAR *path) { WIN32_FIND_DATAW fd; HANDLE handle; handle = FindFirstFileW(path, &fd); if (handle == INVALID_HANDLE_VALUE) return False; FindClose(handle); return True; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/Xz.c
unsigned XzFlags_GetCheckSize(CXzStreamFlags f) { unsigned t = XzFlags_GetCheckType(f); return (t == 0) ? 0 : (4 << ((t - 1) / 3)); }
[ 1, 0 ]
Chromium
third_party/lzma_sdk/XzCrc64Opt.c
UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table) { const Byte *p = (const Byte *)data; for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) v = CRC_UPDATE_BYTE_2(v, *p); for (; size >= 4; size -= 4, p += 4) { ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value) { unsigned i, limit; *value = 0; limit = (maxSize > 9) ? 9 : (unsigned)maxSize; for (i = 0; i < limit;) { Byte b = p[i]; *value |= (UInt64)(b & 0x7F) << (7 * i++); if ((b & 0x80) == 0) return (b == 0 && i != 1) ? 0 : i; } ...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
static void BraState_Free(void *pp, ISzAlloc *alloc) { alloc->Free(alloc, pp); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
static void SbState_Free(void *pp, ISzAlloc *alloc) { CSbDec *p = (CSbDec *)pp; SbDec_Free(p); alloc->Free(alloc, pp); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
static void SbState_Init(void *pp) { SbDec_Init((CSbDec *)pp); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
static SRes SbState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished) { CSbDec *p = (CSbDec *)pp; SRes res; UNUSED_VAR(srcWasFinished); p->dest = dest; p->destLen = *de...
[ 0, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
static SRes Lzma2State_SetFromMethod(IStateCoder *p, ISzAlloc *alloc) { CLzma2Dec *decoder = (CLzma2Dec *)alloc->Alloc(alloc, sizeof(CLzma2Dec)); p->p = decoder; if (decoder == 0) return SZ_ERROR_MEM; p->Free = Lzma2State_Free; p->SetProps = Lzma2State_SetProps; p->Init = Lzma2State_Init; p->Code = L...
[ 1, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
void XzUnpacker_Init(CXzUnpacker *p) { p->state = XZ_STATE_STREAM_HEADER; p->pos = 0; p->numStartedStreams = 0; p->numFinishedStreams = 0; p->numTotalBlocks = 0; p->padSize = 0; }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
void XzUnpacker_Free(CXzUnpacker *p) { MixCoder_Free(&p->decoder); }
[ 0, 0 ]
Chromium
third_party/lzma_sdk/XzDec.c
UInt64 XzUnpacker_GetExtraSize(CXzUnpacker *p) { UInt64 num = 0; if (p->state == XZ_STATE_STREAM_PADDING) num += p->padSize; else if (p->state == XZ_STATE_STREAM_HEADER) num += p->padSize + p->pos; return num; }
[ 0, 0 ]
Chromium
third_party/markupsafe/_speedups.c
static PyObject *escape(PyObject *self, PyObject *text) { PyObject *s = NULL, *rv = NULL, *html; if (PyLong_CheckExact(text) || #if PY_MAJOR_VERSION < 3 PyInt_CheckExact(text) || #endif PyFloat_CheckExact(text) || PyBool_Check(text) || text == Py_None) return PyObject_CallFunctionObjArgs(markup, te...
[ 0, 0 ]
Chromium
third_party/markupsafe/_speedups.c
static PyObject *escape_silent(PyObject *self, PyObject *text) { if (text != Py_None) return escape(self, text); return PyObject_CallFunctionObjArgs(markup, NULL); }
[ 0, 0 ]
Chromium
third_party/markupsafe/_speedups.c
static PyObject *soft_unicode(PyObject *self, PyObject *s) { if (!PyUnicode_Check(s)) #if PY_MAJOR_VERSION < 3 return PyObject_Unicode(s); #else return PyObject_Str(s); #endif Py_INCREF(s); return s; }
[ 0, 0 ]
Chromium
third_party/markupsafe/_speedups.c
PyMODINIT_FUNC init_speedups(void) { if (!init_constants()) return; Py_InitModule3("markupsafe._speedups", module_methods, ""); } #else
[ 0, 0 ]
Chromium
third_party/markupsafe/_speedups.c
PyMODINIT_FUNC PyInit__speedups(void) { if (!init_constants()) return NULL; return PyModule_Create(&module_definition); }
[ 0, 0 ]
Chromium
third_party/opus/src/celt/arm/armcpu.c
int opus_select_arch(void) { opus_uint32 flags = opus_cpu_capabilities(); int arch = 0; if (!(flags & OPUS_CPU_ARM_EDSP_FLAG)) { celt_assert(arch == OPUS_ARCH_ARM_V4); return arch; } arch++; if (!(flags & OPUS_CPU_ARM_MEDIA_FLAG)) { celt_assert(arch == OPUS_ARCH_ARM_EDSP); return arch; ...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/arm/fixed_armv5e.h
static OPUS_INLINE opus_val32 MULT16_32_Q15_armv5e(opus_val16 a, opus_val32 b) { int res; __asm__("#MULT16_32_Q15\n\t" "smulwb %0, %1, %2\n\t" : "=r"(res) : "r"(b), "r"(a)); return SHL32(res, 1); } #define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv5e(a, b)) #undef MAC16_32_Q15
[ 0, 0 ]
Chromium
third_party/opus/src/celt/arm/fixed_armv5e.h
static OPUS_INLINE opus_val32 MAC16_32_Q15_armv5e(opus_val32 c, opus_val16 a, opus_val32 b) { int res; __asm__("#MAC16_32_Q15\n\t" "smlawb %0, %1, %2, %3;\n" : "=r"(res) : "r"(SHL32(b, 1)), "r"(a), "r"(c)); return res; } #define MAC16...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/arm/fixed_armv5e.h
static OPUS_INLINE opus_val32 MAC16_16_armv5e(opus_val32 c, opus_val16 a, opus_val16 b) { int res; __asm__("#MAC16_16\n\t" "smlabb %0, %1, %2, %3;\n" : "=r"(res) : "r"(a), "r"(b), "r"(c)); return res; } #define MAC16_16(c, a, b) (MAC16_16...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/arm/pitch_neon_intr.c
opus_val32 celt_inner_prod_neon(const opus_val16 *x, const opus_val16 *y, int N) { int i; opus_val32 xy; float32x4_t xy_f32x4 = vdupq_n_f32(0); float32x2_t xy_f32x2; for (i = 0; i < N - 7; i += 8) { float32x4_t x_f32x4, y_f32x4; x_f32x4 = vld1q_f32(&x[i]); y_f32x4 ...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/bands.c
int bitexact_log2tan(int isin, int icos) { int lc; int ls; lc = EC_ILOG(icos); ls = EC_ILOG(isin); icos <<= 15 - lc; isin <<= 15 - ls; return (ls - lc) * (1 << 11) + FRAC_MUL16(isin, FRAC_MUL16(isin, -2597) + 7932) - FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932); } #ifdef FIXED_POIN...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/bands.c
void normalise_bands(const CELTMode *m, const celt_sig *OPUS_RESTRICT freq, celt_norm *OPUS_RESTRICT X, const celt_ener *bandE, int end, int C, int M) { int i, c, N; const opus_int16 *eBands = m->eBands; N = M * m->shortMdctSize; c = 0; do { for (i = 0; i < end; i...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/bands.c
static void compute_channel_weights(celt_ener Ex, celt_ener Ey, opus_val16 w[2]) { celt_ener minE; #ifdef FIXED_POINT int shift; #endif minE = MIN32(Ex, Ey); Ex = ADD32(Ex, minE / 3); Ey = ADD32(Ey, minE / 3); #ifdef FIXED_POINT shift = celt_ilog2(EPSILON + MAX32(Ex, Ey)...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/bands.c
static void intensity_stereo(const CELTMode *m, celt_norm *OPUS_RESTRICT X, const celt_norm *OPUS_RESTRICT Y, const celt_ener *bandE, int bandID, int N) { int i = bandID; int j; opus_val16 a1, a2; opus_val16 left, right; opus_val16 norm; #ifdef FIXED_P...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/bands.c
static void deinterleave_hadamard(celt_norm *X, int N0, int stride, int hadamard) { int i, j; VARDECL(celt_norm, tmp); int N; SAVE_STACK; N = N0 * stride; ALLOC(tmp, N, celt_norm); celt_assert(stride > 0); if (hadamard) { const int *ordery = ordery_table + stride -...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/bands.c
static void interleave_hadamard(celt_norm *X, int N0, int stride, int hadamard) { int i, j; VARDECL(celt_norm, tmp); int N; SAVE_STACK; N = N0 * stride; ALLOC(tmp, N, celt_norm); if (hadamard) { const int *ordery = ordery_table + stride - 2; for (i = 0; i < stride;...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/bands.c
void haar1(celt_norm *X, int N0, int stride) { int i, j; N0 >>= 1; for (i = 0; i < stride; i++) for (j = 0; j < N0; j++) { opus_val32 tmp1, tmp2; tmp1 = MULT16_16(QCONST16(.70710678f, 15), X[stride * 2 * j + i]); tmp2 = MULT16_16(QCONST16(.70710678f, 15), X[stride * (2 * j + 1) + i]); ...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/bands.c
static int compute_qn(int N, int b, int offset, int pulse_cap, int stereo) { static const opus_int16 exp2_table8[8] = {16384, 17866, 19483, 21247, 23170, 25267, 27554, 30048}; int qn, qb; int N2 = 2 * N - 1; if (stereo && N == 2) N2--; qb = celt_sudiv(b + N2 * ...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/bands.c
static void special_hybrid_folding(const CELTMode *m, celt_norm *norm, celt_norm *norm2, int start, int M, int dual_stereo) { int n1, n2; const opus_int16 *OPUS_RESTRICT eBands = m->eBands; n1 = M * (eBands[start + 1] - eBands[start]); n2 = M...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/celt.c
int resampling_factor(opus_int32 rate) { int ret; switch (rate) { case 48000: ret = 1; break; case 24000: ret = 2; break; case 16000: ret = 3; break; case 12000: ret = 4; break; case 8000: ret = 6; break; default: #ifndef CUSTOM_MODES celt_assert(0); #endif ...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/celt.c
void init_caps(const CELTMode *m, int *cap, int LM, int C) { int i; for (i = 0; i < m->nbEBands; i++) { int N; N = (m->eBands[i + 1] - m->eBands[i]) << LM; cap[i] = (m->cache.caps[m->nbEBands * (2 * LM + C - 1) + i] + 64) * C * N >> 2; } }
[ 0, 0 ]
Chromium
third_party/opus/src/celt/celt.c
const char *opus_get_version_string(void) { return "libopus " PACKAGE_VERSION #ifdef FIXED_POINT "-fixed" #endif #ifdef FUZZING "-fuzzing" #endif ; }
[ 0, 0 ]
Chromium
third_party/opus/src/celt/celt_decoder.c
void validate_celt_decoder(CELTDecoder *st) { #ifndef CUSTOM_MODES celt_assert(st->mode == opus_custom_mode_create(48000, 960, NULL)); celt_assert(st->overlap == 120); #endif celt_assert(st->channels == 1 || st->channels == 2); celt_assert(st->stream_channels == 1 || st->stream_channels == 2); celt_assert(st-...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/celt_decoder.c
int celt_decoder_get_size(int channels) { const CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); return opus_custom_decoder_get_size(mode, channels); }
[ 0, 0 ]
Chromium
third_party/opus/src/celt/celt_decoder.c
OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_get_size(const CELTMode *mode, int channels) { int size = sizeof(struct CELTDecoder) + (channels * (DECODE_BUFFER_SIZE + mode->overlap) - 1) * sizeof(celt_sig) + channels * LPC_ORDER * sizeof(opus_val...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/celt_decoder.c
OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_init(CELTDecoder *st, const CELTMode *mode, int channels) { if (channels < 0 || channels > 2) return OPUS_BAD_ARG; if (st == NULL) return OPUS_ALLOC_FAIL; OPUS_CLEAR((char *)st, opus_custom_decoder_get_size(mode, channels)); st->mode = mode; st->overlap...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/celt_decoder.c
void opus_custom_decoder_destroy(CELTDecoder *st) { opus_free(st); } #endif #ifndef CUSTOM_MODES
[ 0, 0 ]
Chromium
third_party/opus/src/celt/celt_decoder.c
static void deemphasis_stereo_simple(celt_sig *in[], opus_val16 *pcm, int N, const opus_val16 coef0, celt_sig *mem) { celt_sig *OPUS_RESTRICT x0; celt_sig *OPUS_RESTRICT x1; celt_sig m0, m1; int j; x0 = in[0]; x1 = in[1]; m0 = mem[0]; m1 = mem[1]; for (j = 0; j < N...
[ 0, 0 ]
Chromium
third_party/opus/src/celt/celt_decoder.c
static void tf_decode(int start, int end, int isTransient, int *tf_res, int LM, ec_dec *dec) { int i, curr, tf_select; int tf_select_rsv; int tf_changed; int logp; opus_uint32 budget; opus_uint32 tell; budget = dec->storage * 8; tell = ec_tell(dec); logp = isTransient ? 2 : 4; ...
[ 1, 0 ]
Chromium
third_party/opus/src/celt/celt_encoder.c
static int opus_custom_encoder_init_arch(CELTEncoder *st, const CELTMode *mode, int channels, int arch) { if (channels < 0 || channels > 2) return OPUS_BAD_ARG; if (st == NULL || mode == NULL) return OPUS_ALLOC_FAIL; OPUS_CLEAR((char *)st, opus_custom_encoder_ge...
[ 1, 0 ]