diff --git a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.cpp b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.cpp index 4019ab51db..254bc867e8 100644 --- a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.cpp +++ b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.cpp @@ -139,6 +139,15 @@ inline bool IsBRC(const mfxExtEncToolsConfig &config) IsOn(config.BRC); } + +inline bool IsEncToolsOptSet(const mfxExtEncToolsConfig& config) +{ + return + (config.AdaptiveB | config.AdaptiveI | config.AdaptiveLTR | config.AdaptivePyramidQuantB + | config.AdaptivePyramidQuantP | config.AdaptiveQuantMatrices | config.AdaptiveRefB + | config.AdaptiveRefP | config.BRC | config.BRCBufferHints | config.SceneChange); +} + bool HEVCEHW::Base::IsEncToolsOptOn(const mfxExtEncToolsConfig &config, bool bGameStreaming) { return @@ -303,14 +312,7 @@ static void SetDefaultConfig(const mfxVideoParam &video, mfxExtEncToolsConfig &c bool lplaAssistedBRC = IsOn(config.BRC) && isSWLACondition(video); SetDefaultOpt(config.BRCBufferHints, lplaAssistedBRC); SetDefaultOpt(config.AdaptiveMBQP, bMBQPSupport && lplaAssistedBRC && IsOn(pExtOpt2->MBBRC)); -#ifdef ONEVPL_EXPERIMENTAL - if (IsEncToolsOptSet(config) && pExtOpt3->ContentInfo == MFX_CONTENT_NOISY_VIDEO) - SetDefaultOpt(config.AdaptiveQuantMatrices, true); - else - SetDefaultOpt(config.AdaptiveQuantMatrices, false); -#else SetDefaultOpt(config.AdaptiveQuantMatrices, false); -#endif } #ifdef MFX_ENABLE_ENCTOOLS_LPLA else diff --git a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.h b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.h index b7cfb23392..d0d3bbe2b7 100644 --- a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.h +++ b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_enctools.h @@ -100,24 +100,6 @@ namespace Base bool IsEncToolsOptOn(const mfxExtEncToolsConfig &config, bool bGameStreaming); bool IsLPLAEncToolsOn(const mfxExtEncToolsConfig &config, bool bGameStreaming); - inline bool IsEncToolsOptSet(const mfxExtEncToolsConfig& config) - { - return - (config.AdaptiveB | config.AdaptiveI | config.AdaptiveLTR | config.AdaptivePyramidQuantB - | config.AdaptivePyramidQuantP | config.AdaptiveQuantMatrices | config.AdaptiveRefB - | config.AdaptiveRefP | config.BRC | config.BRCBufferHints | config.SceneChange); - } - - inline int EncToolsDeblockingBetaOffset() - { - return 4; // Currently hard coded to best tested value when using enctools - } - - inline int EncToolsDeblockingAlphaTcOffset() - { - return 2; // Currently hard coded to best tested value when using enctools - } - } //Base } //namespace HEVCEHW diff --git a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_legacy_defaults.cpp b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_legacy_defaults.cpp index d5dae0afcf..47fb7b58cf 100644 --- a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_legacy_defaults.cpp +++ b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_legacy_defaults.cpp @@ -27,10 +27,6 @@ #include #include -#ifdef MFX_ENABLE_ENCTOOLS -#include "hevcehw_base_enctools.h" -#endif - using namespace HEVCEHW; using namespace HEVCEHW::Base; @@ -2024,19 +2020,6 @@ class GetDefault pps.deblocking_filter_control_present_flag = 1; pps.deblocking_filter_disabled_flag = !!CO2.DisableDeblockingIdc; pps.deblocking_filter_override_enabled_flag = 1; // to disable deblocking per frame - -#if defined(MFX_ENABLE_ENCTOOLS) -#if defined(ONEVPL_EXPERIMENTAL) - const mfxExtEncToolsConfig* pConfig = ExtBuffer::Get(par); - bool bEncTools = IsEncToolsOptSet(*pConfig); - - if (bEncTools && CO3.ScenarioInfo != MFX_SCENARIO_GAME_STREAMING && CO3.ContentInfo == MFX_CONTENT_NOISY_VIDEO) { - pps.beta_offset_div2 = mfxI8(EncToolsDeblockingBetaOffset() * 0.5 * !pps.deblocking_filter_disabled_flag); - pps.tc_offset_div2 = mfxI8(EncToolsDeblockingAlphaTcOffset() * 0.5 * !pps.deblocking_filter_disabled_flag); - } -#endif -#endif - pps.scaling_list_data_present_flag = 0; pps.lists_modification_present_flag = 1; pps.log2_parallel_merge_level_minus2 = 0;