android: 录像标注日志给出完整判据 + 补充重启后真机验证记录
录像首帧日志原来只打印标记数量,无法判断"少了的标记是为什么少的"。现在一并 打印判据(probes 数量、trace 模式、minPos/maxPos、minC/maxC),录像里缺 max/min 时可直接从日志定位原因(追踪被关、极值尚未算出、重启清空了测点等)。 排查记录(重要):本轮一度以为录像丢了极值标记,实测日志 `annotation: 2 markers ... trace=BOTH minPos=159 maxPos=16269` 说明 probes=0、 2 个标记正好是 max+min ——标记本身是齐的,是我的读法错了(中途重装 APK 清空了 测点,我误把 2 当成"两个测点")。因此保留并强化了这条日志。 补充真机验证(重启冷启动 + 60s 稳定性): - 重启后 USB 权限被系统清空、重新授权后一次成功,15.1fps、无重枚举 - 录像 99 帧 / 0 丢弃 / 1.6MB,极值标记确认烧入 - 长时间运行 15.1fps 稳定、开增强(8 档)单帧 9.2~9.4ms - 照片/分析面板/底部面板三方数值完全一致 (同帧照片 max 36.0 min 20.4 Pt1 21.7 Pt2 26.1 ↔ 面板 36.0/20.4/24.5 + 21.7/26.1) - 文档记录:判断自绘画面帧率不能用 dumpsys gfxinfo(看不到 lockCanvas 绘制), 必须用内置 MAG160C/render 日志。99 项测试全绿。
This commit is contained in:
@@ -279,10 +279,19 @@ class LiveViewModel(app: Application) : AndroidViewModel(app) {
|
||||
// user can add or remove probes while recording.
|
||||
rec.marks = probesAsMarks()
|
||||
if (rec.frameCount == 0) {
|
||||
// evidence the recording really carries annotations: the first
|
||||
// frame logs how many markers and which extremes were burned in
|
||||
// Evidence the recording really carries annotations, and why the
|
||||
// count is what it is: the first frame logs how many markers were
|
||||
// burned in plus the inputs that decide it, so a video that is
|
||||
// missing its max/min can be diagnosed from the log alone
|
||||
// (trace mode set to 关闭, no extreme measured yet, probes cleared
|
||||
// by a restart, ...).
|
||||
val st = _state.value
|
||||
com.mag160c.thermal.media.DebugLog.log(
|
||||
"rec", "annotation: ${rec.marks.size} markers burned into video frames",
|
||||
"rec",
|
||||
"annotation: ${rec.marks.size} markers burned into video frames " +
|
||||
"(probes=${st.probes.size} trace=${st.traceMode} " +
|
||||
"minPos=${st.minPos} maxPos=${st.maxPos} " +
|
||||
"minC=${st.minTempC} maxC=${st.maxTempC})",
|
||||
)
|
||||
}
|
||||
rec.offerFrame(bmp)
|
||||
|
||||
Binary file not shown.
@@ -611,17 +611,29 @@ SDK 内部默认档——无法据此对齐具体档位,故本应用把它做
|
||||
- **屏幕熄灭时的行为(实测)**:渲染线程随 SurfaceView 停止绘制(无空转),
|
||||
USB 读取继续,整机 CPU 占用 3.7%——后台不烧电、不崩溃。
|
||||
|
||||
**本轮真机验证(小米 22041211AC / Android 12 / MIUI,无线 adb 192.168.88.137:44323)**:
|
||||
**本轮真机验证(小米 22041211AC / Android 12 / MIUI)**:
|
||||
|
||||
- [x] 渲染帧率 6.5 → **15.1 帧/秒**,单帧 134ms → **6.4ms**(开增强 11.3ms)
|
||||
- [x] 渲染帧率 6.5 → **15.1 帧/秒**,单帧 134ms → **6.4ms**(开增强 9~11ms)
|
||||
- [x] 拍照:`capture: nuc=yes probes=2 mirror(h=false,v=true) extremes=2 saved=true`
|
||||
- [x] 照片上标记风格与实时界面一致(同一 MarkerPainter),`max 32.6℃` 在热区、
|
||||
`min 22.0℃` 在冷区、Pt1/Pt2 带白底标签,互不压字
|
||||
- [x] 照片上标记风格与实时界面一致(同一 MarkerPainter),`max` 在热区、
|
||||
`min` 在冷区(贴近右边缘时标签自动翻到左侧)、Pt1/Pt2 带白底标签,互不压字
|
||||
- [x] 分析界面:标点与照片烧录位置对齐,**只有一个 min、一个 max**
|
||||
- [x] 分析面板数值可见且与照片一致(最高 32.9 / 最低 22.0 / 中心 24.4℃)
|
||||
- [x] 图像增强:档位生效、修正后不再放大噪声、15.1fps 不掉帧
|
||||
- [x] 照片 / 分析面板 / 底部面板三方数值完全一致
|
||||
(真机同帧:照片 max 36.0 min 20.4 Pt1 21.7 Pt2 26.1;面板 36.0/20.4/24.5 + 21.7/26.1)
|
||||
- [x] 图像增强:6 档与 8 档生效、修正后不再放大噪声、15.1fps 不掉帧
|
||||
- [x] 设置持久化跨冷启动(`mag160c_settings.xml`:enhanceLevel / imageFlipV)
|
||||
- [x] 录像:99 帧 / 0 丢弃 / 1.6MB,首帧日志证明极值标记已烧入
|
||||
(`annotation: 2 markers ... trace=BOTH minPos=159 maxPos=16269`)
|
||||
- [x] **重启后冷启动**(USB 权限被系统清空后重新授权):一次成功、15.1fps、
|
||||
无重枚举、无重连风暴
|
||||
- [x] 屏幕熄灭时无空转(CPU 3.7%)、USB 读取继续、不崩溃
|
||||
- [x] 长时间运行 60s+:15.1fps 稳定、无丢帧、无崩溃
|
||||
|
||||
**排查方法记录(本轮新增)**:
|
||||
- 判断"自绘画面"的帧率/耗时**不能用 `dumpsys gfxinfo`**(它看不到 SurfaceView 的
|
||||
lockCanvas 绘制,实测只记到 28 帧而流在 15fps)。本应用已内置 `MAG160C/render`
|
||||
日志:每 5 秒打印 `paints=N avg=x ms worst=y ms`,这是唯一能看到真实绘制性能的途径。
|
||||
- 录像标注是否齐全可从 `MAG160C/rec` 首帧日志直接读出(含 trace 模式与极值输入)。
|
||||
|
||||
**教训记录**:
|
||||
- `dumpsys gfxinfo` 不统计 SurfaceView 的 lockCanvas 绘制。判断自绘画面性能
|
||||
|
||||
LFS
BIN
Binary file not shown.
Reference in New Issue
Block a user