History

Convert tabs to spaces in vertically aligned code

Martin Storsjö committed 11 years ago

Commit 51efa571 parent 723044864 files · +2746 −2751Browse files

Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 64 files). Show all

Unified · Split

codec/decoder/core/src/decoder.cpp+37−37
@@ -93,9 +93,9 @@ static int32_t CreatePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, cons · 92 unmodified lines
9393 }
9494
9595 // initialize context in queue
96− pPicBuf->iCapacity = kiSize;
96+ pPicBuf->iCapacity = kiSize;
9797 pPicBuf->iCurrentIdx = 0;
98− * ppPicBuf = pPicBuf;
98+ * ppPicBuf = pPicBuf;
9999
100100 return 0;
101101 }
@@ -139,9 +139,9 @@ static int32_t IncreasePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, co · 37 unmodified lines
139139 memcpy (pPicNewBuf->ppPic, pPicOldBuf->ppPic, kiOldSize * sizeof (PPicture));
140140
141141 // initialize context in queue
142− pPicNewBuf->iCapacity = kiNewSize;
142+ pPicNewBuf->iCapacity = kiNewSize;
143143 pPicNewBuf->iCurrentIdx = pPicOldBuf->iCurrentIdx;
144− * ppPicBuf = pPicNewBuf;
144+ * ppPicBuf = pPicNewBuf;
145145
146146 for (int32_t i = 0; i < pPicNewBuf->iCapacity; i++) {
147147 pPicNewBuf->ppPic[i]->bUsedAsRef = false;
@@ -214,8 +214,8 @@ static int32_t DecreasePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, co · 66 unmodified lines
214214 }
215215
216216 // initialize context in queue
217− pPicNewBuf->iCapacity = kiNewSize;
218− *ppPicBuf = pPicNewBuf;
217+ pPicNewBuf->iCapacity = kiNewSize;
218+ *ppPicBuf = pPicNewBuf;
219219
220220 for (int32_t i = 0; i < pPicNewBuf->iCapacity; i++) {
221221 pPicNewBuf->ppPic[i]->bUsedAsRef = false;
@@ -277,35 +277,35 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { · 55 unmodified lines
277277
278278 pCtx->pArgDec = NULL;
279279
280− pCtx->eOutputColorFormat = videoFormatI420; // yuv in default
281− pCtx->bHaveGotMemory = false; // not ever request memory blocks for decoder context related
282− pCtx->uiCpuFlag = 0;
280+ pCtx->eOutputColorFormat = videoFormatI420; // yuv in default
281+ pCtx->bHaveGotMemory = false; // not ever request memory blocks for decoder context related
282+ pCtx->uiCpuFlag = 0;
283283
284− pCtx->bAuReadyFlag = 0; // au data is not ready
284+ pCtx->bAuReadyFlag = 0; // au data is not ready
285285 pCtx->bCabacInited = false;
286286
287287 pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);
288288
289− pCtx->iImgWidthInPixel = 0;
290− pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available
291− pCtx->iLastImgWidthInPixel = 0;
292− pCtx->iLastImgHeightInPixel = 0;
289+ pCtx->iImgWidthInPixel = 0;
290+ pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available
291+ pCtx->iLastImgWidthInPixel = 0;
292+ pCtx->iLastImgHeightInPixel = 0;
293293 pCtx->bFreezeOutput = true;
294294
295− pCtx->iFrameNum = -1;
296− pCtx->iPrevFrameNum = -1;
297− pCtx->iErrorCode = ERR_NONE;
295+ pCtx->iFrameNum = -1;
296+ pCtx->iPrevFrameNum = -1;
297+ pCtx->iErrorCode = ERR_NONE;
298298
299− pCtx->pDec = NULL;
299+ pCtx->pDec = NULL;
300300
301301 WelsResetRefPic (pCtx);
302302
303− pCtx->iActiveFmoNum = 0;
303+ pCtx->iActiveFmoNum = 0;
304304
305− pCtx->pPicBuff[LIST_0] = NULL;
306− pCtx->pPicBuff[LIST_1] = NULL;
305+ pCtx->pPicBuff[LIST_0] = NULL;
306+ pCtx->pPicBuff[LIST_1] = NULL;
307307
308− pCtx->bAvcBasedFlag = true;
308+ pCtx->bAvcBasedFlag = true;
309309 pCtx->eErrorConMethod = ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE;
310310 pCtx->pPreviousDecodedPictureInDpb = NULL;
311311 pCtx->sDecoderStatistics.iAvgLumaQp = -1;
@@ -353,13 +353,13 @@ static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) { · 41 unmodified lines
353353 * request memory blocks for decoder avc part
354354 */
355355 int32_t WelsRequestMem (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight) {
356− const int32_t kiPicWidth = kiMbWidth << 4;
357− const int32_t kiPicHeight = kiMbHeight << 4;
356+ const int32_t kiPicWidth = kiMbWidth << 4;
357+ const int32_t kiPicHeight = kiMbHeight << 4;
358358 int32_t iErr = ERR_NONE;
359359
360− int32_t iListIdx = 0; //, mb_blocks = 0;
361− int32_t iPicQueueSize = 0; // adaptive size of picture queue, = (pSps->iNumRefFrames x 2)
362− bool bNeedChangePicQueue = true;
360+ int32_t iListIdx = 0; //, mb_blocks = 0;
361+ int32_t iPicQueueSize = 0; // adaptive size of picture queue, = (pSps->iNumRefFrames x 2)
362+ bool bNeedChangePicQueue = true;
363363
364364 WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pCtx || kiPicWidth <= 0 || kiPicHeight <= 0))
365365
@@ -418,11 +418,11 @@ int32_t WelsRequestMem (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const · 52 unmodified lines
418418 return iErr;
419419
420420
421− pCtx->iImgWidthInPixel = kiPicWidth; // target width of image to be reconstruted while decoding
422− pCtx->iImgHeightInPixel = kiPicHeight; // target height of image to be reconstruted while decoding
421+ pCtx->iImgWidthInPixel = kiPicWidth; // target width of image to be reconstruted while decoding
422+ pCtx->iImgHeightInPixel = kiPicHeight; // target height of image to be reconstruted while decoding
423423
424− pCtx->bHaveGotMemory = true; // global memory for decoder context related is requested
425− pCtx->pDec = NULL; // need prefetch a new pic due to spatial size changed
424+ pCtx->bHaveGotMemory = true; // global memory for decoder context related is requested
425+ pCtx->pDec = NULL; // need prefetch a new pic due to spatial size changed
426426
427427 if (pCtx->pCabacDecEngine == NULL)
428428 pCtx->pCabacDecEngine = (SWelsCabacDecEngine*) WelsMallocz (sizeof (SWelsCabacDecEngine), "pCtx->pCabacDecEngine");
@@ -450,12 +450,12 @@ void WelsFreeMem (PWelsDecoderContext pCtx) { · 21 unmodified lines
450450 }
451451
452452 // added for safe memory
453− pCtx->iImgWidthInPixel = 0;
453+ pCtx->iImgWidthInPixel = 0;
454454 pCtx->iImgHeightInPixel = 0;
455− pCtx->iLastImgWidthInPixel = 0;
455+ pCtx->iLastImgWidthInPixel = 0;
456456 pCtx->iLastImgHeightInPixel = 0;
457457 pCtx->bFreezeOutput = true;
458− pCtx->bHaveGotMemory = false;
458+ pCtx->bHaveGotMemory = false;
459459 WelsFree (pCtx->pCabacDecEngine, "pCtx->pCabacDecEngine");
460460 }
461461
@@ -660,8 +660,8 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 198 unmodified lines
660660 ((pSrcNal[2 + iSrcIdx] == 0x03) || (pSrcNal[2 + iSrcIdx] == 0x01))) {
661661 if (pSrcNal[2 + iSrcIdx] == 0x03) {
662662 ST16 (pDstNal + iDstIdx, 0);
663− iDstIdx += 2;
664− iSrcIdx += 3;
663+ iDstIdx += 2;
664+ iSrcIdx += 3;
665665 iSrcConsumed += 3;
666666 } else {
667667
@@ -817,7 +817,7 @@ int32_t DecoderSetCsp (PWelsDecoderContext pCtx, const int32_t kiColorFormat) { · 149 unmodified lines
817817 */
818818 int32_t SyncPictureResolutionExt (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight) {
819819 int32_t iErr = ERR_NONE;
820− const int32_t kiPicWidth = kiMbWidth << 4;
820+ const int32_t kiPicWidth = kiMbWidth << 4;
821821 const int32_t kiPicHeight = kiMbHeight << 4;
822822
823823 iErr = WelsRequestMem (pCtx, kiMbWidth, kiMbHeight); // common memory used

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t