Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 20 files). Show all
Unified · Split
| @@ -206,29 +206,49 @@ void CWelsH264SVCEncoder::InitEncoder (void) { · 205 unmodified lines | ||
| 206 | 206 | /* |
| 207 | 207 | * SVC Encoder Initialization |
| 208 | 208 | */ |
| 209 | −int CWelsH264SVCEncoder::Initialize (SVCEncodingParam* argv, const INIT_TYPE iInitType) { | |
| 210 | − if (INIT_TYPE_PARAMETER_BASED != iInitType || NULL == argv) { | |
| 209 | +int CWelsH264SVCEncoder::Initialize (SEncParamBase* argv, const INIT_TYPE iInitType) { | |
| 210 | + | |
| 211 | + | |
| 212 | + if ((INIT_TYPE_PARAMETER_BASED != iInitType && INIT_TYPE_PARAMETER_EXT != iInitType)|| NULL == argv) { | |
| 211 | 213 | WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), invalid iInitType= %d, argv= 0x%p\n", |
| 212 | 214 | iInitType, (void*)argv); |
| 213 | 215 | return cmInitParaError; |
| 214 | 216 | } |
| 215 | − | |
| 216 | − if (m_bInitialFlag) { | |
| 217 | + if (m_bInitialFlag) { | |
| 217 | 218 | WelsLog (m_pEncContext, WELS_LOG_WARNING, "CWelsH264SVCEncoder::Initialize(), reinitialize, m_bInitialFlag= %d\n", |
| 218 | 219 | m_bInitialFlag); |
| 219 | 220 | Uninitialize(); |
| 220 | 221 | } |
| 221 | 222 | |
| 222 | − SVCEncodingParam sEncodingParam; | |
| 223 | 223 | SWelsSvcCodingParam sConfig (true); |
| 224 | − | |
| 225 | − memcpy (&sEncodingParam, argv, sizeof (SVCEncodingParam)); // confirmed_safe_unsafe_usage | |
| 226 | − | |
| 224 | + if(iInitType == INIT_TYPE_PARAMETER_BASED) | |
| 225 | + { | |
| 226 | + SEncParamBase sEncodingParam; | |
| 227 | + memcpy (&sEncodingParam, argv, sizeof (SEncParamBase)); // confirmed_safe_unsafe_usage | |
| 228 | + | |
| 229 | + // Convert SEncParamBase into WelsSVCParamConfig here.. | |
| 230 | + if (sConfig.ParamBaseTranscode (sEncodingParam, true)) { | |
| 231 | + WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), parameter_translation failed.\n"); | |
| 232 | + Uninitialize(); | |
| 233 | + return cmInitParaError; | |
| 234 | + } | |
| 235 | + } | |
| 236 | + else if(iInitType == INIT_TYPE_PARAMETER_EXT) | |
| 237 | + { | |
| 238 | + SEncParamExt sEncodingParam; | |
| 239 | + memcpy (&sEncodingParam, argv, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage | |
| 240 | + // Convert SEncParamBase into WelsSVCParamConfig here.. | |
| 241 | + if (sConfig.ParamTranscode (sEncodingParam, true)) { | |
| 242 | + WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), parameter_translation failed.\n"); | |
| 243 | + Uninitialize(); | |
| 244 | + return cmInitParaError; | |
| 245 | + } | |
| 246 | + } | |
| 227 | 247 | #ifdef REC_FRAME_COUNT |
| 228 | 248 | WelsLog (m_pEncContext, WELS_LOG_INFO, "CWelsH264SVCEncoder::Initialize, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", |
| 229 | 249 | m_uiCountFrameNum, m_iCspInternal); |
| 230 | 250 | WelsLog (m_pEncContext, WELS_LOG_INFO, |
| 231 | − "coding_param->iPicWidth= %d;coding_param->iPicHeight= %d;coding_param->iTargetBitrate= %d;coding_param->iRCMode= %d;coding_param->iTemporalLayerNum= %d;coding_param->iSpatialLayerNum= %d;coding_param->fFrameRate= %.6ff;coding_param->iInputCsp= %d;coding_param->iKeyPicCodingMode= %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->bEnableFrameSkip= %d;coding_param->bEnableCropPic= %d;coding_param->bEnableLongTermReference= %d;coding_param->iLtrMarkPeriod= %d;\n", | |
| 251 | + "coding_param->iPicWidth= %d;coding_param->iPicHeight= %d;coding_param->iTargetBitrate= %d;coding_param->iRCMode= %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->bEnableFrameSkip= %d;coding_param->bEnableCropPic= %d;coding_param->bEnableLongTermReference= %d;coding_param->iLtrMarkPeriod= %d;\n", | |
| 232 | 252 | sEncodingParam.iPicWidth, |
| 233 | 253 | sEncodingParam.iPicHeight, |
| 234 | 254 | sEncodingParam.iTargetBitrate, |
| @@ -237,7 +257,6 @@ int CWelsH264SVCEncoder::Initialize (SVCEncodingParam* argv, const INIT_TYPE iIn · 2 unmodified lines | ||
| 237 | 257 | sEncodingParam.iSpatialLayerNum, |
| 238 | 258 | sEncodingParam.fFrameRate, |
| 239 | 259 | sEncodingParam.iInputCsp, |
| 240 | − sEncodingParam.iKeyPicCodingMode, | |
| 241 | 260 | sEncodingParam.iIntraPeriod, |
| 242 | 261 | sEncodingParam.bEnableSpsPpsIdAddition, |
| 243 | 262 | sEncodingParam.bPrefixNalAddingCtrl, |
| @@ -267,21 +286,13 @@ int CWelsH264SVCEncoder::Initialize (SVCEncodingParam* argv, const INIT_TYPE iIn · 23 unmodified lines | ||
| 267 | 286 | ++ i; |
| 268 | 287 | } |
| 269 | 288 | #endif//REC_FRAME_COUNT |
| 270 | − | |
| 271 | − // Convert SVCEncodingParam into WelsSVCParamConfig here.. | |
| 272 | − if (sConfig.ParamTranscode (sEncodingParam, true)) { | |
| 273 | − WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), parameter_translation failed.\n"); | |
| 274 | − Uninitialize(); | |
| 275 | − return cmInitParaError; | |
| 276 | − } | |
| 277 | − | |
| 278 | 289 | m_iSrcListSize = 1; |
| 279 | 290 | |
| 280 | − return Initialize2 ((void*)&sConfig, INIT_TYPE_CONFIG_BASED); | |
| 291 | + return Initialize2 ((void*)&sConfig, INIT_TYPE_PARAMETER_BASED); | |
| 281 | 292 | } |
| 282 | 293 | |
| 283 | 294 | int CWelsH264SVCEncoder::Initialize2 (void* argv, const INIT_TYPE iInitType) { |
| 284 | − if (INIT_TYPE_CONFIG_BASED != iInitType || NULL == argv) { | |
| 295 | + if (INIT_TYPE_PARAMETER_BASED != iInitType || NULL == argv) { | |
| 285 | 296 | WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), invalid iInitType= %d, argv= 0x%p.\n", |
| 286 | 297 | iInitType, (void*)argv); |
| 287 | 298 | return cmInitParaError; |
| @@ -303,20 +314,20 @@ int CWelsH264SVCEncoder::Initialize2 (void* argv, const INIT_TYPE iInitType) { · 15 unmodified lines | ||
| 303 | 314 | } |
| 304 | 315 | |
| 305 | 316 | // Check valid parameters |
| 306 | − const int32_t iNumOfLayers = pCfg->iNumDependencyLayer; | |
| 317 | + const int32_t iNumOfLayers = pCfg->iSpatialLayerNum; | |
| 307 | 318 | if (iNumOfLayers < 1 || iNumOfLayers > MAX_DEPENDENCY_LAYER) { |
| 308 | 319 | WelsLog (m_pEncContext, WELS_LOG_ERROR, |
| 309 | − "CWelsH264SVCEncoder::Initialize(), invalid iNumDependencyLayer= %d, valid at range of [1, %d].\n", iNumOfLayers, | |
| 320 | + "CWelsH264SVCEncoder::Initialize(), invalid iSpatialLayerNum= %d, valid at range of [1, %d].\n", iNumOfLayers, | |
| 310 | 321 | MAX_DEPENDENCY_LAYER); |
| 311 | 322 | Uninitialize(); |
| 312 | 323 | return cmInitParaError; |
| 313 | 324 | } |
| 314 | − if (pCfg->iNumTemporalLayer < 1) | |
| 315 | − pCfg->iNumTemporalLayer = 1; | |
| 316 | − if (pCfg->iNumTemporalLayer > MAX_TEMPORAL_LEVEL) { | |
| 325 | + if (pCfg->iTemporalLayerNum < 1) | |
| 326 | + pCfg->iTemporalLayerNum = 1; | |
| 327 | + if (pCfg->iTemporalLayerNum > MAX_TEMPORAL_LEVEL) { | |
| 317 | 328 | WelsLog (m_pEncContext, WELS_LOG_ERROR, |
| 318 | − "CWelsH264SVCEncoder::Initialize(), invalid iNumTemporalLayer= %d, valid at range of [1, %d].\n", | |
| 319 | − pCfg->iNumTemporalLayer, MAX_TEMPORAL_LEVEL); | |
| 329 | + "CWelsH264SVCEncoder::Initialize(), invalid iTemporalLayerNum= %d, valid at range of [1, %d].\n", | |
| 330 | + pCfg->iTemporalLayerNum, MAX_TEMPORAL_LEVEL); | |
| 320 | 331 | Uninitialize(); |
| 321 | 332 | return cmInitParaError; |
| 322 | 333 | } |
| @@ -366,17 +377,17 @@ int CWelsH264SVCEncoder::Initialize2 (void* argv, const INIT_TYPE iInitType) { · 43 unmodified lines | ||
| 366 | 377 | |
| 367 | 378 | pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM); |
| 368 | 379 | |
| 369 | − if (pCfg->uiLtrMarkPeriod == 0) { | |
| 370 | − pCfg->uiLtrMarkPeriod = 30; | |
| 380 | + if (pCfg->iLtrMarkPeriod == 0) { | |
| 381 | + pCfg->iLtrMarkPeriod = 30; | |
| 371 | 382 | } |
| 372 | 383 | |
| 373 | 384 | const int32_t kiDecStages = WELS_LOG2 (pCfg->uiGopSize); |
| 374 | 385 | pCfg->iInputCsp = iColorspace; |
| 375 | − pCfg->iNumTemporalLayer = (int8_t) (1 + kiDecStages); | |
| 386 | + pCfg->iTemporalLayerNum = (int8_t) (1 + kiDecStages); | |
| 376 | 387 | pCfg->iLoopFilterAlphaC0Offset = WELS_CLIP3 (pCfg->iLoopFilterAlphaC0Offset, -6, 6); |
| 377 | 388 | pCfg->iLoopFilterBetaOffset = WELS_CLIP3 (pCfg->iLoopFilterBetaOffset, -6, 6); |
| 378 | 389 | |
| 379 | −// m_pSrcPicList = (SSourcePicture **)WelsMalloc( pCfg->iNumDependencyLayer * sizeof(SSourcePicture *), "m_pSrcPicList" ); | |
| 390 | +// m_pSrcPicList = (SSourcePicture **)WelsMalloc( pCfg->iSpatialLayerNum * sizeof(SSourcePicture *), "m_pSrcPicList" ); | |
| 380 | 391 | // prefer use new/delete pair due encoder intialization stage not start yet for CacheLineSize not detection here (16 or 64 not matched) |
| 381 | 392 | m_pSrcPicList = new SSourcePicture* [iNumOfLayers]; |
| 382 | 393 | |
| @@ -388,8 +399,8 @@ int CWelsH264SVCEncoder::Initialize2 (void* argv, const INIT_TYPE iInitType) { · 5 unmodified lines | ||
| 388 | 399 | } |
| 389 | 400 | |
| 390 | 401 | // decide property list size between INIT_TYPE_PARAMETER_BASED/INIT_TYPE_CONFIG_BASED |
| 391 | − m_iMaxPicWidth = pCfg->iActualPicWidth; | |
| 392 | − m_iMaxPicHeight = pCfg->iActualPicHeight; | |
| 402 | + m_iMaxPicWidth = pCfg->iPicWidth; | |
| 403 | + m_iMaxPicHeight = pCfg->iPicHeight; | |
| 393 | 404 | m_iSrcListSize = iNumOfLayers; |
| 394 | 405 | |
| 395 | 406 | for (int32_t i = 0; i < m_iSrcListSize; ++ i) { |
| @@ -580,10 +591,10 @@ int CWelsH264SVCEncoder::EncodeFrame2 (const SSourcePicture** pSrcPicList, int · 184 unmodified lines | ||
| 580 | 591 | } |
| 581 | 592 | char strStreamFileName[128] = {0}; |
| 582 | 593 | int32_t iLen = WelsSnprintf (strStreamFileName, 128, "adj%d_w%d.264", m_iSwitchTimes, |
| 583 | − m_pEncContext->pSvcParam->iActualPicWidth); | |
| 594 | + m_pEncContext->pSvcParam->iPicWidth); | |
| 584 | 595 | m_pFileBs = WelsFopen (strStreamFileName, "wb"); |
| 585 | 596 | WelsSnprintf (strStreamFileName, 128, "adj%d_w%d_size.iLen", m_iSwitchTimes, |
| 586 | − m_pEncContext->pSvcParam->iActualPicWidth); | |
| 597 | + m_pEncContext->pSvcParam->iPicWidth); | |
| 587 | 598 | m_pFileBsSize = WelsFopen (strStreamFileName, "wb"); |
| 588 | 599 | |
| 589 | 600 | |
| @@ -729,18 +740,18 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 139 unmodified lines | ||
| 729 | 740 | m_pEncContext->pSvcParam->uiIntraPeriod = (uint32_t)iValue; |
| 730 | 741 | } |
| 731 | 742 | break; |
| 732 | − case ENCODER_OPTION_SVC_ENCODE_PARAM: { // SVC Encoding Parameter | |
| 733 | − SVCEncodingParam sEncodingParam; | |
| 743 | + case ENCODER_OPTION_SVC_ENCODE_PARAM_EXT: { // SVC Encoding Parameter | |
| 744 | + SEncParamExt sEncodingParam; | |
| 734 | 745 | SWelsSvcCodingParam sConfig (true); |
| 735 | 746 | int32_t iInputColorspace = 0; |
| 736 | 747 | int32_t iTargetWidth = 0; |
| 737 | 748 | int32_t iTargetHeight = 0; |
| 738 | 749 | |
| 739 | − memcpy (&sEncodingParam, pOption, sizeof (SVCEncodingParam)); // confirmed_safe_unsafe_usage | |
| 740 | − WelsLog (m_pEncContext, WELS_LOG_INFO, "ENCODER_OPTION_SVC_ENCODE_PARAM, sEncodingParam.iInputCsp= 0x%x\n", | |
| 750 | + memcpy (&sEncodingParam, pOption, sizeof (SEncParamBase)); // confirmed_safe_unsafe_usage | |
| 751 | + WelsLog (m_pEncContext, WELS_LOG_INFO, "ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, sEncodingParam.iInputCsp= 0x%x\n", | |
| 741 | 752 | sEncodingParam.iInputCsp); |
| 742 | 753 | WelsLog (m_pEncContext, WELS_LOG_INFO, |
| 743 | − "coding_param->iPicWidth= %d;coding_param->iPicHeight= %d;coding_param->iTargetBitrate= %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->iKeyPicCodingMode= %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->bEnableCropPic= %d;coding_param->bEnableLongTermReference= %d;coding_param->iLtrMarkPeriod= %d;\n", | |
| 754 | + "coding_param->iPicWidth= %d;coding_param->iPicHeight= %d;coding_param->iTargetBitrate= %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->bEnableCropPic= %d;coding_param->bEnableLongTermReference= %d;coding_param->iLtrMarkPeriod= %d;\n", | |
| 744 | 755 | sEncodingParam.iPicWidth, |
| 745 | 756 | sEncodingParam.iPicHeight, |
| 746 | 757 | sEncodingParam.iTargetBitrate, |
| @@ -748,10 +759,9 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 1 unmodified line | ||
| 748 | 759 | sEncodingParam.iPaddingFlag, |
| 749 | 760 | sEncodingParam.iTemporalLayerNum, |
| 750 | 761 | sEncodingParam.iSpatialLayerNum, |
| 751 | − sEncodingParam.fFrameRate, | |
| 762 | + sEncodingParam.fMaxFrameRate, | |
| 752 | 763 | sEncodingParam.iInputCsp, |
| 753 | − sEncodingParam.iKeyPicCodingMode, | |
| 754 | − sEncodingParam.iIntraPeriod, | |
| 764 | + sEncodingParam.uiIntraPeriod, | |
| 755 | 765 | sEncodingParam.bEnableSpsPpsIdAddition, |
| 756 | 766 | sEncodingParam.bPrefixNalAddingCtrl, |
| 757 | 767 | sEncodingParam.bEnableDenoise, |
| @@ -781,7 +791,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 23 unmodified lines | ||
| 781 | 791 | } |
| 782 | 792 | #ifdef OUTPUT_BIT_STREAM |
| 783 | 793 | if (sEncodingParam.sSpatialLayers[sEncodingParam.iSpatialLayerNum - 1].iVideoWidth != |
| 784 | − m_pEncContext->pSvcParam->sDependencyLayers[m_pEncContext->pSvcParam->iNumDependencyLayer - 1].iFrameWidth) { | |
| 794 | + m_pEncContext->pSvcParam->sDependencyLayers[m_pEncContext->pSvcParam->iSpatialLayerNum - 1].iFrameWidth) { | |
| 785 | 795 | ++ m_iSwitchTimes; |
| 786 | 796 | m_bSwitch = true; |
| 787 | 797 | } |
| @@ -795,11 +805,11 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 7 unmodified lines | ||
| 795 | 805 | if (sConfig.ParamTranscode (sEncodingParam, true)) { |
| 796 | 806 | return cmInitParaError; |
| 797 | 807 | } |
| 798 | − if (sConfig.iNumDependencyLayer < 1) { | |
| 808 | + if (sConfig.iSpatialLayerNum < 1) { | |
| 799 | 809 | return cmInitParaError; |
| 800 | 810 | } |
| 801 | − iTargetWidth = sConfig.iActualPicWidth; | |
| 802 | − iTargetHeight = sConfig.iActualPicHeight; | |
| 811 | + iTargetWidth = sConfig.iPicWidth; | |
| 812 | + iTargetHeight = sConfig.iPicHeight; | |
| 803 | 813 | if (m_pSrcPicList[0] == NULL) { |
| 804 | 814 | return cmInitParaError; |
| 805 | 815 | } |
| @@ -812,7 +822,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 6 unmodified lines | ||
| 812 | 822 | } |
| 813 | 823 | #ifdef REC_FRAME_COUNT |
| 814 | 824 | WelsLog (m_pEncContext, WELS_LOG_INFO, |
| 815 | − "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_SVC_ENCODE_PARAM, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", | |
| 825 | + "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", | |
| 816 | 826 | m_uiCountFrameNum, m_iCspInternal); |
| 817 | 827 | #endif//REC_FRAME_COUNT |
| 818 | 828 | |
| @@ -876,7 +886,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 57 unmodified lines | ||
| 876 | 886 | break; |
| 877 | 887 | case ENCOCER_LTR_MARKING_PERIOD: { |
| 878 | 888 | uint32_t iValue = * ((uint32_t*) (pOption)); |
| 879 | − m_pEncContext->pSvcParam->uiLtrMarkPeriod = iValue; | |
| 889 | + m_pEncContext->pSvcParam->iLtrMarkPeriod = iValue; | |
| 880 | 890 | } |
| 881 | 891 | break; |
| 882 | 892 | case ENCODER_OPTION_LTR: { |
| @@ -954,15 +964,25 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 71 unmodified lines | ||
| 954 | 964 | * ((int32_t*)pOption) = m_pEncContext->pSvcParam->uiIntraPeriod; |
| 955 | 965 | } |
| 956 | 966 | break; |
| 957 | − case ENCODER_OPTION_SVC_ENCODE_PARAM: { // SVC Encoding Parameter | |
| 967 | + case ENCODER_OPTION_SVC_ENCODE_PARAM_EXT: { // SVC Encoding Parameter | |
| 968 | +#ifdef REC_FRAME_COUNT | |
| 969 | + WelsLog (m_pEncContext, WELS_LOG_INFO, | |
| 970 | + "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", | |
| 971 | + m_uiCountFrameNum, m_iCspInternal); | |
| 972 | +#endif//REC_FRAME_COUNT | |
| 973 | + memcpy (pOption, m_pEncContext->pSvcParam, sizeof (SEncParamExt)); // confirmed_safe_unsafe_usage | |
| 974 | + } | |
| 975 | + break; | |
| 976 | + case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter | |
| 958 | 977 | #ifdef REC_FRAME_COUNT |
| 959 | 978 | WelsLog (m_pEncContext, WELS_LOG_INFO, |
| 960 | − "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_SVC_ENCODE_PARAM, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", | |
| 979 | + "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_SVC_ENCODE_PARAM_BASE, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", | |
| 961 | 980 | m_uiCountFrameNum, m_iCspInternal); |
| 962 | 981 | #endif//REC_FRAME_COUNT |
| 963 | − memcpy (pOption, m_pEncContext->pSvcParam, sizeof (SWelsSvcCodingParam)); // confirmed_safe_unsafe_usage | |
| 982 | + memcpy (pOption, m_pEncContext->pSvcParam, sizeof (SEncParamBase)); // confirmed_safe_unsafe_usage | |
| 964 | 983 | } |
| 965 | 984 | break; |
| 985 | + | |
| 966 | 986 | case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate |
| 967 | 987 | #ifdef REC_FRAME_COUNT |
| 968 | 988 | WelsLog (m_pEncContext, WELS_LOG_INFO, |