ref: 2242214368bbd83e25afa3d068b8322118ee9f99
parent: a6f44f5f79661d036a654964b7497550381d668d
author: ruil2 <[email protected]>
date: Thu Jun 19 09:12:39 EDT 2014
update initilaization of m_pLastSpatialPicture
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -457,16 +457,20 @@
SWelsSvcCodingParam* pParam = pCtx->pSvcParam;
const int32_t kiDlayerCount = pParam->iSpatialLayerNum;
int32_t iDlayerIndex = 0;
-
- for (; iDlayerIndex < kiDlayerCount; iDlayerIndex++) {
- const int32_t kiLayerInTemporal = m_uiSpatialLayersInTemporal[iDlayerIndex];
- m_pLastSpatialPicture[iDlayerIndex][0] = m_pSpatialPic[iDlayerIndex][kiLayerInTemporal - 2];
- m_pLastSpatialPicture[iDlayerIndex][1] = NULL;
+ if (pParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
+ for (; iDlayerIndex < MAX_DEPENDENCY_LAYER; iDlayerIndex++) {
+ m_pLastSpatialPicture[iDlayerIndex][0] = m_pLastSpatialPicture[iDlayerIndex][1] = NULL;
+ }
+ } else {
+ for (; iDlayerIndex < kiDlayerCount; iDlayerIndex++) {
+ const int32_t kiLayerInTemporal = m_uiSpatialLayersInTemporal[iDlayerIndex];
+ m_pLastSpatialPicture[iDlayerIndex][0] = m_pSpatialPic[iDlayerIndex][kiLayerInTemporal - 2];
+ m_pLastSpatialPicture[iDlayerIndex][1] = NULL;
+ }
+ for (; iDlayerIndex < MAX_DEPENDENCY_LAYER; iDlayerIndex++) {
+ m_pLastSpatialPicture[iDlayerIndex][0] = m_pLastSpatialPicture[iDlayerIndex][1] = NULL;
+ }
}
- for (; iDlayerIndex < MAX_DEPENDENCY_LAYER; iDlayerIndex++) {
- m_pLastSpatialPicture[iDlayerIndex][0] = m_pLastSpatialPicture[iDlayerIndex][1] = NULL;
- }
-
return 0;
}
//*********************************************************************************************************/