From 08c07db3c6f8ce5eff701cbc1fe7d66ffe552c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 22 Feb 2014 23:31:13 +0200 Subject: [PATCH] Respect the loop filter disabling encoder parameter Previously the loop filter was unconditionally enabled regardless of what encoder parameter was set. If using SEncParamBase instead, the loop filter was always disabled. --- codec/encoder/core/inc/param_svc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codec/encoder/core/inc/param_svc.h b/codec/encoder/core/inc/param_svc.h index a05ee9ab..42ab8bff 100644 --- a/codec/encoder/core/inc/param_svc.h +++ b/codec/encoder/core/inc/param_svc.h @@ -302,10 +302,10 @@ int32_t ParamTranscode (const SEncParamExt& pCodingParam) { SUsedPicRect.iHeight = ((iPicHeight >> 1) << 1); /* Deblocking loop filter */ + iLoopFilterDisableIdc = pCodingParam.iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries, #ifdef MT_ENABLED - iLoopFilterDisableIdc = 2;//pCodingParam.iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries, -#else - iLoopFilterDisableIdc = 0; // 0: on, 1: off, 2: on except for slice boundaries + if (iLoopFilterDisableIdc == 0) // Loop filter requested to be enabled + iLoopFilterDisableIdc = 2; // Disable loop filter on slice boundaries since that's not possible with multithreading #endif iLoopFilterAlphaC0Offset = 0; // AlphaOffset: valid range [-6, 6], default 0 iLoopFilterBetaOffset = 0; // BetaOffset: valid range [-6, 6], default 0