修改摸底测试功能、修改pattern控制逻辑

This commit is contained in:
xinzhu.yin
2026-05-13 17:17:13 +08:00
parent 9a52e34f2b
commit 0513f810bd
13 changed files with 479 additions and 3067 deletions

View File

@@ -768,28 +768,25 @@ class PQDebugPanel:
# 禁用按钮
self._disable_test_button(test_type, test_item)
# 根据测试类型设置信号格式
self._setup_signal_format(test_type)
# 获取图案索引并发送
if test_item in ["gamma", "eotf"]:
pattern_index = self.get_gray_index(selected)
self.app.config.set_current_pattern("gray")
pattern_mode = "gray"
elif test_item == "accuracy":
pattern_index = self.get_color_index(selected)
self.app.config.set_current_pattern("accuracy")
pattern_mode = "accuracy"
elif test_item == "rgb":
pattern_index = self.get_rgb_index(selected)
self.app.config.set_current_pattern("rgb")
pattern_mode = "rgb"
else:
raise ValueError(f"不支持的测试项目: {test_item}")
# 设置图案
self.app.ucd.set_ucd_params(self.app.config)
# 跳转到目标图案
for i in range(pattern_index + 1):
self.app.ucd.set_next_pattern()
self.app.ucd.run()
session = self.app.pattern_service.prepare_session(
pattern_mode,
test_type=test_type,
log_details=False,
)
self.app.pattern_service.send_session_pattern(session, pattern_index)
time.sleep(1.5)
# 测量数据
@@ -815,28 +812,6 @@ class PQDebugPanel:
self.app.log_gui.log(traceback.format_exc(), level="error")
self._enable_test_button(test_type, test_item)
def _setup_signal_format(self, test_type):
"""设置信号格式"""
if test_type == "screen_module":
self.app.ucd.set_ucd_params(self.app.config)
elif test_type == "sdr_movie":
self.app.ucd.set_sdr_format(
color_space=self.app.sdr_color_space_var.get(),
gamma=self.app.sdr_gamma_type_var.get(),
data_range=self.app.sdr_data_range_var.get(),
bit_depth=self.app.sdr_bit_depth_var.get(),
)
elif test_type == "hdr_movie":
self.app.ucd.set_hdr_format(
color_space=self.app.hdr_color_space_var.get(),
data_range=self.app.hdr_data_range_var.get(),
bit_depth=self.app.hdr_bit_depth_var.get(),
max_cll=self.app.hdr_maxcll_var.get(),
max_fall=self.app.hdr_maxfall_var.get(),
)
def _compare_and_display(self, test_type, test_item, selected, new_data):
"""对比数据并显示"""
# 获取原始数据