Fix JOC passthrough layout and no-previous-state interpolation

Interpolate the second half of a two-data-point frame from dp0 to dp1 when
the object has no previous matrix; a single data point keeps the hard cut.

Rebuild the passthrough frame as the 8-plane core order L, R, C, LFE, Ls,
Rs, (Lrs, Rrs) written to output slots 0..7, all delayed by 1217 samples,
and keep that 8-plane history updated on every frame. Frames without JOC
metadata always take this passthrough path, and a core channel count
change clears the LFE ring while keeping the clipgain ramp state.

Reject unsupported downmix configurations with a structured variant error
in the metadata scan, and score ID14 payloads by the frame status instead
of accepting any lenient parse.

Update the math notes and README for the two-data-point interpolation
without a previous state and the 8-plane passthrough output.
This commit is contained in:
TheM14 committed 2026-11-06 11:53:05 +08:00
1 parent 0820444f45
commit 17e52a531c
7 files changed
+68 -34

No files matched your search

+1 -1
View File
@@ -273,7 +273,7 @@ JustOneCacophony/
- 覆盖 `joc_dmx_config_idx` 0..4 的全部档位($N=5,7,7,5,7$,相位开关 $\sigma(k)$ 同时门控 Ls/Rs 的 $-j$ 旋转与 band-0 FIR)。7 通道档位必须解出 8 通道床,且需要依赖子流的 `chanmap` 才能确定额外那一对:缺少核心子流或缺少 `chanmap` 仍按变体报错;`chanmap` 声明的额外对与 $k$ 不一致、或 OAMD bed 掩码与 $k$ 不一致时,只记入 `diagnostics` 并继续解码——额外那对的**身份**只进元数据、不进 DSP(§10.1),床映射按 `chanmap` 的通道码做。
- 同一音频帧里出现多个含 ID11/ID14 的 EMDF 容器时(其中一个容器可能不是本帧的 JOC 参数:ID14 声明的对象数超出其字节所能容纳的范围,ID11 也可能没有 groupid),按 ETSI TS 103 420 §8.2 + Table 56 的关联规则打分选取:**OAMD 与 JOC 载荷 groupid 相同且 ID14 能完整解析**的容器优先,其次只看 ID14 能否完整解析;只有唯一最高分才采用,其余记入 `diagnostics`(`emdf/extra_container_ignored`),并列或全部为 0 仍报变体。
- 额外那一对的身份以 TS 103 420 Table 47/Table 48 为准($k=1\to$Lb/Rb,$k\in\{2,4\}\to$Tfl/Tfr,$N=5,7,7,5,7$);Annex E.3 规定依赖子流的 `chanmap`(若存在)**应**指明 Table 47 的某种配置,因此 `*_5_1_2top_*`(chanmap 写 Lts/Rts)属于不满足 "shall" 的素材,我们按"记诊断 + 继续解码"容错处理。
- 不含 JOC 元数据(ID11 + ID14)的 E-AC-3 输入不在支持范围;解码过程中若个别音频帧没有 JOC EMDF,当前实现按状态机兜底(进入该帧前处于正常渲染时保持渲染,否则直通延迟 1217 采样的核心 PCM),并以 `joc_frame_missing` 记入 `diagnostics`。
- 不含 JOC 元数据(ID11 + ID14)的 E-AC-3 输入不在支持范围;解码过程中若个别音频帧没有 JOC EMDF,该帧输出核心 PCM 直通(8 路核心按 identity 写入输出槽 0..7,每路延迟 1217 采样),并以 `joc_frame_missing` 记入 `diagnostics`。
- 扬声器与 SOFA 双耳路径当前只覆盖普通点对象;extent、spread、diffuse、divergence、channel lock 等对象控制不在支持范围内。
- 扬声器渲染从 OAMD 元数据读取 warp、trim 和 front/back balance;命令行不提供 warp 覆盖。通用渲染参数支持 warp 0/1,以及先渲染到 7.1.x 再按 PLIIx 或 Standard(Lo/Ro)折回 5.1.x 的 warp 2/3;校准参数始终按最终目标布局选择。原始对象轨迹与 binaural 不预处理这些扬声器控制,参数和顺序见 [数学说明 §12](docs/math.md)。
- 多数据点、少见参数带配置和特殊 OAMD 调度的覆盖度低于常见 12-band、单数据点素材。