Previously the default value of iMultipleThreadIdc was 0, which made sure threads were used for the test with multiple slices (if run on a multicore machine). Now the default is 1, so multiple threads has to be requested. Explicitly request 2 threads, to make sure the threading code is tested, even on machines with only one core.
Showing the changes to test/api/BaseEncoderTest.cpp (1 of 1 file). Show all
Unified · Split
| @@ -31,6 +31,9 @@ static int InitWithParam(ISVCEncoder* encoder, int width, · 30 unmodified lines | |||
| 31 | param.iLoopFilterDisableIdc = deblock; | 31 | param.iLoopFilterDisableIdc = deblock; |
| 32 | param.iSpatialLayerNum = layers; | 32 | param.iSpatialLayerNum = layers; |
| 33 | 33 | ||
| 34 | if (sliceMode != SM_SINGLE_SLICE) | ||
| 35 | param.iMultipleThreadIdc = 2; | ||
| 36 | |||
| 34 | for (int i = 0; i < param.iSpatialLayerNum; i++) { | 37 | for (int i = 0; i < param.iSpatialLayerNum; i++) { |
| 35 | param.sSpatialLayers[i].iVideoWidth = width >> (param.iSpatialLayerNum - 1 - i); | 38 | param.sSpatialLayers[i].iVideoWidth = width >> (param.iSpatialLayerNum - 1 - i); |
| 36 | param.sSpatialLayers[i].iVideoHeight = height >> (param.iSpatialLayerNum - 1 - i); | 39 | param.sSpatialLayers[i].iVideoHeight = height >> (param.iSpatialLayerNum - 1 - i); |