Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 3 files). Show all
Unified · Split
| @@ -529,9 +529,9 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 528 unmodified lines | |||
| 529 | return ENC_RETURN_UNSUPPORTED_PARA; | 529 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 530 | } | 530 | } |
| 531 | 531 | ||
| 532 | if (pCodingParam->uiMaxNalSize <= NAL_HEADER_ADD_0X30BYTES) { | 532 | if (pCodingParam->uiMaxNalSize <= (NAL_HEADER_ADD_0X30BYTES + MAX_MACROBLOCK_SIZE_IN_BYTE)) { |
| 533 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiMaxNalSize (%d) settings!", | 533 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiMaxNalSize (%d) settings! should be larger than (NAL_HEADER_ADD_0X30BYTES + MAX_MACROBLOCK_SIZE_IN_BYTE)(%d)", |
| 534 | pCodingParam->uiMaxNalSize); | 534 | pCodingParam->uiMaxNalSize, (NAL_HEADER_ADD_0X30BYTES + MAX_MACROBLOCK_SIZE_IN_BYTE)); |
| 535 | return ENC_RETURN_UNSUPPORTED_PARA; | 535 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 536 | } | 536 | } |
| 537 | 537 | ||
| @@ -1740,7 +1740,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 1202 unmodified lines | |||
| 1740 | fCompressRatioThr = COMPRESS_RATIO_THR; | 1740 | fCompressRatioThr = COMPRESS_RATIO_THR; |
| 1741 | 1741 | ||
| 1742 | iLayerBsSize = WELS_ROUND (((3 * fDlp->iVideoWidth * fDlp->iVideoHeight) >> 1) * fCompressRatioThr) + | 1742 | iLayerBsSize = WELS_ROUND (((3 * fDlp->iVideoWidth * fDlp->iVideoHeight) >> 1) * fCompressRatioThr) + |
| 1743 | MAX_MACROBLOCK_SIZE_IN_BYTE; | 1743 | MAX_MACROBLOCK_SIZE_IN_BYTE_x2; |
| 1744 | iLayerBsSize = WELS_ALIGN (iLayerBsSize, 4); // 4 bytes alinged | 1744 | iLayerBsSize = WELS_ALIGN (iLayerBsSize, 4); // 4 bytes alinged |
| 1745 | iVclLayersBsSizeCount += iLayerBsSize; | 1745 | iVclLayersBsSizeCount += iLayerBsSize; |
| 1746 | ++ iIndex; | 1746 | ++ iIndex; |