Slice buffer reallocate design::PR07:add ut cases for new slice buffer reallocate design
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 9 files). Show all
Unified · Split
| @@ -727,7 +727,7 @@ int32_t WelsEncoderApplyBitVaryRang (SLogContext* pLogCtx, SWelsSvcCodingParam* · 726 unmodified lines | ||
| 727 | 727 | * \pParam iCountNals pointer of count number of nals indeed |
| 728 | 728 | * \return 0 - successful; otherwise failed |
| 729 | 729 | */ |
| 730 | −static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pParam, int32_t* pCountLayers, | |
| 730 | +int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pParam, int32_t* pCountLayers, | |
| 731 | 731 | int32_t* pCountNals) { |
| 732 | 732 | int32_t iCountNumLayers = 0; |
| 733 | 733 | int32_t iCountNumNals = 0; |
| @@ -761,9 +761,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 27 unmodified lines | ||
| 761 | 761 | return 1; |
| 762 | 762 | } |
| 763 | 763 | } else { /*if ( SM_SINGLE_SLICE != pDLayer->sSliceArgument.uiSliceMode )*/ |
| 764 | − const int32_t kiNumOfSlice = GetInitialSliceNum ((pDLayer->iVideoWidth + 0x0f) >> 4, | |
| 765 | − (pDLayer->iVideoHeight + 0x0f) >> 4, | |
| 766 | − &pDLayer->sSliceArgument); | |
| 764 | + const int32_t kiNumOfSlice = GetInitialSliceNum (&pDLayer->sSliceArgument); | |
| 767 | 765 | |
| 768 | 766 | // NEED check iCountNals value in case multiple slices is used |
| 769 | 767 | iCountNumNals += kiNumOfSlice; // for pSlice VCL NALs |
| @@ -1069,7 +1067,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 299 unmodified lines | ||
| 1069 | 1067 | pDqLayer->iMbHeight = kiMbH; |
| 1070 | 1068 | |
| 1071 | 1069 | int32_t iMaxSliceNum = 1; |
| 1072 | − const int32_t kiSliceNum = GetInitialSliceNum (kiMbW, kiMbH, &pDlayer->sSliceArgument); | |
| 1070 | + const int32_t kiSliceNum = GetInitialSliceNum (&pDlayer->sSliceArgument); | |
| 1073 | 1071 | if (iMaxSliceNum < kiSliceNum) |
| 1074 | 1072 | iMaxSliceNum = kiSliceNum; |
| 1075 | 1073 | pDqLayer->iMaxSliceNum = iMaxSliceNum; |