Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -356,22 +356,22 @@ int CWelsH264SVCEncoder::InitializeInternal (SWelsSvcCodingParam* pCfg) { · 355 unmodified lines | ||
| 356 | 356 | if (pCfg->iUsageType == SCREEN_CONTENT_REAL_TIME) { |
| 357 | 357 | if (pCfg->bEnableLongTermReference) { |
| 358 | 358 | pCfg->iLTRRefNum = WELS_CLIP3 (pCfg->iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN); |
| 359 | − if(pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) | |
| 359 | + if (pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) | |
| 360 | 360 | pCfg->iNumRefFrame = WELS_MAX (1, WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum; |
| 361 | 361 | } else { |
| 362 | 362 | pCfg->iLTRRefNum = 0; |
| 363 | − if(pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) | |
| 364 | − pCfg->iNumRefFrame = WELS_MAX (1, pCfg->uiGopSize >> 1);; | |
| 363 | + if (pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) | |
| 364 | + pCfg->iNumRefFrame = WELS_MAX (1, pCfg->uiGopSize >> 1); | |
| 365 | 365 | } |
| 366 | 366 | } else { |
| 367 | 367 | pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? WELS_CLIP3 (pCfg->iLTRRefNum, 1, LONG_TERM_REF_NUM) : 0; |
| 368 | − if(pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT){ | |
| 368 | + if (pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) { | |
| 369 | 369 | pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) : |
| 370 | − (MIN_REF_PIC_COUNT + pCfg->iLTRRefNum); | |
| 370 | + (MIN_REF_PIC_COUNT + pCfg->iLTRRefNum); | |
| 371 | 371 | pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM); |
| 372 | 372 | } |
| 373 | 373 | } |
| 374 | − if(pCfg->iNumRefFrame > pCfg->iMaxNumRefFrame) | |
| 374 | + if (pCfg->iNumRefFrame > pCfg->iMaxNumRefFrame) | |
| 375 | 375 | pCfg->iMaxNumRefFrame = pCfg->iNumRefFrame; |
| 376 | 376 | if (pCfg->iLtrMarkPeriod == 0) { |
| 377 | 377 | pCfg->iLtrMarkPeriod = 30; |
| @@ -572,16 +572,17 @@ void CWelsH264SVCEncoder::CheckProfileSetting (int32_t iLayer, EProfileIdc uiPro · 194 unmodified lines | ||
| 572 | 572 | void CWelsH264SVCEncoder::CheckLevelSetting (int32_t iLayer, ELevelIdc uiLevelIdc) { |
| 573 | 573 | SSpatialLayerConfig* pLayerInfo = &m_pEncContext->pSvcParam->sSpatialLayers[iLayer]; |
| 574 | 574 | pLayerInfo->uiLevelIdc = uiLevelIdc; |
| 575 | − if( (uiLevelIdc< LEVEL_1_0)||(uiLevelIdc >LEVEL_5_2)){ | |
| 575 | + if ((uiLevelIdc < LEVEL_1_0) || (uiLevelIdc > LEVEL_5_2)) { | |
| 576 | 576 | pLayerInfo->uiLevelIdc = LEVEL_5_2; |
| 577 | − WelsLog (m_pEncContext, WELS_LOG_WARNING, "doesn't support level(%d) change to LEVEL_5_2\n",uiLevelIdc); | |
| 577 | + WelsLog (m_pEncContext, WELS_LOG_WARNING, "doesn't support level(%d) change to LEVEL_5_2\n", uiLevelIdc); | |
| 578 | 578 | } |
| 579 | 579 | } |
| 580 | 580 | void CWelsH264SVCEncoder::CheckReferenceNumSetting (int32_t iNumRef) { |
| 581 | 581 | m_pEncContext->pSvcParam->iNumRefFrame = iNumRef; |
| 582 | − if((iNumRef < MIN_REF_PIC_COUNT)||(iNumRef> MAX_REFERENCE_PICTURE_COUNT_NUM)){ | |
| 583 | − m_pEncContext->pSvcParam->iNumRefFrame = AUTO_REF_PIC_COUNT; | |
| 584 | − WelsLog (m_pEncContext, WELS_LOG_WARNING, "doesn't support the number of reference frame(%d) change to auto select mode\n",iNumRef); | |
| 582 | + if ((iNumRef < MIN_REF_PIC_COUNT) || (iNumRef > MAX_REFERENCE_PICTURE_COUNT_NUM)) { | |
| 583 | + m_pEncContext->pSvcParam->iNumRefFrame = AUTO_REF_PIC_COUNT; | |
| 584 | + WelsLog (m_pEncContext, WELS_LOG_WARNING, | |
| 585 | + "doesn't support the number of reference frame(%d) change to auto select mode\n", iNumRef); | |
| 585 | 586 | } |
| 586 | 587 | } |
| 587 | 588 | /************************************************************************ |
| @@ -943,7 +944,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 355 unmodified lines | ||
| 943 | 944 | } |
| 944 | 945 | break; |
| 945 | 946 | case ENCODER_OPTION_DELIVERY_STATUS: { |
| 946 | − SDeliveryStatus *pValue = (static_cast<SDeliveryStatus*>(pOption)); | |
| 947 | + SDeliveryStatus* pValue = (static_cast<SDeliveryStatus*> (pOption)); | |
| 947 | 948 | m_pEncContext->iDropNumber = pValue->iDropNum; |
| 948 | 949 | } |
| 949 | 950 | break; |