Skip to content

Commit

Permalink
Merge pull request cisco#3266 from fulinjie/pr-multi_refs_encode
Browse files Browse the repository at this point in the history
Pr multi refs encode
  • Loading branch information
huili2 authored Apr 20, 2020
2 parents 7067d2d + 8e90a27 commit 79a1c1e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion codec/encoder/core/inc/param_svc.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt {
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;
}
Expand Down
2 changes: 1 addition & 1 deletion codec/encoder/core/src/au_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static int32_t WelsCheckNumRefSetting (SLogContext* pLogCtx, SWelsSvcCodingParam

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;
}
Expand Down
1 change: 0 additions & 1 deletion codec/encoder/core/src/ref_list_mgr_svc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ bool WelsBuildRefList (sWelsEncCtx* pCtx, const int32_t iPOC, int32_t iBestLtrRe
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DETAIL,
"WelsBuildRefList pCtx->uiTemporalId = %d,pRef->iFrameNum = %d,pRef->uiTemporalId = %d",
pCtx->uiTemporalId, pRef->iFrameNum, pRef->uiTemporalId);
break;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion codec/encoder/core/src/svc_encode_slice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void WelsSliceHeaderExtInit (sWelsEncCtx* pEncCtx, SDqLayer* pCurLayer, SSlice*
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;
}
Expand Down

0 comments on commit 79a1c1e

Please sign in to comment.