From 7e1db7867653d6904e14e036abef583cdee6188d Mon Sep 17 00:00:00 2001 From: ZXCLI Date: Tue, 6 Oct 2026 04:06:48 +0800 Subject: [PATCH] =?UTF-8?q?csdk:=20=E4=B8=8E=E5=AE=98=E6=96=B9=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=20App=20=E5=AF=B9=E9=BD=90=E2=80=94=E2=80=94=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=85=B3=E9=97=AD=E7=81=B0=E5=BA=A6=20CDF=20pivot?= =?UTF-8?q?=EF=BC=88=E5=AE=9E=E6=B5=8B=E5=90=8C=E5=88=BB=E5=88=86=E5=B8=83?= =?UTF-8?q?=E9=87=8D=E5=90=88=EF=BC=89=EF=BC=9B=E6=B8=A9=E5=BA=A6=E9=93=BE?= =?UTF-8?q?=E7=A7=BB=E6=A4=8D=E8=A7=84=E6=A0=BC=E5=85=A5=20README=EF=BC=88?= =?UTF-8?q?=E5=BE=85=E6=9C=89=20C=20=E7=BC=96=E8=AF=91=E5=99=A8=E6=97=B6?= =?UTF-8?q?=E8=90=BD=E5=9C=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- csdk/README.md | 19 ++++++++++++++++++- csdk/tools/mag160c_demo3.c | 6 +++++- csdk/tools/mag160c_linux_demo.c | 6 +++++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/csdk/README.md b/csdk/README.md index 070afeb..729c6bc 100644 --- a/csdk/README.md +++ b/csdk/README.md @@ -217,7 +217,7 @@ gray→2x→调色板),FFC 命令通过回调发给调用方(调用方持 ```c mag160c_render_cfg_t cfg = { .width = 160, .height = 120, .ddt_path = "mag160c_official.ddt", .ffc_period = 1800, - .ffc_drift = 250, .startup_force_ffc = 1, .cdf_pivot_75 = 1, + .ffc_drift = 250, .startup_force_ffc = 1, .cdf_pivot_75 = 0, /* 官方手机 App 的取值 */ .ffc_cb = my_ffc_sender, .ffc_user = NULL }; mag160c_render_init(&r, &cfg); /* 每帧: */ @@ -285,3 +285,20 @@ build-artifacts\csdk_test_display.exe | `../交接_完整逆向工程说明_20260811.md` | 项目总交接(目录/环境/历史)| | `WINDOWS_TESTING.md` | Windows 抓包与硬件测试指南 | | `legacy/` | 历史工具源码归档(早期探索,功能已被现工具取代)| + +## 与官方手机 App 的对齐(2026-10-06,从安卓侧验证后同步) + +1. **灰度 CDF 的 75% pivot:工具已改为关闭(`cdf_pivot_75 = 0`)**。 + 实测(同一静止场景、同刻截图、调色板反解灰度):pivot 开时我们的灰度中位 33 / 均值 60, + 官方手机 App 是 61 / 82;关掉后为 50–54 / 80–81(与官方重合)。库保留该开关, + `analysis/render_offline.c` 生成黄金夹具时仍用 1(Kotlin 对齐测试用同一配置)。 + 证据与数据:`docs/android_app/rendering_diff_phone_20261006.md`。 +2. **温度换算待移植**:官方对这台设备走的是"放射学分支"(每波段线性映射 + 环境温度误差修正 + + 发射率/透过率 revise),不是本 SDK 现在用的 T2E 表分支。完整反编译结论、伪代码与 + 参数来源见 `docs/android_app/temperature_chain_re_20261006.md`(§4d 可直接落地, + 已用 15 帧官方同帧数据验证到平均 13.9 mC)。C 侧还需要: + - DDT 尾部辐射标定记录的解析(阈值/gain/offset/shift/±500/eps,偏移表见该文档 §4d); + - BasePara2 的 `ATZeroErrorPoint`/`ATErrorSlope`/`fpaTempFix`(线上偏移同样见该文档); + - 曲线 A 与本 SDK 的 `T2E` 表相同(646 项,已验证逐项一致)。 + 注:本机当前**没有 C 编译器**(gcc/clang 均缺失),以上 C 改动需在有编译器的环境里 + 编译 + 跑 csdk 测试后再提交。 diff --git a/csdk/tools/mag160c_demo3.c b/csdk/tools/mag160c_demo3.c index b4c5577..76f4dad 100644 --- a/csdk/tools/mag160c_demo3.c +++ b/csdk/tools/mag160c_demo3.c @@ -605,7 +605,11 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmd, int show) { cfg.ffc_drift = 250; cfg.startup_force_ffc = 1; cfg.warm_frames = 20; - cfg.cdf_pivot_75 = 1; + /* Official PHONE app runs the gray CDF WITHOUT the 75% pivot: with it on the + rendering is measurably darker than the official app (gray median 33 vs 61, + mean 60 vs 82 in a same-moment on-device comparison); off matches (50-54 vs 61, + 80-81 vs 82). See docs/android_app/rendering_diff_phone_20261006.md. */ + cfg.cdf_pivot_75 = 0; cfg.ffc_cb = ffc_cb; cfg.post_nuc_cb = post_nuc_cb; cfg.post_gray_cb = post_gray_cb; diff --git a/csdk/tools/mag160c_linux_demo.c b/csdk/tools/mag160c_linux_demo.c index def7ff3..fef1c07 100644 --- a/csdk/tools/mag160c_linux_demo.c +++ b/csdk/tools/mag160c_linux_demo.c @@ -125,7 +125,11 @@ int main(int argc, char **argv) { cfg.ffc_drift = 250; cfg.startup_force_ffc = 1; cfg.warm_frames = 20; - cfg.cdf_pivot_75 = 1; + /* Official PHONE app runs the gray CDF WITHOUT the 75% pivot: with it on the + rendering is measurably darker than the official app (gray median 33 vs 61, + mean 60 vs 82 in a same-moment on-device comparison); off matches (50-54 vs 61, + 80-81 vs 82). See docs/android_app/rendering_diff_phone_20261006.md. */ + cfg.cdf_pivot_75 = 0; cfg.ffc_cb = ffc_cb; mag160c_render_t *render = NULL; if (mag160c_render_init(&render, &cfg) != MAG160C_OK) {