ref: 82d5cd90c3c4c60e54e5063ca90c0a2a23194a4b
parent: 6ea8b264bb39e83b68ebfaeb3ac93206358c023b
parent: f797bfddea3a5ce70a8208225450f88c6b638da7
author: huili2 <[email protected]>
date: Mon Apr 20 06:26:33 EDT 2020
Merge pull request #3266 from fulinjie/pr-multi_refs_encode Pr multi refs encode
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -365,7 +365,7 @@
uiIntraPeriod = ((uiIntraPeriod + uiGopSize - 1) / uiGopSize) * uiGopSize;
if (((pCodingParam.iNumRefFrame != AUTO_REF_PIC_COUNT)
- && ((pCodingParam.iNumRefFrame > MAX_REF_PIC_COUNT) || (pCodingParam.iNumRefFrame < MIN_REF_PIC_COUNT)))
+ && !((pCodingParam.iNumRefFrame > MAX_REF_PIC_COUNT) || (pCodingParam.iNumRefFrame < MIN_REF_PIC_COUNT)))
|| ((iNumRefFrame != AUTO_REF_PIC_COUNT) && (pCodingParam.iNumRefFrame == AUTO_REF_PIC_COUNT))) {
iNumRefFrame = pCodingParam.iNumRefFrame;
}
--- a/codec/encoder/core/src/au_set.cpp
+++ b/codec/encoder/core/src/au_set.cpp
@@ -134,7 +134,7 @@
int32_t WelsCheckRefFrameLimitationNumRefFirst (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam) {
- if (WelsCheckNumRefSetting (pLogCtx, pParam, true)) {
+ if (WelsCheckNumRefSetting (pLogCtx, pParam, false)) {
// we take num-ref as the honored setting but it conflicts with temporal and LTR
return ENC_RETURN_UNSUPPORTED_PARA;
}
--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -628,7 +628,6 @@
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DETAIL,
"WelsBuildRefList pCtx->uiTemporalId = %d,pRef->iFrameNum = %d,pRef->uiTemporalId = %d",
pCtx->uiTemporalId, pRef->iFrameNum, pRef->uiTemporalId);
- break;
}
}
}
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -101,7 +101,7 @@
if (P_SLICE == pEncCtx->eSliceType) {
pCurSliceHeader->uiNumRefIdxL0Active = 1;
if (pCurSliceHeader->uiRefCount > 0 &&
- pCurSliceHeader->uiRefCount < pCurLayer->sLayerInfo.pSpsP->iNumRefFrames) {
+ pCurSliceHeader->uiRefCount <= pCurLayer->sLayerInfo.pSpsP->iNumRefFrames) {
pCurSliceHeader->bNumRefIdxActiveOverrideFlag = true;
pCurSliceHeader->uiNumRefIdxL0Active = pCurSliceHeader->uiRefCount;
}