Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 10 files). Show all
Unified · Split
| @@ -177,10 +177,10 @@ int32_t ParamValidationExt (sWelsEncCtx*pCtx,SWelsSvcCodingParam* pCodingParam) · 176 unmodified lines | ||
| 177 | 177 | SDLayerParam* fDlp = &pCodingParam->sDependencyLayers[i]; |
| 178 | 178 | const int32_t kiPicWidth = fDlp->iFrameWidth; |
| 179 | 179 | const int32_t kiPicHeight = fDlp->iFrameHeight; |
| 180 | − int32_t iMbWidth = 0; | |
| 181 | − int32_t iMbHeight = 0; | |
| 180 | + uint32_t iMbWidth = 0; | |
| 181 | + uint32_t iMbHeight = 0; | |
| 182 | 182 | int32_t iMbNumInFrame = 0; |
| 183 | − int32_t iMaxSliceNum = MAX_SLICES_NUM; | |
| 183 | + uint32_t iMaxSliceNum = MAX_SLICES_NUM; | |
| 184 | 184 | if (kiPicWidth <= 0 || kiPicHeight <= 0) { |
| 185 | 185 | WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid %d x %d in dependency layer settings!\n", kiPicWidth, kiPicHeight); |
| 186 | 186 | return ENC_RETURN_UNSUPPORTED_PARA; |
| @@ -924,10 +924,10 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 737 unmodified lines | ||
| 924 | 924 | int32_t iMbWidth; |
| 925 | 925 | int32_t iCountMbNum; // count number of SMB in each spatial |
| 926 | 926 | int32_t iSizeAllMbAlignCache; // cache line size aligned in each spatial |
| 927 | − } sMbSizeMap[MAX_DEPENDENCY_LAYER] = {0}; | |
| 928 | − int32_t iLineSizeY[MAX_DEPENDENCY_LAYER][2] = {0}; | |
| 929 | − int32_t iLineSizeUV[MAX_DEPENDENCY_LAYER][2] = {0}; | |
| 930 | − int32_t iMapSpatialIdx[MAX_DEPENDENCY_LAYER][2] = {0}; | |
| 927 | + } sMbSizeMap[MAX_DEPENDENCY_LAYER] = {{ 0 }}; | |
| 928 | + int32_t iLineSizeY[MAX_DEPENDENCY_LAYER][2] = {{ 0 }}; | |
| 929 | + int32_t iLineSizeUV[MAX_DEPENDENCY_LAYER][2] = {{ 0 }}; | |
| 930 | + int32_t iMapSpatialIdx[MAX_DEPENDENCY_LAYER][2] = {{ 0 }}; | |
| 931 | 931 | int32_t iSizeDec = 0; |
| 932 | 932 | int32_t iSizeEnc = 0; |
| 933 | 933 | int32_t iCountLayersNeedCs[2] = {0}; |
| @@ -1668,7 +1668,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 734 unmodified lines | ||
| 1668 | 1668 | |
| 1669 | 1669 | int32_t InitSliceSettings (SWelsSvcCodingParam* pCodingParam, const int32_t kiCpuCores, int16_t* pMaxSliceCount) { |
| 1670 | 1670 | int32_t iSpatialIdx = 0, iSpatialNum = pCodingParam->iSpatialLayerNum; |
| 1671 | − int16_t iMaxSliceCount = 0; | |
| 1671 | + uint16_t iMaxSliceCount = 0; | |
| 1672 | 1672 | |
| 1673 | 1673 | do { |
| 1674 | 1674 | SDLayerParam* pDlp = &pCodingParam->sDependencyLayers[iSpatialIdx]; |