[Encoder] fix idr_id: idr_id should be adding regardless of the sps strategy
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all
Unified · Split
| @@ -3140,7 +3140,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3139 unmodified lines | |||
| 3140 | pLayerBsInfo->pNalLengthInByte = pCtx->pOut->pNalLen; | 3140 | pLayerBsInfo->pNalLengthInByte = pCtx->pOut->pNalLen; |
| 3141 | 3141 | ||
| 3142 | if (eFrameType == videoFrameTypeIDR) { | 3142 | if (eFrameType == videoFrameTypeIDR) { |
| 3143 | ++ pCtx->sPSOVector.uiIdrPicId; | 3143 | ++ pCtx->uiIdrPicId; |
| 3144 | //if ( pSvcParam->bEnableSSEI ) | 3144 | //if ( pSvcParam->bEnableSSEI ) |
| 3145 | 3145 | ||
| 3146 | // write parameter sets bitstream here | 3146 | // write parameter sets bitstream here |
| @@ -3830,7 +3830,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 683 unmodified lines | |||
| 3830 | memset (((*ppCtx)->sPSOVector.sParaSetOffsetVariable[k].bUsedParaSetIdInBs), 0, MAX_PPS_COUNT * sizeof (bool)); | 3830 | memset (((*ppCtx)->sPSOVector.sParaSetOffsetVariable[k].bUsedParaSetIdInBs), 0, MAX_PPS_COUNT * sizeof (bool)); |
| 3831 | memcpy (sTmpPsoVariable, (*ppCtx)->sPSOVector.sParaSetOffsetVariable, | 3831 | memcpy (sTmpPsoVariable, (*ppCtx)->sPSOVector.sParaSetOffsetVariable, |
| 3832 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage | 3832 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage |
| 3833 | uiTmpIdrPicId = (*ppCtx)->sPSOVector.uiIdrPicId; | 3833 | uiTmpIdrPicId = (*ppCtx)->uiIdrPicId; |
| 3834 | 3834 | ||
| 3835 | SEncoderStatistics sTempEncoderStatistics = (*ppCtx)->sEncoderStatistics; | 3835 | SEncoderStatistics sTempEncoderStatistics = (*ppCtx)->sEncoderStatistics; |
| 3836 | 3836 | ||
| @@ -3848,7 +3848,8 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 11 unmodified lines | |||
| 3848 | //for FLEXIBLE_PARASET_ID | 3848 | //for FLEXIBLE_PARASET_ID |
| 3849 | memcpy ((*ppCtx)->sPSOVector.sParaSetOffsetVariable, sTmpPsoVariable, | 3849 | memcpy ((*ppCtx)->sPSOVector.sParaSetOffsetVariable, sTmpPsoVariable, |
| 3850 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage | 3850 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage |
| 3851 | (*ppCtx)->sPSOVector.uiIdrPicId = uiTmpIdrPicId; | 3851 | //for LTR |
| 3852 | (*ppCtx)->uiIdrPicId = uiTmpIdrPicId; | ||
| 3852 | //for sEncoderStatistics | 3853 | //for sEncoderStatistics |
| 3853 | (*ppCtx)->sEncoderStatistics = sTempEncoderStatistics; | 3854 | (*ppCtx)->sEncoderStatistics = sTempEncoderStatistics; |
| 3854 | } else { | 3855 | } else { |