Showing the changes to test/BaseEncoderTest.cpp (1 of 20 files). Show all
Unified · Split
| @@ -7,32 +7,14 @@ · 6 unmodified lines | |||
| 7 | 7 | ||
| 8 | static int InitWithParam(ISVCEncoder* encoder, int width, | 8 | static int InitWithParam(ISVCEncoder* encoder, int width, |
| 9 | int height, float frameRate) { | 9 | int height, float frameRate) { |
| 10 | SVCEncodingParam param; | 10 | SEncParamBase param; |
| 11 | memset (¶m, 0, sizeof(SVCEncodingParam)); | 11 | memset (¶m, 0, sizeof(SEncParamBase)); |
| 12 | 12 | ||
| 13 | param.sSpatialLayers[0].iVideoWidth = width; | 13 | param.fMaxFrameRate = frameRate; |
| 14 | param.sSpatialLayers[0].iVideoHeight = height; | 14 | param.iPicWidth = width; |
| 15 | param.sSpatialLayers[0].fFrameRate = frameRate; | 15 | param.iPicHeight = height; |
| 16 | param.sSpatialLayers[0].iQualityLayerNum = 1; | ||
| 17 | param.sSpatialLayers[0].iSpatialBitrate = 600000; | ||
| 18 | |||
| 19 | SSliceConfig* sliceCfg = ¶m.sSpatialLayers[0].sSliceCfg; | ||
| 20 | sliceCfg->sSliceArgument.uiSliceNum = 1; | ||
| 21 | sliceCfg->sSliceArgument.uiSliceSizeConstraint = 1500; | ||
| 22 | sliceCfg->sSliceArgument.uiSliceMbNum[0] = 960; | ||
| 23 | |||
| 24 | param.fFrameRate = param.sSpatialLayers[0].fFrameRate; | ||
| 25 | param.iPicWidth = param.sSpatialLayers[0].iVideoWidth; | ||
| 26 | param.iPicHeight = param.sSpatialLayers[0].iVideoHeight; | ||
| 27 | param.iTargetBitrate = 5000000; | 16 | param.iTargetBitrate = 5000000; |
| 28 | param.iTemporalLayerNum = 3; | ||
| 29 | param.iSpatialLayerNum = 1; | ||
| 30 | param.bEnableBackgroundDetection = true; | ||
| 31 | param.bEnableLongTermReference = true; | ||
| 32 | param.iLtrMarkPeriod = 30; | ||
| 33 | param.iInputCsp = videoFormatI420; | 17 | param.iInputCsp = videoFormatI420; |
| 34 | param.bEnableSpsPpsIdAddition = true; | ||
| 35 | |||
| 36 | return encoder->Initialize(¶m, INIT_TYPE_PARAMETER_BASED); | 18 | return encoder->Initialize(¶m, INIT_TYPE_PARAMETER_BASED); |
| 37 | } | 19 | } |
| 38 | 20 | ||