MCPcopy Create free account
hub / github.com/cisco/openh264 / WelsPreprocessReset

Method WelsPreprocessReset

codec/encoder/core/src/wels_preprocess.cpp:145–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145int32_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
167int32_t CWelsPreProcess::AllocSpatialPictures (sWelsEncCtx* pCtx, SWelsSvcCodingParam* pParam) {
168 CMemoryAlign* pMa = pCtx->pMemAlign;

Callers

nothing calls this directly

Calls 3

WelsLogFunction · 0.85
FreeScaledPicFunction · 0.85
WelsInitScaledPicFunction · 0.85

Tested by

no test coverage detected