修复 demo3 颗粒感:显示层改用官方同款 320x240 2x 平滑输出

- 根因:demo3 之前渲染 160x120 原始灰度并最近邻放大,官方输出是
  2x 升采样后的 320x240(2-tap 平滑本身抑噪)
- 已排除:0x230(FUN_1800175a0 帧差调整)、0x41fe8 隔行平滑(=0)、
  temporal filter 0x41fe0(=1) 均未启用,f20 mode=1 直通
- 修复:render_bmp 改用 g_gray320 上色,BMP/窗口改 320x240,
  StretchBlt 加 HALFTONE,BMP 头支持 >255 尺寸
- 验证:同场景与官方 pair_000.rgb 直方图相关性 0.9796,颜色数 227=官方
This commit is contained in:
ZXCLI
2026-08-14 16:16:10 +08:00
parent 0bfb926892
commit 03ed936a5f
4 changed files with 50 additions and 38 deletions
+4 -3
View File
@@ -171,12 +171,13 @@ Start-Process "C:\Project\MAG160C\build-artifacts\mag160c_demo3.exe" -WorkingDir
| `mag160c_official_nuc_thr.bin` | 官方 NUC 阈值表(历史抓取,备用)|
| `libusb-1.0.dll` | libusb 运行库 |
验证状态(2026-08-13):
验证状态(2026-08-14):
- NUC+盲元 与官方同帧抓帧逐像素 0/19200 误差
- 阈值/gain 插值 0 误差;2x 升采样 0/76800 误差;窗口公式与官方一致
- 同静态场景 gray 直方图与官方相关性 0.92(跨会话)
- 同静态场景 320×240 RGB 直方图与官方相关性 0.98(跨会话)
- 显示层 = 官方同款 320×240(2x 平滑灰度 + 调色板 + HALFTONE 放大)
- 输出日志:`demo3_diag.txt`(每帧统计)、`demo3_ffc.txt`FFC 事件)、
`demo3_auto_*.bmp`(每 30 帧快照)
`demo3_auto_*.bmp`(每 30 帧快照320×240
### 5. 官方抓帧工具(tsdk_pair2 / tsdk_pair3