From 6047ff930efc3afce8348b6eabacec01c3a15865 Mon Sep 17 00:00:00 2001 From: lyao2 Date: Fri, 22 Aug 2014 09:19:14 +0800 Subject: [PATCH] fix deblockIDC and mutithread logic error --- codec/encoder/core/inc/param_svc.h | 3 --- codec/encoder/core/src/encoder_ext.cpp | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/codec/encoder/core/inc/param_svc.h b/codec/encoder/core/inc/param_svc.h index 6949abfe..409e7028 100644 --- a/codec/encoder/core/inc/param_svc.h +++ b/codec/encoder/core/inc/param_svc.h @@ -292,9 +292,6 @@ int32_t ParamTranscode (const SEncParamExt& pCodingParam) { /* Deblocking loop filter */ iLoopFilterDisableIdc = pCodingParam.iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries, - if (iLoopFilterDisableIdc == 0 - && iMultipleThreadIdc != 1) // Loop filter requested to be enabled, with threading enabled - iLoopFilterDisableIdc = 2; // Disable loop filter on slice boundaries since that's not allowed with multithreading iLoopFilterAlphaC0Offset = pCodingParam.iLoopFilterAlphaC0Offset; // AlphaOffset: valid range [-6, 6], default 0 iLoopFilterBetaOffset = pCodingParam.iLoopFilterBetaOffset; // BetaOffset: valid range [-6, 6], default 0 diff --git a/codec/encoder/core/src/encoder_ext.cpp b/codec/encoder/core/src/encoder_ext.cpp index e63499eb..74e98992 100644 --- a/codec/encoder/core/src/encoder_ext.cpp +++ b/codec/encoder/core/src/encoder_ext.cpp @@ -1860,7 +1860,9 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar pCodingParam->iCountThreadsNum = WELS_MIN (kiCpuCores, iMaxSliceCount); pCodingParam->iMultipleThreadIdc = pCodingParam->iCountThreadsNum; - + if (pCodingParam->iLoopFilterDisableIdc == 0 + && pCodingParam->iMultipleThreadIdc != 1) // Loop filter requested to be enabled, with threading enabled + pCodingParam->iLoopFilterDisableIdc = 2; // Disable loop filter on slice boundaries since that's not allowed with multithreading *pMaxSliceCount = iMaxSliceCount; return 0;