Support bounded 720x1280 avatar shapes through GLES and production gates
This commit is contained in:
@@ -67,7 +67,20 @@ runtime03/04 schemaVersion1 retains its fixed97@24 constraints. Each new body's
|
||||
`frameCount:N`, `durationUs`, `fpsNumerator/fpsDenominator`, **`ptsUs:[actual decoded
|
||||
presentation timestamps]`** are mandatory. No truncation/padding to97, no neutral
|
||||
track reuse. Counts121/49 and rational frame rates are supported independently.
|
||||
Current GLES shape remains480×848 (new shapes require renderer extension).
|
||||
Schema2 supports exactly **480×848 or720×1280**. Declare actual `body.width/height`
|
||||
and every edge/action `clip.width/height`; the full index must use one common shape,
|
||||
including native loops, own-mouth bridges and music actions. Mixed/undeclared shapes
|
||||
are rejected. Legacy schema1 stays480×848. No schemaVersion3 is needed.
|
||||
Coordinates `patches.x/y/width/height` are pixels of that exact decoded body,
|
||||
not normalized UVs or480-reference coordinates. GLES receives the admitted body size
|
||||
for Fit, logical pixel→patch UV and decoder/SurfaceTexture dimensions. Patch bitmaps
|
||||
are uploaded at their authored size without automatic scaling. Track each new body
|
||||
independently:720/480=1.5 but1280/848≈1.509434, so a blanket1.5× transform of old
|
||||
coordinates is neither sufficient nor an own-body binding. Existing128px/8MB/32MB
|
||||
limits remain in force; larger portraits do not authorize larger mouth caches.
|
||||
New shape support is code admission only, not a new pin or device/naturalness review.
|
||||
The currently frozen white480×848 pack stays unchanged; new720 assets need their
|
||||
own machine gate and independent exact index pin before any capability activation.
|
||||
N is bounded2..720, fps1..60, duration0.1..30s; body PTS starts0, strictly increases,
|
||||
remains below duration and agrees with measured duration/nominal fps within one
|
||||
nominal frame. Nonuniform actual PTS is accepted within two nominal frame intervals.
|
||||
@@ -139,7 +152,7 @@ Bridge TALK extension (2026-10-13, stable optional field):
|
||||
`edge.mouthRuntimeManifest:{path,sha256}` references a bridge-own schema2 runtime04.
|
||||
Use packId `a01-expression-action-v1-<edgeId>-runtime-04`; relative runtime paths
|
||||
resolve under its own manifest directory. Its body SHA/N/actual ptsUs/duration/fps/
|
||||
480×848 shape must equal edge.clip exactly; the body path can resolve to a copy of
|
||||
width/height (the common index shape) must equal edge.clip exactly; the body path can resolve to a copy of
|
||||
that unchanged bridge video. Every one of its N frames has five own source patches
|
||||
(1.1 sourcepx candidate) and own coords/curves, never either endpoint's patches.
|
||||
For the current four bridges N=25:125 own PNGs each, measured independently.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# GLES 720×1280 支持
|
||||
|
||||
本次从 clean `62dce32bb7c0f50f7873c906017cd0b80fe63586` 实施尺寸扩展。支持代码不等于新素材发布或真机性能认证。本轮不生成/导入新角色素材,不修改时间、LLM/provider/TTS、摄像头检测或 gateway 部署。
|
||||
|
||||
## 生产实现
|
||||
|
||||
- `ContinuousBodyRenderer` 从已准入 `body.width/height` 设置 SurfaceTexture、核对 MediaExtractor 实际 H264 尺寸、计算 Fit 和传递 `uBodySize`。嘴层 shader 将 logical UV 转换为自身 body 像素坐标,保留 OES textureMatrix 只作用于 body 的规则。PNG 按自身 width/height 上传,无隐式放大。
|
||||
- schema2 明确只接受480×848、720×1280。完整 index 的 conversation bodies、native loops、桥 clip/own-mouth runtime、音乐动作使用同一尺寸;混合尺寸拒绝。旧 schema1 仍固定480×848。schema2 字段足够,不升级schema。
|
||||
- `check-avatar-runtime.py` 和 `package-avatar-emotion.py` 核实际解码尺寸与声明值;复用已测视频时也必须核 shape,不能只复用 SHA/PTS 测量绕过维度绑定。实际 N/PTS、独立 body/patch SHA、音轨/cover、五档嘴层等原校验保留。
|
||||
- 启动 repository 的 body 构造使用校验后的尺寸;immutable APK 校验 receipt 的 validator 更新为2,旧 receipt 不复用。现 bootstrap 的路径/独立 SHA/poster/旧pin仍冻结;将来换720包需重新制作并审核匹配 bootstrap,当前不能只换pin就启新包。
|
||||
- 每patch≤128×128、每runtime≤8,000,000 RGBA bytes、全部≤32,000,000 bytes,不提高上限。高分辨率 decoder/native body texture 的额外开销不在这个 mouth RGBA 上限中,需真机测量。
|
||||
|
||||
## 素材 owner 合同
|
||||
|
||||
完整字段见 `docs/AVATAR_PACK_V2_CONTRACT.md`。新720 body 独立解码并声明实际 width=720、height=1280/N/PTS;逐帧重新 tracking/export 自身五档 patch,坐标以自身720×1280像素为准。不能沿用旧480 body 的 mask/hash/coord;横向倍率1.5,纵向1280/848≈1.509434,因此一律1.5×坐标并不正确。body/桥/动作全部一致shape;mouth state curve clock 与 body clock 独立。新 exact index 必须重新 machine gate、Pi pin 和能力 registry 审核,旧白衣 pin 不批准新素材。
|
||||
|
||||
读取候选的入口保持不变:
|
||||
|
||||
```sh
|
||||
python3 scripts/check-avatar-runtime.py --manifest <runtime>/manifest.json --sha256 <exact-sha> --output <new-evidence.json>
|
||||
python3 scripts/package-avatar-emotion.py --manifest <index>/manifest.json --sha256 <exact-index-sha> --output <new-evidence-directory>
|
||||
```
|
||||
|
||||
均为只读检查,不激活未知包。
|
||||
|
||||
## 验证
|
||||
|
||||
- 9 JVM/UI入口回归;双尺寸分别重放实际 `EmotionActionAvatarView`/renderer/music/record-confirm callback 路径,每种1288断言(Android API doubles)。包括 happy/sad、own桥、idle轮换、10s动作层独占/自然结束/取消/旧epoch/恢复A,非手抄状态机。
|
||||
- 双尺寸完整5body/13edge/8ownmouth/2action生产 parser,每种34断言;混合package/edge/action shape及总缓存越界拒绝。720 production renderer 另测越旧坐标范围、越界拒绝、codec尺寸不符、循环、uniform、释放后旧callback。启动720基本loop→full等待真实source/target0和基础decoder释放。
|
||||
- 40包装测试:新增6项使用本地临时 procedural H264/PNG及合成正弦AAC。实际720 index 经生产 Kotlin parser、全decode、PTS/PNG/own-body/hash gate;旧schema1扩尺寸、声明/实际尺寸不符、patch越界、edge复用测量尺寸不符拒绝。没有人物生成或付费API。
|
||||
- GLES2/Mesa llvmpipe:旧冻结五包重跑200像素goldens;720 procedural30项,覆盖三viewport/Fit、上下方向、body texture crop与独立patch坐标、alpha0精确body、fractional origin和四边界。使用生产shader字符串,OES sampler替换2D surrogate;不证明Android OES/YUV/Bitmap/手机GPU。
|
||||
- 旧 exact pin `987e125a7d7a2cde99121b5f5246c82f4dbe36c4899d3d49eaffd1a68bafb887` 全包生产 gate仍通过:5body/13edge/8ownmouth/2action,3222引用文件,RGBA10,911,120 bytes。
|
||||
- Gradle assembleDebug及instrumentation Kotlin编译通过。编译核验包未发布/安装;其全部3819 asset文件与已发布code24逐字节一致,同arm64/min26/target34/debug证书。实际APK后台repository cold/receipt回放 main_asset_reads=0、cold3185patch检查、receipt0patch检查,同进程不重复load。
|
||||
|
||||
证据保存在 ignored `logs/avatar-shape-720/`、`logs/avatar-safe-061/`;源代码/合同/测试进入Git,媒体、报告和二进制不进入Git。没有发布新720 APK,没有修改已发布code24/旧回退包或live allowlist。真机720解码、GPU对齐、startup/内存/温度/自然效果、instrumentation运行均未测;gateway未变,本轮无需重启或额外推理调用。
|
||||
Reference in New Issue
Block a user