| 143 | } |
| 144 | |
| 145 | int32_t CWelsPreProcess::WelsPreprocessReset (sWelsEncCtx* pCtx, int32_t iWidth, int32_t iHeight) { |
| 146 | int32_t iRet = -1; |
| 147 | SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam; |
| 148 | //init source width and height |
| 149 | pSvcParam->SUsedPicRect.iLeft = 0; |
| 150 | pSvcParam->SUsedPicRect.iTop = 0; |
| 151 | pSvcParam->SUsedPicRect.iWidth = iWidth; |
| 152 | pSvcParam->SUsedPicRect.iHeight = iHeight; |
| 153 | if ((iWidth < 16) || ((iHeight < 16))) { |
| 154 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "Don't support width(%d) or height(%d) which is less than 16 ", iWidth, |
| 155 | iHeight); |
| 156 | return iRet; |
| 157 | } |
| 158 | if (pCtx) { |
| 159 | FreeScaledPic (&m_sScaledPicture, pCtx->pMemAlign); |
| 160 | iRet = InitLastSpatialPictures (pCtx); |
| 161 | iRet = WelsInitScaledPic (pCtx->pSvcParam, &m_sScaledPicture, pCtx->pMemAlign); |
| 162 | } |
| 163 | |
| 164 | return iRet; |
| 165 | } |
| 166 | |
| 167 | int32_t CWelsPreProcess::AllocSpatialPictures (sWelsEncCtx* pCtx, SWelsSvcCodingParam* pParam) { |
| 168 | CMemoryAlign* pMa = pCtx->pMemAlign; |
nothing calls this directly
no test coverage detected