feat: gate Log2MaxFrameNum on bSubcodecMode via WelsInitSps parameter
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e647f733c9
commit
d239564d84
3 changed files with 6 additions and 6 deletions
|
|
@ -107,7 +107,7 @@ int32_t WelsWritePpsSyntax (SWelsPPS* pPps, SBitStringAux* pBitStringAux, IWelsP
|
|||
int32_t WelsInitSps (SWelsSPS* pSps, SSpatialLayerConfig* pLayerParam, SSpatialLayerInternal* pLayerParamInternal,
|
||||
const uint32_t kuiIntraPeriod, const int32_t kiNumRefFrame,
|
||||
const uint32_t kiSpsId, const bool kbEnableFrameCropping, bool bEnableRc,
|
||||
const int32_t kiDlayerCount,bool bSVCBaselayer);
|
||||
const int32_t kiDlayerCount, bool bSVCBaselayer, bool bSubcodecMode);
|
||||
|
||||
/*!
|
||||
* \brief initialize subset pSps based on configurable parameters in svc
|
||||
|
|
|
|||
|
|
@ -485,14 +485,14 @@ static inline bool WelsGetPaddingOffset (int32_t iActualWidth, int32_t iActualHe
|
|||
int32_t WelsInitSps (SWelsSPS* pSps, SSpatialLayerConfig* pLayerParam, SSpatialLayerInternal* pLayerParamInternal,
|
||||
const uint32_t kuiIntraPeriod, const int32_t kiNumRefFrame,
|
||||
const uint32_t kuiSpsId, const bool kbEnableFrameCropping, bool bEnableRc,
|
||||
const int32_t kiDlayerCount, bool bSVCBaselayer) {
|
||||
const int32_t kiDlayerCount, bool bSVCBaselayer, bool bSubcodecMode) {
|
||||
memset (pSps, 0, sizeof (SWelsSPS));
|
||||
pSps->uiSpsId = kuiSpsId;
|
||||
pSps->iMbWidth = (pLayerParam->iVideoWidth + 15) >> 4;
|
||||
pSps->iMbHeight = (pLayerParam->iVideoHeight + 15) >> 4;
|
||||
|
||||
//max value of both iFrameNum and POC are 2^16-1, in our encoder, iPOC=2*iFrameNum, so max of iFrameNum should be 2^15-1.--
|
||||
pSps->uiLog2MaxFrameNum = 15;//16;
|
||||
pSps->uiLog2MaxFrameNum = bSubcodecMode ? 4 : 15;//16;
|
||||
pSps->iLog2MaxPocLsb = 1 + pSps->uiLog2MaxFrameNum;
|
||||
|
||||
pSps->iNumRefFrames = kiNumRefFrame; /* min pRef size when fifo pRef operation*/
|
||||
|
|
@ -565,7 +565,7 @@ int32_t WelsInitSubsetSps (SSubsetSps* pSubsetSps, SSpatialLayerConfig* pLayerPa
|
|||
memset (pSubsetSps, 0, sizeof (SSubsetSps));
|
||||
|
||||
WelsInitSps (pSps, pLayerParam, pLayerParamInternal, kuiIntraPeriod, kiNumRefFrame, kuiSpsId, kbEnableFrameCropping,
|
||||
bEnableRc, kiDlayerCount, false);
|
||||
bEnableRc, kiDlayerCount, false, false);
|
||||
|
||||
pSps->uiProfileIdc = pLayerParam->uiProfileIdc ;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ static int32_t WelsGenerateNewSps (sWelsEncCtx* pCtx, const bool kbUseSubsetSps,
|
|||
iRet = WelsInitSps (pSps, pDlayerParam, &pParam->sDependencyLayers[iDlayerIndex], pParam->uiIntraPeriod,
|
||||
pParam->iMaxNumRefFrame,
|
||||
kiSpsId, pParam->bEnableFrameCroppingFlag, pParam->iRCMode != RC_OFF_MODE, iDlayerCount,
|
||||
bSVCBaselayer);
|
||||
bSVCBaselayer, pParam->bSubcodecMode);
|
||||
} else {
|
||||
iRet = WelsInitSubsetSps (pSubsetSps, pDlayerParam, &pParam->sDependencyLayers[iDlayerIndex], pParam->uiIntraPeriod,
|
||||
pParam->iMaxNumRefFrame,
|
||||
|
|
@ -178,7 +178,7 @@ int32_t FindExistingSps (SWelsSvcCodingParam* pParam, const bool kbUseSubsetSps,
|
|||
WelsInitSps (&sTmpSps, pDlayerParam, &pParam->sDependencyLayers[iDlayerIndex], pParam->uiIntraPeriod,
|
||||
pParam->iMaxNumRefFrame,
|
||||
0, pParam->bEnableFrameCroppingFlag, pParam->iRCMode != RC_OFF_MODE, iDlayerCount,
|
||||
bSVCBaseLayer);
|
||||
bSVCBaseLayer, pParam->bSubcodecMode);
|
||||
for (int32_t iId = 0; iId < iSpsNumInUse; iId++) {
|
||||
if (CheckMatchedSps (&sTmpSps, &pSpsArray[iId])) {
|
||||
return iId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue