Showing the changes to codec/encoder/core/src/wels_preprocess.cpp (1 of 2 files). Show all
Unified · Split
| @@ -255,24 +255,24 @@ int32_t CWelsPreProcess::AnalyzeSpatialPic (sWelsEncCtx* pCtx, const int32_t kiD · 254 unmodified lines | |||
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | int32_t CWelsPreProcess::UpdateSpatialPictures (sWelsEncCtx* pCtx, SWelsSvcCodingParam* pParam, | 257 | int32_t CWelsPreProcess::UpdateSpatialPictures (sWelsEncCtx* pCtx, SWelsSvcCodingParam* pParam, |
| 258 | const int8_t iCurTid, const int32_t d_idx) { | 258 | const int8_t iCurTid, const int32_t kiDidx) { |
| 259 | if (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) | 259 | if (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) |
| 260 | return 0; | 260 | return 0; |
| 261 | if (iCurTid < m_uiSpatialLayersInTemporal[d_idx] - 1 || pParam->iDecompStages == 0) { | 261 | if (iCurTid < m_uiSpatialLayersInTemporal[kiDidx] - 1 || pParam->iDecompStages == 0) { |
| 262 | if ((iCurTid >= MAX_TEMPORAL_LEVEL) || (m_uiSpatialLayersInTemporal[d_idx] - 1 > MAX_TEMPORAL_LEVEL)) { | 262 | if ((iCurTid >= MAX_TEMPORAL_LEVEL) || (m_uiSpatialLayersInTemporal[kiDidx] - 1 > MAX_TEMPORAL_LEVEL)) { |
| 263 | InitLastSpatialPictures (pCtx); | 263 | InitLastSpatialPictures (pCtx); |
| 264 | return 1; | 264 | return 1; |
| 265 | } | 265 | } |
| 266 | if (pParam->bEnableLongTermReference && pCtx->bLongTermRefFlag[d_idx][iCurTid]) { | 266 | if (pParam->bEnableLongTermReference && pCtx->bLongTermRefFlag[kiDidx][iCurTid]) { |
| 267 | SPicture* tmp = m_pSpatialPic[d_idx][m_uiSpatialLayersInTemporal[d_idx] + pCtx->pVaa->uiMarkLongTermPicIdx]; | 267 | SPicture* tmp = m_pSpatialPic[kiDidx][m_uiSpatialLayersInTemporal[kiDidx] + pCtx->pVaa->uiMarkLongTermPicIdx]; |
| 268 | m_pSpatialPic[d_idx][m_uiSpatialLayersInTemporal[d_idx] + pCtx->pVaa->uiMarkLongTermPicIdx] = | 268 | m_pSpatialPic[kiDidx][m_uiSpatialLayersInTemporal[kiDidx] + pCtx->pVaa->uiMarkLongTermPicIdx] = |
| 269 | m_pSpatialPic[d_idx][iCurTid]; | 269 | m_pSpatialPic[kiDidx][iCurTid]; |
| 270 | m_pSpatialPic[d_idx][iCurTid] = m_pSpatialPic[d_idx][m_uiSpatialLayersInTemporal[d_idx] - 1]; | 270 | m_pSpatialPic[kiDidx][iCurTid] = m_pSpatialPic[kiDidx][m_uiSpatialLayersInTemporal[kiDidx] - 1]; |
| 271 | m_pSpatialPic[d_idx][m_uiSpatialLayersInTemporal[d_idx] - 1] = tmp; | 271 | m_pSpatialPic[kiDidx][m_uiSpatialLayersInTemporal[kiDidx] - 1] = tmp; |
| 272 | pCtx->bLongTermRefFlag[d_idx][iCurTid] = false; | 272 | pCtx->bLongTermRefFlag[kiDidx][iCurTid] = false; |
| 273 | } else { | 273 | } else { |
| 274 | WelsExchangeSpatialPictures (&m_pSpatialPic[d_idx][m_uiSpatialLayersInTemporal[d_idx] - 1], | 274 | WelsExchangeSpatialPictures (&m_pSpatialPic[kiDidx][m_uiSpatialLayersInTemporal[kiDidx] - 1], |
| 275 | &m_pSpatialPic[d_idx][iCurTid]); | 275 | &m_pSpatialPic[kiDidx][iCurTid]); |
| 276 | } | 276 | } |
| 277 | } | 277 | } |
| 278 | return 0; | 278 | return 0; |