Showing the changes to test/api/BaseEncoderTest.cpp (1 of 6 files). Show all
Unified · Split
| @@ -32,7 +32,7 @@ static int InitWithParam(ISVCEncoder* encoder, EUsageType usageType,int width, · 31 unmodified lines | ||
| 32 | 32 | param.bEnableDenoise = denoise; |
| 33 | 33 | param.iSpatialLayerNum = layers; |
| 34 | 34 | |
| 35 | − if (sliceMode != SM_SINGLE_SLICE) | |
| 35 | + if (sliceMode != SM_SINGLE_SLICE && sliceMode != SM_DYN_SLICE) //SM_DYN_SLICE don't support multi-thread now | |
| 36 | 36 | param.iMultipleThreadIdc = 2; |
| 37 | 37 | |
| 38 | 38 | for (int i = 0; i < param.iSpatialLayerNum; i++) { |
| @@ -42,6 +42,10 @@ static int InitWithParam(ISVCEncoder* encoder, EUsageType usageType,int width, · 3 unmodified lines | ||
| 42 | 42 | param.sSpatialLayers[i].iSpatialBitrate = param.iTargetBitrate; |
| 43 | 43 | |
| 44 | 44 | param.sSpatialLayers[i].sSliceCfg.uiSliceMode = sliceMode; |
| 45 | + if (sliceMode == SM_DYN_SLICE) { | |
| 46 | + param.sSpatialLayers[i].sSliceCfg.sSliceArgument.uiSliceSizeConstraint = 600; | |
| 47 | + param.uiMaxNalSize = 1500; | |
| 48 | + } | |
| 45 | 49 | } |
| 46 | 50 | |
| 47 | 51 | return encoder->InitializeExt(¶m); |