Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -458,7 +458,8 @@ int CWelsH264SVCEncoder::EncodeFrameInternal (const SSourcePicture* pSrcPic, SF · 457 unmodified lines | ||
| 458 | 458 | WelsUninitEncoderExt (&m_pEncContext); |
| 459 | 459 | return cmMallocMemeError; |
| 460 | 460 | } else if ((kiEncoderReturn != ENC_RETURN_SUCCESS) && (kiEncoderReturn == ENC_RETURN_CORRECTED)) { |
| 461 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "unexpected return(%d) from EncodeFrameInternal()!\n", kiEncoderReturn); | |
| 461 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "unexpected return(%d) from EncodeFrameInternal()!\n", | |
| 462 | + kiEncoderReturn); | |
| 462 | 463 | return cmUnkonwReason; |
| 463 | 464 | } |
| 464 | 465 | ///////////////////for test |
| @@ -520,15 +521,11 @@ int CWelsH264SVCEncoder::EncodeParameterSets (SFrameBSInfo* pBsInfo) { · 55 unmodified lines | ||
| 520 | 521 | * return: 0 - success; otherwise - failed; |
| 521 | 522 | */ |
| 522 | 523 | int CWelsH264SVCEncoder::PauseFrame (const SSourcePicture* kpSrcPic, SFrameBSInfo* pBsInfo) { |
| 523 | − int32_t iReturn = 1; | |
| 524 | + int32_t iReturn = cmResultSuccess; | |
| 524 | 525 | |
| 525 | 526 | ForceIntraFrame (true); |
| 526 | 527 | |
| 527 | − if (EncodeFrameInternal (kpSrcPic, pBsInfo) != videoFrameTypeInvalid) { | |
| 528 | − iReturn = 0; | |
| 529 | − } | |
| 530 | − | |
| 531 | − | |
| 528 | + iReturn = EncodeFrameInternal (kpSrcPic, pBsInfo); | |
| 532 | 529 | // to avoid pause frame bitstream and |
| 533 | 530 | // normal bitstream use different video channel. |
| 534 | 531 | ForceIntraFrame (true); |
| @@ -560,12 +557,14 @@ void CWelsH264SVCEncoder::CheckProfileSetting (int32_t iLayer, EProfileIdc uiPro · 25 unmodified lines | ||
| 560 | 557 | pLayerInfo->uiProfileIdc = uiProfileIdc; |
| 561 | 558 | if ((iLayer == SPATIAL_LAYER_0) && (uiProfileIdc != PRO_BASELINE)) { |
| 562 | 559 | pLayerInfo->uiProfileIdc = PRO_BASELINE; |
| 563 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", uiProfileIdc); | |
| 560 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", | |
| 561 | + uiProfileIdc); | |
| 564 | 562 | } |
| 565 | 563 | if (iLayer > SPATIAL_LAYER_0) { |
| 566 | 564 | if ((uiProfileIdc != PRO_BASELINE) || (uiProfileIdc != PRO_SCALABLE_BASELINE)) { |
| 567 | 565 | pLayerInfo->uiProfileIdc = PRO_BASELINE; |
| 568 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", uiProfileIdc); | |
| 566 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", | |
| 567 | + uiProfileIdc); | |
| 569 | 568 | } |
| 570 | 569 | } |
| 571 | 570 | } |
| @@ -600,7 +599,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 28 unmodified lines | ||
| 600 | 599 | |
| 601 | 600 | switch (eOptionId) { |
| 602 | 601 | case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag |
| 603 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.\n"); | |
| 602 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 603 | + "ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.\n"); | |
| 604 | 604 | } |
| 605 | 605 | break; |
| 606 | 606 | case ENCODER_OPTION_DATAFORMAT: { // Input color space |
| @@ -650,7 +650,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 43 unmodified lines | ||
| 650 | 650 | int32_t iTargetHeight = 0; |
| 651 | 651 | |
| 652 | 652 | memcpy (&sEncodingParam, pOption, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage |
| 653 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, sEncodingParam.iInputCsp= 0x%x\n", | |
| 653 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 654 | + "ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, sEncodingParam.iInputCsp= 0x%x\n", | |
| 654 | 655 | sEncodingParam.iInputCsp); |
| 655 | 656 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 656 | 657 | "coding_param->iPicWidth= %d;coding_param->iPicHeight= %d;coding_param->iTargetBitrate= %d; coding_param->iMaxBitrate= %d; coding_param->iRCMode= %d;coding_param->iPaddingFlag= %d;coding_param->iTemporalLayerNum= %d;coding_param->iSpatialLayerNum= %d;coding_param->fFrameRate= %.6ff;coding_param->iInputCsp= %d;coding_param->uiIntraPeriod= %d;coding_param->bEnableSpsPpsIdAddition = %d;coding_param->bPrefixNalAddingCtrl = %d;coding_param->bEnableDenoise= %d;coding_param->bEnableBackgroundDetection= %d;coding_param->bEnableAdaptiveQuant= %d;coding_param->bEnableAdaptiveQuant= %d;coding_param->bEnableLongTermReference= %d;coding_param->iLtrMarkPeriod= %d;\n", |
| @@ -754,7 +755,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 97 unmodified lines | ||
| 754 | 755 | m_uiCountFrameNum, m_iCspInternal, iValue); |
| 755 | 756 | #endif//REC_FRAME_COUNT |
| 756 | 757 | if (iBitrate <= 0) { |
| 757 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iBitrate = %d\n", | |
| 758 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, | |
| 759 | + "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iBitrate = %d\n", | |
| 758 | 760 | iBitrate); |
| 759 | 761 | return cmInitParaError; |
| 760 | 762 | } |
| @@ -776,7 +778,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 15 unmodified lines | ||
| 776 | 778 | m_pEncContext->pSvcParam->sSpatialLayers[3].iSpatialBitrate = iBitrate; |
| 777 | 779 | break; |
| 778 | 780 | default: |
| 779 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iLayer = %d\n", | |
| 781 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, | |
| 782 | + "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iLayer = %d\n", | |
| 780 | 783 | pInfo->iLayer); |
| 781 | 784 | return cmInitParaError; |
| 782 | 785 | break; |
| @@ -795,7 +798,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 12 unmodified lines | ||
| 795 | 798 | m_uiCountFrameNum, m_iCspInternal, iValue); |
| 796 | 799 | #endif//REC_FRAME_COUNT |
| 797 | 800 | if (iBitrate <= 0) { |
| 798 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iBitrate = %d\n", | |
| 801 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, | |
| 802 | + "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iBitrate = %d\n", | |
| 799 | 803 | iBitrate); |
| 800 | 804 | return cmInitParaError; |
| 801 | 805 | } |
| @@ -817,7 +821,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 15 unmodified lines | ||
| 817 | 821 | m_pEncContext->pSvcParam->sSpatialLayers[3].iMaxSpatialBitrate = iBitrate; |
| 818 | 822 | break; |
| 819 | 823 | default: |
| 820 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iLayer = %d\n", | |
| 824 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, | |
| 825 | + "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iLayer = %d\n", | |
| 821 | 826 | pInfo->iLayer); |
| 822 | 827 | return cmInitParaError; |
| 823 | 828 | break; |
| @@ -965,7 +970,8 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 141 unmodified lines | ||
| 965 | 970 | |
| 966 | 971 | switch (eOptionId) { |
| 967 | 972 | case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag |
| 968 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.\n"); | |
| 973 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 974 | + "ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.\n"); | |
| 969 | 975 | } |
| 970 | 976 | break; |
| 971 | 977 | case ENCODER_OPTION_DATAFORMAT: { // Input color space |