History

Remove a needless, no-op change of the number of threads

If kiCpuCores < 2, then iCountThreadsNum (and iMultipleThreadIdc) can't be >= 2, because they're initialized with WELS_MIN (kiCpuCores, ...) just a few lines above. If iMultipleThreadIdc is initially set to 0 by the caller, this removed piece of code would change it to 1, if kiCpuCores < 2. When iMultipleThreadIdc is changed from the originally set value, a call to WelsEncoderParamAdjust with the original parameters would reset the whole codec since iMultipleThreadIdc differs. This fixes running EncoderInterfaceTest.TemporalLayerSettingTest on machines where the detected number of cores is 1.

Martin Storsjö committed 12 years ago

Commit 2f6a9861 parent dacd22d1 file · +0 −8Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+0−8
@@ -1862,14 +1862,6 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar · 1861 unmodified lines
18621862 pCodingParam->iCountThreadsNum = WELS_MIN (kiCpuCores, iMaxSliceCount);
18631863 pCodingParam->iMultipleThreadIdc = pCodingParam->iCountThreadsNum;
18641864
1865−#ifndef WELS_TESTBED // for product release and non-SGE testing
1866−
1867− if (kiCpuCores < 2) { // single CPU core, make no sense for MT parallelization
1868− pCodingParam->iMultipleThreadIdc = 1;
1869− pCodingParam->iCountThreadsNum = 1;
1870− }
1871−#endif
1872−
18731865 *pMaxSliceCount = iMaxSliceCount;
18741866
18751867 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t