change void* to explicit type definition
Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 17 files). Show all
Unified · Split
| @@ -440,7 +440,7 @@ int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSIn · 439 unmodified lines | ||
| 440 | 440 | |
| 441 | 441 | #ifdef REC_FRAME_COUNT |
| 442 | 442 | ++ m_uiCountFrameNum; |
| 443 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 443 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 444 | 444 | "CWelsH264SVCEncoder::EncodeFrame(), m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", m_uiCountFrameNum, m_iCspInternal); |
| 445 | 445 | #endif//REC_FRAME_COUNT |
| 446 | 446 | |
| @@ -458,7 +458,7 @@ int CWelsH264SVCEncoder::EncodeFrameInternal (const SSourcePicture* pSrcPic, SF · 11 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_pEncContext, 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", kiEncoderReturn); | |
| 462 | 462 | return cmUnkonwReason; |
| 463 | 463 | } |
| 464 | 464 | ///////////////////for test |
| @@ -546,7 +546,7 @@ int CWelsH264SVCEncoder::ForceIntraFrame (bool bIDR) { · 81 unmodified lines | ||
| 546 | 546 | } |
| 547 | 547 | |
| 548 | 548 | #ifdef REC_FRAME_COUNT |
| 549 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 549 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 550 | 550 | "CWelsH264SVCEncoder::ForceIntraFrame(), bIDR= %d, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", bIDR, |
| 551 | 551 | m_uiCountFrameNum, m_iCspInternal); |
| 552 | 552 | #endif//REC_FRAME_COUNT |
| @@ -560,12 +560,12 @@ void CWelsH264SVCEncoder::CheckProfileSetting (int32_t iLayer, EProfileIdc uiPro · 7 unmodified lines | ||
| 560 | 560 | pLayerInfo->uiProfileIdc = uiProfileIdc; |
| 561 | 561 | if ((iLayer == SPATIAL_LAYER_0) && (uiProfileIdc != PRO_BASELINE)) { |
| 562 | 562 | pLayerInfo->uiProfileIdc = PRO_BASELINE; |
| 563 | − WelsLog (m_pEncContext, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", uiProfileIdc); | |
| 563 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", uiProfileIdc); | |
| 564 | 564 | } |
| 565 | 565 | if (iLayer > SPATIAL_LAYER_0) { |
| 566 | 566 | if ((uiProfileIdc != PRO_BASELINE) || (uiProfileIdc != PRO_SCALABLE_BASELINE)) { |
| 567 | 567 | pLayerInfo->uiProfileIdc = PRO_BASELINE; |
| 568 | − WelsLog (m_pEncContext, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", uiProfileIdc); | |
| 568 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile\n", uiProfileIdc); | |
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | } |
| @@ -574,14 +574,14 @@ void CWelsH264SVCEncoder::CheckLevelSetting (int32_t iLayer, ELevelIdc uiLevelId · 2 unmodified lines | ||
| 574 | 574 | pLayerInfo->uiLevelIdc = uiLevelIdc; |
| 575 | 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_pWelsTrace->m_sLogCtx, 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 | 582 | if ((iNumRef < MIN_REF_PIC_COUNT) || (iNumRef > MAX_REFERENCE_PICTURE_COUNT_NUM)) { |
| 583 | 583 | m_pEncContext->pSvcParam->iNumRefFrame = AUTO_REF_PIC_COUNT; |
| 584 | − WelsLog (m_pEncContext, WELS_LOG_WARNING, | |
| 584 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, | |
| 585 | 585 | "doesn't support the number of reference frame(%d) change to auto select mode\n", iNumRef); |
| 586 | 586 | } |
| 587 | 587 | } |
| @@ -600,7 +600,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 12 unmodified lines | ||
| 600 | 600 | |
| 601 | 601 | switch (eOptionId) { |
| 602 | 602 | case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag |
| 603 | − WelsLog (m_pEncContext, WELS_LOG_INFO, "ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.\n"); | |
| 603 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "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 |
| @@ -611,14 +611,14 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 4 unmodified lines | ||
| 611 | 611 | } |
| 612 | 612 | |
| 613 | 613 | #ifdef REC_FRAME_COUNT |
| 614 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 614 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 615 | 615 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_DATAFORMAT, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x, iValue= %d\n", |
| 616 | 616 | m_uiCountFrameNum, m_iCspInternal, iValue); |
| 617 | 617 | #endif//REC_FRAME_COUNT |
| 618 | 618 | |
| 619 | 619 | m_iCspInternal = iColorspace; |
| 620 | 620 | #ifdef REC_FRAME_COUNT |
| 621 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 621 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 622 | 622 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_DATAFORMAT, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 623 | 623 | m_uiCountFrameNum, m_iCspInternal); |
| 624 | 624 | #endif//REC_FRAME_COUNT |
| @@ -627,7 +627,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 2 unmodified lines | ||
| 627 | 627 | case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval |
| 628 | 628 | int32_t iValue = * ((int32_t*)pOption); |
| 629 | 629 | #ifdef REC_FRAME_COUNT |
| 630 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 630 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 631 | 631 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_IDR_INTERVAL, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x, iValue= %d\n", |
| 632 | 632 | m_uiCountFrameNum, m_iCspInternal, iValue); |
| 633 | 633 | #endif//REC_FRAME_COUNT |
| @@ -650,9 +650,9 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 16 unmodified lines | ||
| 650 | 650 | int32_t iTargetHeight = 0; |
| 651 | 651 | |
| 652 | 652 | memcpy (&sEncodingParam, pOption, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage |
| 653 | − WelsLog (m_pEncContext, WELS_LOG_INFO, "ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, sEncodingParam.iInputCsp= 0x%x\n", | |
| 653 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, sEncodingParam.iInputCsp= 0x%x\n", | |
| 654 | 654 | sEncodingParam.iInputCsp); |
| 655 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 655 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 656 | 656 | "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", |
| 657 | 657 | sEncodingParam.iPicWidth, |
| 658 | 658 | sEncodingParam.iPicHeight, |
| @@ -676,7 +676,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 17 unmodified lines | ||
| 676 | 676 | int32_t i = 0; |
| 677 | 677 | while (i < sEncodingParam.iSpatialLayerNum) { |
| 678 | 678 | SSpatialLayerConfig* pSpatialCfg = &sEncodingParam.sSpatialLayers[i]; |
| 679 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 679 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 680 | 680 | "coding_param->sSpatialLayers[%d]: .iVideoWidth= %d; .iVideoHeight= %d; .fFrameRate= %.6ff; .iSpatialBitrate= %d; .iMaxSpatialBitrate= %d; .sSliceCfg.uiSliceMode= %d; .sSliceCfg.sSliceArgument.iSliceNum= %d; .sSliceCfg.sSliceArgument.uiSliceSizeConstraint= %d;\n", |
| 681 | 681 | i, pSpatialCfg->iVideoWidth, |
| 682 | 682 | pSpatialCfg->iVideoHeight, |
| @@ -717,7 +717,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 34 unmodified lines | ||
| 717 | 717 | m_iCspInternal = iInputColorspace; |
| 718 | 718 | } |
| 719 | 719 | #ifdef REC_FRAME_COUNT |
| 720 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 720 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 721 | 721 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 722 | 722 | m_uiCountFrameNum, m_iCspInternal); |
| 723 | 723 | #endif//REC_FRAME_COUNT |
| @@ -733,7 +733,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 9 unmodified lines | ||
| 733 | 733 | case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate |
| 734 | 734 | float iValue = * ((float*)pOption); |
| 735 | 735 | #ifdef REC_FRAME_COUNT |
| 736 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 736 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 737 | 737 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_FRAME_RATE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x, iValue= %f\n", |
| 738 | 738 | m_uiCountFrameNum, m_iCspInternal, iValue); |
| 739 | 739 | #endif//REC_FRAME_COUNT |
| @@ -749,12 +749,12 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 9 unmodified lines | ||
| 749 | 749 | SBitrateInfo* pInfo = (static_cast<SBitrateInfo*> (pOption)); |
| 750 | 750 | int32_t iBitrate = pInfo->iBitrate; |
| 751 | 751 | #ifdef REC_FRAME_COUNT |
| 752 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 752 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 753 | 753 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x, iValue= %d\n", |
| 754 | 754 | m_uiCountFrameNum, m_iCspInternal, iValue); |
| 755 | 755 | #endif//REC_FRAME_COUNT |
| 756 | 756 | if (iBitrate <= 0) { |
| 757 | − WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iBitrate = %d\n", | |
| 757 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iBitrate = %d\n", | |
| 758 | 758 | iBitrate); |
| 759 | 759 | return cmInitParaError; |
| 760 | 760 | } |
| @@ -776,7 +776,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 15 unmodified lines | ||
| 776 | 776 | m_pEncContext->pSvcParam->sSpatialLayers[3].iSpatialBitrate = iBitrate; |
| 777 | 777 | break; |
| 778 | 778 | default: |
| 779 | − WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iLayer = %d\n", | |
| 779 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE,iLayer = %d\n", | |
| 780 | 780 | pInfo->iLayer); |
| 781 | 781 | return cmInitParaError; |
| 782 | 782 | break; |
| @@ -790,12 +790,12 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 7 unmodified lines | ||
| 790 | 790 | int32_t iBitrate = pInfo->iBitrate; |
| 791 | 791 | |
| 792 | 792 | #ifdef REC_FRAME_COUNT |
| 793 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 793 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 794 | 794 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x, iValue= %d\n", |
| 795 | 795 | m_uiCountFrameNum, m_iCspInternal, iValue); |
| 796 | 796 | #endif//REC_FRAME_COUNT |
| 797 | 797 | if (iBitrate <= 0) { |
| 798 | − WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iBitrate = %d\n", | |
| 798 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iBitrate = %d\n", | |
| 799 | 799 | iBitrate); |
| 800 | 800 | return cmInitParaError; |
| 801 | 801 | } |
| @@ -817,7 +817,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 15 unmodified lines | ||
| 817 | 817 | m_pEncContext->pSvcParam->sSpatialLayers[3].iMaxSpatialBitrate = iBitrate; |
| 818 | 818 | break; |
| 819 | 819 | default: |
| 820 | − WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iLayer = %d\n", | |
| 820 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE,iLayer = %d\n", | |
| 821 | 821 | pInfo->iLayer); |
| 822 | 822 | return cmInitParaError; |
| 823 | 823 | break; |
| @@ -854,21 +854,21 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 30 unmodified lines | ||
| 854 | 854 | case ENCODER_OPTION_LTR: { |
| 855 | 855 | uint32_t iValue = * ((uint32_t*) (pOption)); |
| 856 | 856 | m_pEncContext->pSvcParam->bEnableLongTermReference = iValue ? true : false; |
| 857 | − WelsLog (m_pEncContext, WELS_LOG_WARNING, " CWelsH264SVCEncoder::SetOption enable LTR = %d", | |
| 857 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, " CWelsH264SVCEncoder::SetOption enable LTR = %d", | |
| 858 | 858 | m_pEncContext->pSvcParam->bEnableLongTermReference); |
| 859 | 859 | } |
| 860 | 860 | break; |
| 861 | 861 | case ENCODER_OPTION_ENABLE_SSEI: { |
| 862 | 862 | bool iValue = * ((bool*)pOption); |
| 863 | 863 | m_pEncContext->pSvcParam->bEnableSSEI = iValue; |
| 864 | − WelsLog (m_pEncContext, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption enable SSEI = %d \n", | |
| 864 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption enable SSEI = %d \n", | |
| 865 | 865 | m_pEncContext->pSvcParam->bEnableSSEI); |
| 866 | 866 | } |
| 867 | 867 | break; |
| 868 | 868 | case ENCODER_OPTION_ENABLE_PREFIX_NAL_ADDING: { |
| 869 | 869 | bool iValue = * ((bool*)pOption); |
| 870 | 870 | m_pEncContext->pSvcParam->bPrefixNalAddingCtrl = iValue; |
| 871 | − WelsLog (m_pEncContext, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption bPrefixNalAddingCtrl = %d \n", | |
| 871 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption bPrefixNalAddingCtrl = %d \n", | |
| 872 | 872 | m_pEncContext->pSvcParam->bPrefixNalAddingCtrl); |
| 873 | 873 | } |
| 874 | 874 | break; |
| @@ -876,7 +876,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 1 unmodified line | ||
| 876 | 876 | bool iValue = * ((bool*)pOption); |
| 877 | 877 | |
| 878 | 878 | m_pEncContext->pSvcParam->bEnableSpsPpsIdAddition = iValue; |
| 879 | − WelsLog (m_pEncContext, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption enable SPS/PPS ID = %d \n", | |
| 879 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption enable SPS/PPS ID = %d \n", | |
| 880 | 880 | m_pEncContext->pSvcParam->bEnableSpsPpsIdAddition); |
| 881 | 881 | } |
| 882 | 882 | break; |
| @@ -921,7 +921,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 38 unmodified lines | ||
| 921 | 921 | case ENCODER_OPTION_PROFILE: { |
| 922 | 922 | SProfileInfo* pProfileInfo = (static_cast<SProfileInfo*> (pOption)); |
| 923 | 923 | if ((pProfileInfo->iLayer < SPATIAL_LAYER_0) || (pProfileInfo->iLayer > SPATIAL_LAYER_3)) { |
| 924 | − WelsLog (m_pEncContext, WELS_LOG_ERROR, | |
| 924 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, | |
| 925 | 925 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_PROFILE,iLayer = %d(rang0-3)\n", pProfileInfo->iLayer); |
| 926 | 926 | return cmInitParaError; |
| 927 | 927 | } |
| @@ -931,7 +931,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 3 unmodified lines | ||
| 931 | 931 | case ENCODER_OPTION_LEVEL: { |
| 932 | 932 | SLevelInfo* pLevelInfo = (static_cast<SLevelInfo*> (pOption)); |
| 933 | 933 | if ((pLevelInfo->iLayer < SPATIAL_LAYER_0) || (pLevelInfo->iLayer > SPATIAL_LAYER_3)) { |
| 934 | − WelsLog (m_pEncContext, WELS_LOG_ERROR, | |
| 934 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, | |
| 935 | 935 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_PROFILE,iLayer = %d(rang0-3)\n", pLevelInfo->iLayer); |
| 936 | 936 | return cmInitParaError; |
| 937 | 937 | } |
| @@ -965,12 +965,12 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 27 unmodified lines | ||
| 965 | 965 | |
| 966 | 966 | switch (eOptionId) { |
| 967 | 967 | case ENCODER_OPTION_INTER_SPATIAL_PRED: { // Inter spatial layer prediction flag |
| 968 | − WelsLog (m_pEncContext, WELS_LOG_INFO, "ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.\n"); | |
| 968 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ENCODER_OPTION_INTER_SPATIAL_PRED, this feature not supported at present.\n"); | |
| 969 | 969 | } |
| 970 | 970 | break; |
| 971 | 971 | case ENCODER_OPTION_DATAFORMAT: { // Input color space |
| 972 | 972 | #ifdef REC_FRAME_COUNT |
| 973 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 973 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 974 | 974 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_DATAFORMAT, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 975 | 975 | m_uiCountFrameNum, m_iCspInternal); |
| 976 | 976 | #endif//REC_FRAME_COUNT |
| @@ -980,7 +980,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 3 unmodified lines | ||
| 980 | 980 | break; |
| 981 | 981 | case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval |
| 982 | 982 | #ifdef REC_FRAME_COUNT |
| 983 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 983 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 984 | 984 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_IDR_INTERVAL, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 985 | 985 | m_uiCountFrameNum, m_iCspInternal); |
| 986 | 986 | #endif//REC_FRAME_COUNT |
| @@ -989,7 +989,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 2 unmodified lines | ||
| 989 | 989 | break; |
| 990 | 990 | case ENCODER_OPTION_SVC_ENCODE_PARAM_EXT: { // SVC Encoding Parameter |
| 991 | 991 | #ifdef REC_FRAME_COUNT |
| 992 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 992 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 993 | 993 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 994 | 994 | m_uiCountFrameNum, m_iCspInternal); |
| 995 | 995 | #endif//REC_FRAME_COUNT |
| @@ -998,7 +998,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 2 unmodified lines | ||
| 998 | 998 | break; |
| 999 | 999 | case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter |
| 1000 | 1000 | #ifdef REC_FRAME_COUNT |
| 1001 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 1001 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 1002 | 1002 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_BASE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 1003 | 1003 | m_uiCountFrameNum, m_iCspInternal); |
| 1004 | 1004 | #endif//REC_FRAME_COUNT |
| @@ -1008,7 +1008,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 3 unmodified lines | ||
| 1008 | 1008 | |
| 1009 | 1009 | case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate |
| 1010 | 1010 | #ifdef REC_FRAME_COUNT |
| 1011 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 1011 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 1012 | 1012 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_FRAME_RATE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 1013 | 1013 | m_uiCountFrameNum, m_iCspInternal); |
| 1014 | 1014 | #endif//REC_FRAME_COUNT |
| @@ -1017,7 +1017,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 2 unmodified lines | ||
| 1017 | 1017 | break; |
| 1018 | 1018 | case ENCODER_OPTION_BITRATE: { // Target bit-rate |
| 1019 | 1019 | #ifdef REC_FRAME_COUNT |
| 1020 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 1020 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 1021 | 1021 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_BITRATE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 1022 | 1022 | m_uiCountFrameNum, m_iCspInternal); |
| 1023 | 1023 | #endif//REC_FRAME_COUNT |
| @@ -1034,7 +1034,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 10 unmodified lines | ||
| 1034 | 1034 | break; |
| 1035 | 1035 | case ENCODER_OPTION_MAX_BITRATE: { // Target bit-rate |
| 1036 | 1036 | #ifdef REC_FRAME_COUNT |
| 1037 | − WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 1037 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | |
| 1038 | 1038 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_MAX_BITRATE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 1039 | 1039 | m_uiCountFrameNum, m_iCspInternal); |
| 1040 | 1040 | #endif//REC_FRAME_COUNT |
| @@ -1077,7 +1077,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) { · 36 unmodified lines | ||
| 1077 | 1077 | case videoFormatYV12: |
| 1078 | 1078 | WelsStrcat (strFileName, 256, "yuv"); // confirmed_safe_unsafe_usage |
| 1079 | 1079 | pFile = WelsFopen (strFileName, "ab+"); |
| 1080 | − // WelsLog( m_pEncContext, WELS_LOG_INFO, "WELS_CSP_I420, m_iCspInternal= 0x%x\n", m_iCspInternal); | |
| 1080 | + // WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_I420, m_iCspInternal= 0x%x\n", m_iCspInternal); | |
| 1081 | 1081 | if (NULL != pFile) { |
| 1082 | 1082 | fwrite (pSrc, sizeof (uint8_t), (iDataLength * 3) >> 1, pFile); |
| 1083 | 1083 | fflush (pFile); |
| @@ -1095,7 +1095,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) { · 11 unmodified lines | ||
| 1095 | 1095 | case videoFormatBGR: |
| 1096 | 1096 | WelsStrcat (strFileName, 256, "bgr"); // confirmed_safe_unsafe_usage |
| 1097 | 1097 | pFile = WelsFopen (strFileName, "ab+"); |
| 1098 | − // WelsLog( m_pEncContext, WELS_LOG_INFO, "WELS_CSP_BGR, m_iCspInternal= 0x%x\n", m_iCspInternal); | |
| 1098 | + // WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_BGR, m_iCspInternal= 0x%x\n", m_iCspInternal); | |
| 1099 | 1099 | if (NULL != pFile) { |
| 1100 | 1100 | fwrite (pSrc, sizeof (uint8_t), iDataLength * 3, pFile); |
| 1101 | 1101 | fflush (pFile); |
| @@ -1112,7 +1112,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) { · 10 unmodified lines | ||
| 1112 | 1112 | } |
| 1113 | 1113 | break; |
| 1114 | 1114 | default: |
| 1115 | − WelsLog (m_pEncContext, WELS_LOG_INFO, "Exclusive case, m_iCspInternal= 0x%x\n", m_iCspInternal); | |
| 1115 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "Exclusive case, m_iCspInternal= 0x%x\n", m_iCspInternal); | |
| 1116 | 1116 | break; |
| 1117 | 1117 | } |
| 1118 | 1118 | #endif//DUMP_SRC_PICTURE |