| 2822 | } |
| 2823 | |
| 2824 | int32_t WelsWriteOneSPS (sWelsEncCtx* pCtx, const int32_t kiSpsIdx, int32_t& iNalSize) { |
| 2825 | int iNal = pCtx->pOut->iNalIndex; |
| 2826 | WelsLoadNal (pCtx->pOut, NAL_UNIT_SPS, NRI_PRI_HIGHEST); |
| 2827 | |
| 2828 | WelsWriteSpsNal (&pCtx->pSpsArray[kiSpsIdx], &pCtx->pOut->sBsWrite, |
| 2829 | pCtx->pFuncList->pParametersetStrategy->GetSpsIdOffsetList (PARA_SET_TYPE_AVCSPS)); |
| 2830 | WelsUnloadNal (pCtx->pOut); |
| 2831 | |
| 2832 | int32_t iReturn = WelsEncodeNal (&pCtx->pOut->sNalList[iNal], NULL, |
| 2833 | pCtx->iFrameBsSize - pCtx->iPosBsBuffer,//available buffer to be written, so need to substract the used length |
| 2834 | pCtx->pFrameBs + pCtx->iPosBsBuffer, |
| 2835 | &iNalSize); |
| 2836 | WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS) |
| 2837 | |
| 2838 | pCtx->iPosBsBuffer += iNalSize; |
| 2839 | return ENC_RETURN_SUCCESS; |
| 2840 | } |
| 2841 | |
| 2842 | int32_t WelsWriteOnePPS (sWelsEncCtx* pCtx, const int32_t kiPpsIdx, int32_t& iNalSize) { |
| 2843 | //TODO |
no test coverage detected