diff --git a/analysis/session_state.md b/analysis/session_state.md index 398483e..7ea2b98 100644 --- a/analysis/session_state.md +++ b/analysis/session_state.md @@ -19,7 +19,10 @@ - [x] 零像素根因定位与修复(load_ddt 表错位) - [x] **颗粒感修复**:demo3 显示层改为官方同款 320×240(2x 平滑灰度 + 调色板 + HALFTONE 放大),同场景 RGB 直方图相关性 0.9796 -- [x] 仓库整理 + csdk/README.md 完整文档 + 本地 commit 0bfb926 +- [x] **FFC 频率对齐**:补官方"启动强制 FFC"逻辑(mode 0 帧 75 无条件 + FFC(0),trace 实测启动阶段 FFC(0) 间隔 59~394 帧 ≈ 4~26s, + 稳定后 1800 帧 ≈ 120s,demo3 已一致) +- [x] 仓库整理 + csdk/README.md 完整文档 + 本地 commit 0bfb926 / 03ed936 - [ ] push(等服务器上线,用户手动) ## 颗粒感问题(已解决,2026-08-14) diff --git a/build-artifacts/mag160c_demo3.exe b/build-artifacts/mag160c_demo3.exe index 779667d..6501dba 100644 --- a/build-artifacts/mag160c_demo3.exe +++ b/build-artifacts/mag160c_demo3.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6a6d7a3f5bdcf81d983302e5bcb31d8b8c48094970bd0314418eb7c2886903e -size 139029 +oid sha256:46c20bd002e372e36742bca1a2244e8a7d9f03dd27989e7c2153f0937b09f98b +size 139066 diff --git a/csdk/tools/mag160c_demo3.c b/csdk/tools/mag160c_demo3.c index 72db744..b84c1d8 100644 --- a/csdk/tools/mag160c_demo3.c +++ b/csdk/tools/mag160c_demo3.c @@ -132,6 +132,7 @@ static int g_ref_cnt; static int g_f20[NPIX]; static int g_fcount; static int g_manual_ffc; +static int g_startup_ffc_done; /* ---- render state ---- */ static unsigned short g_nuc[NPIX]; @@ -927,12 +928,21 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmd, int show) { if (idx <= OFF_N0 + OFF_N2 + OFF_N1) { continue; } - /* normal frame: FFC condition */ + /* normal frame: FFC condition (FUN_180009ee0) */ { int drift = g_shutter - g_shutter_at_ffc; if (drift < 0) drift = -drift; int cool = OFF_N0 + OFF_N2 + OFF_N1; int do_ffc = 0; + /* startup forced FFCs (official): mode 0/3/5/6 forces FFC(0) + * at frame 75 once; mode 1/2/4 forces at frame 117 up to 5 + * times. We do not know the live 0x2d47 mode on Windows, so + * follow the mode-0 rule (matches the observed trace cadence: + * an extra FFC shortly after startup). */ + if (!g_startup_ffc_done && idx == 75) { + g_startup_ffc_done = 1; + do_ffc = 1; + } if (idx >= OFF_N0 + OFF_FFC_PERIOD) do_ffc = 1; else if (idx >= cool + 30 && drift > OFF_FFC_DRIFT) @@ -941,7 +951,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmd, int show) { sendcmd(0x6bb6b672, 0, 8); g_ffc_idx = 0; g_shutter_at_ffc = shutter; - if (ffcdbg) { fprintf(ffcdbg, "frame=%u AUTO FFC(0) idx=%d drift=%d\n", g_global_frames, idx, drift); fflush(ffcdbg); } + if (ffcdbg) { fprintf(ffcdbg, "frame=%u AUTO FFC(0) idx=%d drift=%d%s\n", g_global_frames, idx, drift, + g_startup_ffc_done && idx == 75 ? " (forced75)" : ""); fflush(ffcdbg); } continue; } }