Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 54 files). Show all
Unified · Split
| @@ -163,7 +163,7 @@ CWelsH264SVCEncoder::~CWelsH264SVCEncoder() { · 162 unmodified lines | ||
| 163 | 163 | |
| 164 | 164 | void CWelsH264SVCEncoder::InitEncoder (void) { |
| 165 | 165 | |
| 166 | − m_pWelsTrace = new welsCodecTrace(); | |
| 166 | + m_pWelsTrace = new welsCodecTrace(); | |
| 167 | 167 | if (m_pWelsTrace == NULL) { |
| 168 | 168 | return; |
| 169 | 169 | } |
| @@ -257,7 +257,7 @@ int CWelsH264SVCEncoder::InitializeInternal (SWelsSvcCodingParam* pCfg) { · 87 unmodified lines | ||
| 257 | 257 | return cmInitParaError; |
| 258 | 258 | } |
| 259 | 259 | if (pCfg->iTemporalLayerNum < 1) |
| 260 | − pCfg->iTemporalLayerNum = 1; | |
| 260 | + pCfg->iTemporalLayerNum = 1; | |
| 261 | 261 | if (pCfg->iTemporalLayerNum > MAX_TEMPORAL_LEVEL) { |
| 262 | 262 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, |
| 263 | 263 | "CWelsH264SVCEncoder::Initialize(), invalid iTemporalLayerNum= %d, valid at range of [1, %d].", |
| @@ -312,9 +312,9 @@ int CWelsH264SVCEncoder::InitializeInternal (SWelsSvcCodingParam* pCfg) { · 48 unmodified lines | ||
| 312 | 312 | } else { |
| 313 | 313 | pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? LONG_TERM_REF_NUM : 0; |
| 314 | 314 | if (pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) { |
| 315 | − pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) : | |
| 315 | + pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) : | |
| 316 | 316 | (MIN_REF_PIC_COUNT + pCfg->iLTRRefNum); |
| 317 | − pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA); | |
| 317 | + pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA); | |
| 318 | 318 | } |
| 319 | 319 | } |
| 320 | 320 | |
| @@ -360,7 +360,7 @@ int32_t CWelsH264SVCEncoder::Uninitialize() { · 39 unmodified lines | ||
| 360 | 360 | |
| 361 | 361 | if (NULL != m_pEncContext) { |
| 362 | 362 | WelsUninitEncoderExt (&m_pEncContext); |
| 363 | − m_pEncContext = NULL; | |
| 363 | + m_pEncContext = NULL; | |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | m_bInitialFlag = false; |
| @@ -671,8 +671,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 304 unmodified lines | ||
| 671 | 671 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_DATAFORMAT, m_iCspInternal= 0x%x", m_iCspInternal); |
| 672 | 672 | } |
| 673 | 673 | break; |
| 674 | − case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval | |
| 675 | − int32_t iValue = * ((int32_t*)pOption); | |
| 674 | + case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval | |
| 675 | + int32_t iValue = * ((int32_t*)pOption); | |
| 676 | 676 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 677 | 677 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_IDR_INTERVAL iValue= %d", iValue); |
| 678 | 678 | if (iValue < -1 || iValue == 0) |
| @@ -680,7 +680,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 1 unmodified line | ||
| 680 | 680 | if (iValue == (int32_t)m_pEncContext->pSvcParam->uiIntraPeriod) { |
| 681 | 681 | return cmResultSuccess; |
| 682 | 682 | } |
| 683 | − m_pEncContext->pSvcParam->uiIntraPeriod = (uint32_t)iValue; | |
| 683 | + m_pEncContext->pSvcParam->uiIntraPeriod = (uint32_t)iValue; | |
| 684 | 684 | } |
| 685 | 685 | break; |
| 686 | 686 | case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter |
| @@ -769,8 +769,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 82 unmodified lines | ||
| 769 | 769 | } |
| 770 | 770 | } |
| 771 | 771 | break; |
| 772 | − case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate | |
| 773 | − float iValue = * ((float*)pOption); | |
| 772 | + case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate | |
| 773 | + float iValue = * ((float*)pOption); | |
| 774 | 774 | if (iValue <= 0) { |
| 775 | 775 | return cmInitParaError; |
| 776 | 776 | } |
| @@ -791,7 +791,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 14 unmodified lines | ||
| 791 | 791 | iBitrate); |
| 792 | 792 | return cmInitParaError; |
| 793 | 793 | } |
| 794 | − iBitrate = WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE); | |
| 794 | + iBitrate = WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE); | |
| 795 | 795 | switch (pInfo->iLayer) { |
| 796 | 796 | case SPATIAL_LAYER_ALL: |
| 797 | 797 | m_pEncContext->pSvcParam->iTargetBitrate = iBitrate; |
| @@ -837,7 +837,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 39 unmodified lines | ||
| 837 | 837 | iBitrate); |
| 838 | 838 | return cmInitParaError; |
| 839 | 839 | } |
| 840 | − iBitrate = WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE); | |
| 840 | + iBitrate = WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE); | |
| 841 | 841 | switch (pInfo->iLayer) { |
| 842 | 842 | case SPATIAL_LAYER_ALL: |
| 843 | 843 | m_pEncContext->pSvcParam->iMaxBitrate = iBitrate; |
| @@ -875,7 +875,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 31 unmodified lines | ||
| 875 | 875 | break; |
| 876 | 876 | case ENCODER_OPTION_RC_MODE: { // 0:quality mode;1:bit-rate mode;2:bitrate limited mode |
| 877 | 877 | int32_t iValue = * ((int32_t*)pOption); |
| 878 | − m_pEncContext->pSvcParam->iRCMode = (RC_MODES) iValue; | |
| 878 | + m_pEncContext->pSvcParam->iRCMode = (RC_MODES) iValue; | |
| 879 | 879 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 880 | 880 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_RC_MODE iRCMode= %d ", |
| 881 | 881 | iValue); |
| @@ -883,7 +883,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 1 unmodified line | ||
| 883 | 883 | break; |
| 884 | 884 | case ENCODER_PADDING_PADDING: { // 0:disable padding;1:padding |
| 885 | 885 | int32_t iValue = * ((int32_t*)pOption); |
| 886 | − m_pEncContext->pSvcParam->iPaddingFlag = iValue; | |
| 886 | + m_pEncContext->pSvcParam->iPaddingFlag = iValue; | |
| 887 | 887 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 888 | 888 | "CWelsH264SVCEncoder::SetOption():ENCODER_PADDING_PADDING iPaddingFlag= %d ", |
| 889 | 889 | iValue); |
| @@ -1114,7 +1114,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 224 unmodified lines | ||
| 1114 | 1114 | case ENCODER_OPTION_DATAFORMAT: { // Input color space |
| 1115 | 1115 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 1116 | 1116 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_DATAFORMAT, m_iCspInternal= 0x%x", m_iCspInternal); |
| 1117 | − * ((int32_t*)pOption) = m_iCspInternal; | |
| 1117 | + * ((int32_t*)pOption) = m_iCspInternal; | |
| 1118 | 1118 | } |
| 1119 | 1119 | break; |
| 1120 | 1120 | case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval |
| @@ -1141,7 +1141,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 20 unmodified lines | ||
| 1141 | 1141 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 1142 | 1142 | "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_FRAME_RATE, fMaxFrameRate = %.6ff", |
| 1143 | 1143 | m_pEncContext->pSvcParam->fMaxFrameRate); |
| 1144 | − * ((float*)pOption) = m_pEncContext->pSvcParam->fMaxFrameRate; | |
| 1144 | + * ((float*)pOption) = m_pEncContext->pSvcParam->fMaxFrameRate; | |
| 1145 | 1145 | } |
| 1146 | 1146 | break; |
| 1147 | 1147 | case ENCODER_OPTION_BITRATE: { // Target bit-rate |
| @@ -1196,7 +1196,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 48 unmodified lines | ||
| 1196 | 1196 | } |
| 1197 | 1197 | break; |
| 1198 | 1198 | case ENCODER_OPTION_STATISTICS_LOG_INTERVAL: { |
| 1199 | − * ((int32_t*)pOption) = m_pEncContext->iStatisticsLogInterval; | |
| 1199 | + * ((int32_t*)pOption) = m_pEncContext->iStatisticsLogInterval; | |
| 1200 | 1200 | } |
| 1201 | 1201 | break; |
| 1202 | 1202 | case ENCODER_OPTION_COMPLEXITY: { |