History

add UT for LTR setopton and fix crash issue

ruil2 committed 12 years ago

Commit 7e8cde01 parent cef43e34 files · +125 −56Browse files

Showing the changes to codec/encoder/core (2 of 4 files). Show all

Unified · Split

2 files
  1. codec/encoder/core/inc/extern.h +1 −1
  2. codec/encoder/core/src/encoder_ext.cpp +4 −4
codec/encoder/core/inc/extern.h+1−1
@@ -108,7 +108,7 @@ int32_t ForceCodingIDR (sWelsEncCtx* pCtx); · 107 unmodified lines
108int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNew);108int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNew);
109void WelsEncoderApplyFrameRate (SWelsSvcCodingParam* pParam);109void WelsEncoderApplyFrameRate (SWelsSvcCodingParam* pParam);
110void WelsEncoderApplyBitRate (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer);110void WelsEncoderApplyBitRate (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer);
111void WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx*pCtx,SLTRConfig* pLTRValue);111void WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConfig* pLTRValue);
112int32_t FilterLTRRecoveryRequest (sWelsEncCtx* pCtx, SLTRRecoverRequest* pLTRRecoverRequest);112int32_t FilterLTRRecoveryRequest (sWelsEncCtx* pCtx, SLTRRecoverRequest* pLTRRecoverRequest);
113 113
114void FilterLTRMarkingFeedback (sWelsEncCtx* pCtx, SLTRMarkingFeedback* pLTRMarkingFeedback);114void FilterLTRMarkingFeedback (sWelsEncCtx* pCtx, SLTRMarkingFeedback* pLTRMarkingFeedback);
codec/encoder/core/src/encoder_ext.cpp+4−4
@@ -3825,10 +3825,10 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 3824 unmodified lines
3825 return 0;3825 return 0;
3826}3826}
3827 3827
3828void WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx* pCtx, SLTRConfig* pLTRValue) {3828void WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConfig* pLTRValue) {
3829 SWelsSvcCodingParam sConfig;3829 SWelsSvcCodingParam sConfig;
3830 int32_t iNumRefFrame = 1;3830 int32_t iNumRefFrame = 1;
3831 memcpy (&sConfig, pCtx->pSvcParam, sizeof (SWelsSvcCodingParam));3831 memcpy (&sConfig, (*ppCtx)->pSvcParam, sizeof (SWelsSvcCodingParam));
3832 sConfig.bEnableLongTermReference = pLTRValue->bEnableLongTermReference;3832 sConfig.bEnableLongTermReference = pLTRValue->bEnableLongTermReference;
3833 sConfig.iLTRRefNum = pLTRValue->iLTRRefNum;3833 sConfig.iLTRRefNum = pLTRValue->iLTRRefNum;
3834 int32_t uiGopSize = 1 << (sConfig.iTemporalLayerNum - 1);3834 int32_t uiGopSize = 1 << (sConfig.iTemporalLayerNum - 1);
@@ -3856,9 +3856,9 @@ void WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx* pCtx, SLTRConfig* p · 21 unmodified lines
3856 if (sConfig.iNumRefFrame > sConfig.iMaxNumRefFrame)3856 if (sConfig.iNumRefFrame > sConfig.iMaxNumRefFrame)
3857 sConfig.iMaxNumRefFrame = sConfig.iNumRefFrame;3857 sConfig.iMaxNumRefFrame = sConfig.iNumRefFrame;
3858 3858
3859 WelsLog (pLogCtx, WELS_LOG_WARNING, " CWelsH264SVCEncoder::SetOption enable LTR = %d,ltrnum = %d",3859 WelsLog (pLogCtx, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption enable LTR = %d,ltrnum = %d",
3860 sConfig.bEnableLongTermReference, sConfig.iLTRRefNum);3860 sConfig.bEnableLongTermReference, sConfig.iLTRRefNum);
3861 WelsEncoderParamAdjust (&pCtx, &sConfig);3861 WelsEncoderParamAdjust (ppCtx, &sConfig);
3862}3862}
3863int32_t DynSliceRealloc (sWelsEncCtx* pCtx,3863int32_t DynSliceRealloc (sWelsEncCtx* pCtx,
3864 SFrameBSInfo* pFrameBsInfo,3864 SFrameBSInfo* pFrameBsInfo,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t