History

Merge pull request #284 from volvet/clean_spatial_picture_code

Clean spatial picture alloc code

Ethan Hugg committed 12 years ago

Commit dbb89442 parents 3343b19 b770bb81 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
@@ -573,8 +573,8 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 572 unmodified lines
573/*!573/*!
574 * \brief alloc spatial layers pictures (I420 based source pictures)574 * \brief alloc spatial layers pictures (I420 based source pictures)
575 */575 */
576int32_t AllocSpatialPictures (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pParam) {576int32_t AllocSpatialPictures (sWelsEncCtx* pCtx, SWelsSvcCodingParam* pParam) {
577 CMemoryAlign* pMa = (*ppCtx)->pMemAlign;577 CMemoryAlign* pMa = pCtx->pMemAlign;
578 const int32_t kiDlayerCount = pParam->iNumDependencyLayer;578 const int32_t kiDlayerCount = pParam->iNumDependencyLayer;
579 int32_t iDlayerIndex = 0;579 int32_t iDlayerIndex = 0;
580 580
@@ -589,13 +589,13 @@ int32_t AllocSpatialPictures (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pParam) · 8 unmodified lines
589 589
590 do {590 do {
591 SPicture* pPic = AllocPicture (pMa, kiPicWidth, kiPicHeight, false);591 SPicture* pPic = AllocPicture (pMa, kiPicWidth, kiPicHeight, false);
592 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pPic), FreeMemorySvc (ppCtx); *ppCtx = NULL)592 WELS_VERIFY_RETURN_IF(1, (NULL == pPic))
593 (*ppCtx)->pSpatialPic[iDlayerIndex][i] = pPic;593 pCtx->pSpatialPic[iDlayerIndex][i] = pPic;
594 ++ i;594 ++ i;
595 } while (i < kuiRefNumInTemporal);595 } while (i < kuiRefNumInTemporal);
596 596
597 (*ppCtx)->uiSpatialLayersInTemporal[iDlayerIndex] = kuiLayerInTemporal;597 pCtx->uiSpatialLayersInTemporal[iDlayerIndex] = kuiLayerInTemporal;
598 (*ppCtx)->uiSpatialPicNum[iDlayerIndex] = kuiRefNumInTemporal;598 pCtx->uiSpatialPicNum[iDlayerIndex] = kuiRefNumInTemporal;
599 ++ iDlayerIndex;599 ++ iDlayerIndex;
600 } while (iDlayerIndex < kiDlayerCount);600 } while (iDlayerIndex < kiDlayerCount);
601 601
@@ -847,7 +847,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 245 unmodified lines
847 }847 }
848 848
849 // for I420 based source spatial pictures849 // for I420 based source spatial pictures
850 if (AllocSpatialPictures (ppCtx, pParam)) {850 if (AllocSpatialPictures (*ppCtx, pParam)) {
851 FreeMemorySvc (ppCtx);851 FreeMemorySvc (ppCtx);
852 return 1;852 return 1;
853 }853 }

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