add reading of the new option

This commit is contained in:
Sijia Chen 2014-09-23 18:04:24 +08:00
parent cfbf32b3fb
commit 147c9052b8
3 changed files with 378 additions and 372 deletions

View File

@ -294,6 +294,8 @@ int ParseConfig (CReadConfig& cRdCfg, SSourcePicture* pSrcPic, SEncParamExt& pSv
pSvcParam.iLTRRefNum = atoi (strTag[1].c_str());
} else if (strTag[0].compare ("LtrMarkPeriod") == 0) {
pSvcParam.iLtrMarkPeriod = (uint32_t)atoi (strTag[1].c_str());
} else if (strTag[0].compare ("LosslessLink") == 0) {
pSvcParam.bIsLosslessLink = atoi (strTag[1].c_str()) ? true : false;
} else if (strTag[0].compare ("NumLayers") == 0) {
pSvcParam.iSpatialLayerNum = (int8_t)atoi (strTag[1].c_str());
if (pSvcParam.iSpatialLayerNum > MAX_DEPENDENCY_LAYER || pSvcParam.iSpatialLayerNum <= 0) {

View File

@ -119,7 +119,7 @@ int8_t iDecompStages; // GOP size dependency
int32_t iMaxNumRefFrame;
//setting this according to link type in use MAY invoke some algorithms targeting higher coding efficiency
bool bIsLossLessLink;
bool bIsLosslessLink;
public:
TagWelsSvcCodingParam() {
@ -220,7 +220,7 @@ void FillDefault() {
sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceMbNum[idx] = 960;
sSpatialLayers[0].iDLayerQp = SVC_QUALITY_BASE_QP;
bIsLossLessLink = false;
bIsLosslessLink = false;
}
int32_t ParamBaseTranscode (const SEncParamBase& pCodingParam) {
@ -329,6 +329,10 @@ int32_t ParamTranscode (const SEncParamExt& pCodingParam) {
/* Enable int32_t term reference */
bEnableLongTermReference = pCodingParam.bEnableLongTermReference ? true : false;
iLtrMarkPeriod = pCodingParam.iLtrMarkPeriod;
bIsLosslessLink = pCodingParam.bIsLosslessLink;
if (iUsageType == SCREEN_CONTENT_REAL_TIME && !bIsLosslessLink && bEnableLongTermReference) {
bEnableLongTermReference = false;
}
/* For ssei information */
bEnableSSEI = pCodingParam.bEnableSSEI;

View File

@ -912,7 +912,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) {
break;
case ENCODER_OPTION_IS_LOSSLESS_LINK: {
bool bValue = * (static_cast<bool*>(pOption));
m_pEncContext->pSvcParam->bIsLossLessLink = bValue;
m_pEncContext->pSvcParam->bIsLosslessLink = bValue;
}
break;
default: