ref: 17934b98436e1317bf9ec5cee2bfd61469c0f786
parent: 0292647449cf400ec5176ace4e1c3f3e5d0c93e8
parent: 32669bc9417a701f563967f2c24d3f4a10302ea8
author: HaiboZhu <haibozhu@cisco.com>
date: Thu Oct 29 10:17:26 EDT 2015
Merge pull request #2192 from sijchen/fix_slc [Encoder] change an improper setting of max_slice_count
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -2286,11 +2286,11 @@
iMaxSliceCount = iSliceNum;
break;
case SM_AUTO_SLICE:
- iMaxSliceCount = MAX_SLICES_NUM;
pDlp->sSliceCfg.sSliceArgument.uiSliceNum = kiCpuCores;
- if (pDlp->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceCount) {
- pDlp->sSliceCfg.sSliceArgument.uiSliceNum = iMaxSliceCount;
+ if (pDlp->sSliceCfg.sSliceArgument.uiSliceNum > MAX_SLICES_NUM) {
+ pDlp->sSliceCfg.sSliceArgument.uiSliceNum = MAX_SLICES_NUM;
}
+ iMaxSliceCount = WELS_MAX(iMaxSliceCount, pDlp->sSliceCfg.sSliceArgument.uiSliceNum);
if (pDlp->sSliceCfg.sSliceArgument.uiSliceNum == 1) {
WelsLog (pLogCtx, WELS_LOG_DEBUG,
"InitSliceSettings(), uiSliceNum(%d) you set for SM_AUTO_SLICE, now turn to SM_SINGLE_SLICE type!",