屏模组添加colorinfo设置、修改配置项UI样式
This commit is contained in:
@@ -87,6 +87,7 @@ _DEFAULT_TEST_TYPES = {
|
||||
"name": "屏模组性能测试",
|
||||
"test_items": ["gamut", "gamma", "cct", "contrast"],
|
||||
"timing": "DMT 1920x 1080 @ 60Hz",
|
||||
"data_range": "Full",
|
||||
"color_format": "RGB",
|
||||
"bpc": 8,
|
||||
"colorimetry": "sRGB",
|
||||
@@ -96,6 +97,7 @@ _DEFAULT_TEST_TYPES = {
|
||||
"name": "SDR Movie测试",
|
||||
"test_items": ["gamut", "gamma", "cct", "contrast", "accuracy"],
|
||||
"timing": "DMT 1920x 1080 @ 60Hz",
|
||||
"data_range": "Full",
|
||||
"color_format": "RGB",
|
||||
"bpc": 8,
|
||||
"colorimetry": "sRGB",
|
||||
@@ -105,6 +107,7 @@ _DEFAULT_TEST_TYPES = {
|
||||
"name": "HDR Movie测试",
|
||||
"test_items": ["gamut", "eotf", "cct", "contrast", "accuracy"],
|
||||
"timing": "DMT 1920x 1080 @ 60Hz",
|
||||
"data_range": "Full",
|
||||
"color_format": "RGB",
|
||||
"bpc": 8,
|
||||
"colorimetry": "sRGB",
|
||||
@@ -695,7 +698,16 @@ class PQConfig:
|
||||
def from_dict(self, config_dict):
|
||||
"""从字典加载配置"""
|
||||
self.current_test_type = config_dict.get("current_test_type", "screen_module")
|
||||
self.current_test_types = config_dict.get("test_types", self.current_test_types)
|
||||
|
||||
# 以默认模板为底,叠加历史配置,保证新字段(如 data_range)在旧配置下也有值。
|
||||
loaded_test_types = config_dict.get("test_types", {})
|
||||
merged_test_types = copy.deepcopy(_DEFAULT_TEST_TYPES)
|
||||
if isinstance(loaded_test_types, dict):
|
||||
for test_type, loaded_cfg in loaded_test_types.items():
|
||||
if test_type in merged_test_types and isinstance(loaded_cfg, dict):
|
||||
merged_test_types[test_type].update(loaded_cfg)
|
||||
self.current_test_types = merged_test_types
|
||||
|
||||
self.device_config = config_dict.get("device_config", self.device_config)
|
||||
self.custom_pattern = config_dict.get("custom_pattern", self.custom_pattern)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user