name pre-process steps
This commit is contained in:
parent
c17994c6bf
commit
bb354d7c13
@ -108,8 +108,8 @@ class CWelsPreProcess {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
int32_t WelsPreprocessReset (sWelsEncCtx* pEncCtx);
|
int32_t WelsPreprocessReset (sWelsEncCtx* pEncCtx);
|
||||||
int32_t WelsPreprocessStep1 (sWelsEncCtx* pEncCtx, const SSourcePicture** kppSrcPicList, const int32_t kiConfiguredLayerNum);
|
int32_t BuildSpatialPicList (sWelsEncCtx* pEncCtx, const SSourcePicture** kppSrcPicList, const int32_t kiConfiguredLayerNum);
|
||||||
int32_t WelsPreprocessStep3 (sWelsEncCtx* pEncCtx, const int32_t kiDIdx);
|
int32_t AnalyzeSpatialPic (sWelsEncCtx* pEncCtx, const int32_t kiDIdx);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t WelsPreprocessCreate();
|
int32_t WelsPreprocessCreate();
|
||||||
|
@ -3136,7 +3136,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, void* pDst, const SSourcePictur
|
|||||||
pFbi->iLayerNum = 0; // for initialization
|
pFbi->iLayerNum = 0; // for initialization
|
||||||
|
|
||||||
// perform csc/denoise/downsample/padding, generate spatial layers
|
// perform csc/denoise/downsample/padding, generate spatial layers
|
||||||
iSpatialNum = pCtx->pVpp->WelsPreprocessStep1 (pCtx, ppSrcList, iConfiguredLayerNum);
|
iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, ppSrcList, iConfiguredLayerNum);
|
||||||
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
|
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
|
||||||
++ pCtx->iCodingIndex;
|
++ pCtx->iCodingIndex;
|
||||||
return WELS_FRAME_TYPE_SKIP;
|
return WELS_FRAME_TYPE_SKIP;
|
||||||
@ -3184,7 +3184,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, void* pDst, const SSourcePictur
|
|||||||
SDLayerParam* param_d = &pSvcParam->sDependencyLayers[d_idx];
|
SDLayerParam* param_d = &pSvcParam->sDependencyLayers[d_idx];
|
||||||
|
|
||||||
pCtx->uiDependencyId = iCurDid = (int8_t)d_idx;
|
pCtx->uiDependencyId = iCurDid = (int8_t)d_idx;
|
||||||
pCtx->pVpp->WelsPreprocessStep3 (pCtx, d_idx);
|
pCtx->pVpp->AnalyzeSpatialPic (pCtx, d_idx);
|
||||||
|
|
||||||
pCtx->pEncPic = pEncPic = (pSpatialIndexMap + iSpatialIdx)->pSrc;
|
pCtx->pEncPic = pEncPic = (pSpatialIndexMap + iSpatialIdx)->pSrc;
|
||||||
pCtx->pEncPic->iPictureType = pCtx->eSliceType;
|
pCtx->pEncPic->iPictureType = pCtx->eSliceType;
|
||||||
|
@ -260,7 +260,7 @@ int32_t CWelsPreProcess::WelsPreprocessReset (sWelsEncCtx* pCtx) {
|
|||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CWelsPreProcess::WelsPreprocessStep1 (sWelsEncCtx* pCtx, const SSourcePicture** kppSrcPicList,
|
int32_t CWelsPreProcess::BuildSpatialPicList (sWelsEncCtx* pCtx, const SSourcePicture** kppSrcPicList,
|
||||||
const int32_t kiConfiguredLayerNum) {
|
const int32_t kiConfiguredLayerNum) {
|
||||||
SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
|
SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
|
||||||
int32_t iNumDependencyLayer = (int32_t)pSvcParam->iNumDependencyLayer;
|
int32_t iNumDependencyLayer = (int32_t)pSvcParam->iNumDependencyLayer;
|
||||||
@ -309,7 +309,7 @@ int32_t CWelsPreProcess::WelsPreprocessStep1 (sWelsEncCtx* pCtx, const SSourcePi
|
|||||||
return iSpatialNum;
|
return iSpatialNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CWelsPreProcess::WelsPreprocessStep3 (sWelsEncCtx* pCtx, const int32_t kiDidx) {
|
int32_t CWelsPreProcess::AnalyzeSpatialPic (sWelsEncCtx* pCtx, const int32_t kiDidx) {
|
||||||
SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
|
SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
|
||||||
bool bNeededMbAq = (pSvcParam->bEnableAdaptiveQuant && (pCtx->eSliceType == P_SLICE));
|
bool bNeededMbAq = (pSvcParam->bEnableAdaptiveQuant && (pCtx->eSliceType == P_SLICE));
|
||||||
bool bCalculateBGD = (pCtx->eSliceType == P_SLICE && pSvcParam->bEnableBackgroundDetection);
|
bool bCalculateBGD = (pCtx->eSliceType == P_SLICE && pSvcParam->bEnableBackgroundDetection);
|
||||||
|
Loading…
Reference in New Issue
Block a user