History

Clean spatial picture alloc code

volvet committed 12 years ago

Commit b770bb81 parent c5ea53f1 file · +7 −7Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+7−7
@@ -590,8 +590,8 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 589 unmodified lines
590590 /*!
591591 * \brief alloc spatial layers pictures (I420 based source pictures)
592592 */
593−int32_t AllocSpatialPictures (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pParam) {
594− CMemoryAlign* pMa = (*ppCtx)->pMemAlign;
593+int32_t AllocSpatialPictures (sWelsEncCtx* pCtx, SWelsSvcCodingParam* pParam) {
594+ CMemoryAlign* pMa = pCtx->pMemAlign;
595595 const int32_t kiDlayerCount = pParam->iNumDependencyLayer;
596596 int32_t iDlayerIndex = 0;
597597
@@ -606,13 +606,13 @@ int32_t AllocSpatialPictures (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pParam) · 8 unmodified lines
606606
607607 do {
608608 SPicture* pPic = AllocPicture (pMa, kiPicWidth, kiPicHeight, false);
609− WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pPic), FreeMemorySvc (ppCtx); *ppCtx = NULL)
610− (*ppCtx)->pSpatialPic[iDlayerIndex][i] = pPic;
609+ WELS_VERIFY_RETURN_IF(1, (NULL == pPic))
610+ pCtx->pSpatialPic[iDlayerIndex][i] = pPic;
611611 ++ i;
612612 } while (i < kuiRefNumInTemporal);
613613
614− (*ppCtx)->uiSpatialLayersInTemporal[iDlayerIndex] = kuiLayerInTemporal;
615− (*ppCtx)->uiSpatialPicNum[iDlayerIndex] = kuiRefNumInTemporal;
614+ pCtx->uiSpatialLayersInTemporal[iDlayerIndex] = kuiLayerInTemporal;
615+ pCtx->uiSpatialPicNum[iDlayerIndex] = kuiRefNumInTemporal;
616616 ++ iDlayerIndex;
617617 } while (iDlayerIndex < kiDlayerCount);
618618
@@ -864,7 +864,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 245 unmodified lines
864864 }
865865
866866 // for I420 based source spatial pictures
867− if (AllocSpatialPictures (ppCtx, pParam)) {
867+ if (AllocSpatialPictures (*ppCtx, pParam)) {
868868 FreeMemorySvc (ppCtx);
869869 return 1;
870870 }

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