Showing the changes to test/api/BaseEncoderTest.cpp (1 of 3 files). Show all
Unified · Split
| @@ -20,7 +20,6 @@ static int InitWithParam (ISVCEncoder* encoder, SEncParamExt* pEncParamExt) { · 19 unmodified lines | |||
| 20 | param.iPicWidth = pEncParamExt->iPicWidth; | 20 | param.iPicWidth = pEncParamExt->iPicWidth; |
| 21 | param.iPicHeight = pEncParamExt->iPicHeight; | 21 | param.iPicHeight = pEncParamExt->iPicHeight; |
| 22 | param.iTargetBitrate = 5000000; | 22 | param.iTargetBitrate = 5000000; |
| 23 | |||
| 24 | return encoder->Initialize (¶m); | 23 | return encoder->Initialize (¶m); |
| 25 | } else { | 24 | } else { |
| 26 | SEncParamExt param; | 25 | SEncParamExt param; |
| @@ -36,7 +35,8 @@ static int InitWithParam (ISVCEncoder* encoder, SEncParamExt* pEncParamExt) { · 9 unmodified lines | |||
| 36 | param.bIsLosslessLink = pEncParamExt->bIsLosslessLink; | 35 | param.bIsLosslessLink = pEncParamExt->bIsLosslessLink; |
| 37 | param.bEnableLongTermReference = pEncParamExt->bEnableLongTermReference; | 36 | param.bEnableLongTermReference = pEncParamExt->bEnableLongTermReference; |
| 38 | param.iEntropyCodingModeFlag = pEncParamExt->iEntropyCodingModeFlag ? 1 : 0; | 37 | param.iEntropyCodingModeFlag = pEncParamExt->iEntropyCodingModeFlag ? 1 : 0; |
| 39 | if (eSliceMode != SM_SINGLE_SLICE && eSliceMode != SM_SIZELIMITED_SLICE) //SM_SIZELIMITED_SLICE don't support multi-thread now | 38 | if (eSliceMode != SM_SINGLE_SLICE |
| 39 | && eSliceMode != SM_SIZELIMITED_SLICE) //SM_SIZELIMITED_SLICE don't support multi-thread now | ||
| 40 | param.iMultipleThreadIdc = 2; | 40 | param.iMultipleThreadIdc = 2; |
| 41 | 41 | ||
| 42 | for (int i = 0; i < param.iSpatialLayerNum; i++) { | 42 | for (int i = 0; i < param.iSpatialLayerNum; i++) { |
| @@ -57,9 +57,11 @@ static int InitWithParam (ISVCEncoder* encoder, SEncParamExt* pEncParamExt) { · 14 unmodified lines | |||
| 57 | param.iMultipleThreadIdc = 4; | 57 | param.iMultipleThreadIdc = 4; |
| 58 | param.bUseLoadBalancing = false; | 58 | param.bUseLoadBalancing = false; |
| 59 | } | 59 | } |
| 60 | if (param.iEntropyCodingModeFlag) { | ||
| 61 | param.sSpatialLayers[i].uiProfileIdc = PRO_MAIN; | ||
| 62 | } | ||
| 60 | } | 63 | } |
| 61 | param.iTargetBitrate *= param.iSpatialLayerNum; | 64 | param.iTargetBitrate *= param.iSpatialLayerNum; |
| 62 | |||
| 63 | return encoder->InitializeExt (¶m); | 65 | return encoder->InitializeExt (¶m); |
| 64 | } | 66 | } |
| 65 | } | 67 | } |