app+csdk+docs: 修正上一轮最近邻2×的退化(颗粒/边沿台阶)——照片改为从160×120单级6×放大(官方ImageViewer同款),实时缓冲与csdk回退为插值2×;实测冷区|dx| 0.76×官方(更平滑),119单测全绿

This commit is contained in:
ZXCLI
2026-10-06 17:57:17 +08:00
parent 4a3916a2b7
commit 595309735e
9 changed files with 124 additions and 19 deletions
+7 -6
View File
@@ -61,12 +61,13 @@ typedef struct mag160c_render_cfg_t {
/* Brightness offset for the Android LUT base; the official app passes 0. */
int lut_brightness;
/* 1 = replicate pixels in the 160x120 -> 320x240 stage instead of interpolating.
The official ANDROID path has no such stage at all (its SDK hands the app a
160x120 bitmap which ImageViewer draws with a non-filtering paint = nearest),
while the PC SDK's bilinear version fabricates an interleaved full/half
amplitude column pattern at the sensor Nyquist - visible as extra fine stripes
in the dark/cold regions. Measured on device: fine-scale cold-region stripe
ratio vs the official 1.16-1.29x (bilinear) -> 1.00/0.93 (nearest). */
Measured on device, this is the WRONG trade: replication halves the effective
resolution (2-sensor-pixel granules, a coarse staircase along hot/cold edges,
reported by the user), while the interpolation only adds a faint full/half
amplitude column pattern at the sensor Nyquist. A consumer that can draw
gray160 directly (like the Android app's photo path: one 6x bilinear step from
the sensor grid) needs no intermediate stage at all and gets both right.
Kept as a switch for experiments; leave 0. */
int upscale_nearest;
mag160c_render_ffc_cb_t ffc_cb;
void *ffc_user;