ref: b749fe7160c475eca0ff700794eecee065d3f6df
parent: 921443ead81f109a6b588aa903a3ca5166f9f7e7
parent: 13cb84e695e8cabb89122d72ab2fc1001c5b30ac
author: HaiboZhu <[email protected]>
date: Fri Nov 27 04:29:22 EST 2015
Merge pull request #2273 from sijchen/th0 [Encoder] use different task when load-balancing or not, to save computation
--- a/codec/encoder/core/src/wels_task_management.cpp
+++ b/codec/encoder/core/src/wels_task_management.cpp
@@ -125,8 +125,11 @@
}
for (int idx = 0; idx < kiTaskCount; idx++) {
- pTask = WELS_NEW_OP (CWelsLoadBalancingSlicingEncodingTask (pEncCtx, idx), CWelsLoadBalancingSlicingEncodingTask);
- //TODO: set this after loadbalancing flagpTask = WELS_NEW_OP (CWelsSliceEncodingTask (pEncCtx, idx), CWelsSliceEncodingTask);
+ if (pEncCtx->pSvcParam->bUseLoadBalancing) {
+ pTask = WELS_NEW_OP (CWelsLoadBalancingSlicingEncodingTask (pEncCtx, idx), CWelsLoadBalancingSlicingEncodingTask);
+ } else {
+ pTask = WELS_NEW_OP (CWelsSliceEncodingTask (pEncCtx, idx), CWelsSliceEncodingTask);
+ }
WELS_VERIFY_RETURN_IF (ENC_RETURN_MEMALLOCERR, NULL == pTask)
m_cEncodingTaskList->push_back (pTask);
}