Port the OAMD metadata rendering and the frame-level JOC core
The JOC bitstream reports a per-frame parse status instead of treating every anomaly as an exception: an unsupported downmix configuration, a clamped object count, an unknown parameter-band count, bad offset_ts values and trailing bytes each get their own status. The raw 5-bit offset_ts values are kept as coded and validated to be strictly increasing per object, and the clipgain uses 2^(x-4) * (1 + y/32). The JOC core gains a frame-level state machine. It keeps the per-object previous matrix and its presence marker, the seq counter, the 8-plane passthrough history, the LFE clipgain ramp start and the previous actual core-channel count. Normal, hold, hard-cut and passthrough frames are distinguished: a frame without a previous state interpolates per the data-point rules, an object that disappears keeps publishing a zero matrix, a frame without metadata passes the 8 core planes through to slots 0..7 with the 1217-sample delay, and a declared core-channel-count change hard-cuts and clears the LFE ring while the clipgain ramp state is kept. The core LFE applies the full clipgain as a sample-wise ramp before its delay. The OAMD parser exposes the full frame state: every object's state in every position block, the programme assignment and the trim element, with multiple blocks and up to 30 declared objects accepted. The speaker renderer applies this state: per-block gain/inactive, zone/elevation, the size kernel, snap, divergence, element 5 refinement, the priority size budget, ISF basis matrices and bed channel distribution, scheduled on the 32-sample metadata grid with block alignment and gain ramps. The size kernel, ISF basis assembly, bed routing and compensation are computed in oamd_math from the speaker layout geometry; bed labels and reference positions derive from the layout tables. The six ISF configurations and twelve layout descriptors are compiled in as static tables (oamd/isf_tables.h); the JSON loader and the configure-time embedding are gone. The layout tables gain 6.0, and the layout lookup, bed map and trim probe follow. The binaural position timeline consumes the full frame state as well: every position block is scheduled at its own offset and ramp, and its track list grows with the declared object count, so multi-block and over-16-object programmes are rendered instead of rejected. The JOC binaural input stays one LFE plus fifteen object sources; the extra tracks are followed but not panned. The file task and the stream parse the full state for speaker and binaural, while the ADM export keeps the 15-track single-block view. The public headers carry the new status values, the frame-level entry point and the raw offset_ts description; the internal ABI versions go to 6 (joc_core), 2 (frame params and EMDF info) and 4 (eac3joc). ctest covers the frame-level core (clipgain formula and LFE ramp, offset_ts validation, frame statuses, the 8-plane passthrough, the seq state machine and the no-previous-state interpolation), the OAMD parser state, the compiled-in ISF tables and the binaural timeline. The READMEs and the mathematical notes describe the 6.0 layout, the frame state machine, the metadata application and the ISF lookup tables.
This commit is contained in:
1 parent
a2760286b0
commit
0bb82e4115
41 files changed
+8182
-678
No files matched your search
+6
-8
@@ -26,7 +26,7 @@ performs no parsing or conversion of measurement data formats.
|
||||
```powershell
|
||||
joc_cli input.m4a --binaural `
|
||||
--compiled-hrtf-cache path\to\subject.jochrtf `
|
||||
--kernels data\rosella_kernels.npz `
|
||||
--kernels path\to\rosella_kernels.npz `
|
||||
--binaural-mode mid --binaural-tail-seconds 5.0
|
||||
```
|
||||
|
||||
@@ -95,8 +95,8 @@ compiler does not sample 77 FFT bins. Defaults are `1e-3` projection ridge and
|
||||
`1e-5` SH ridge. Coincident directions are merged before a spherical-Voronoi
|
||||
weighted ridge fit.
|
||||
|
||||
The fixed resource is `data/rosella_kernels.npz`, which implements publicly
|
||||
standardized filter banks, computable from the following formulas.
|
||||
The fixed tables implement publicly standardized filter banks, compile into the
|
||||
sources, and are computable from the following formulas.
|
||||
|
||||
The hybrid analysis kernels are defined in [3GPP TS 26.405 / ETSI TS 126 405](https://www.etsi.org/deliver/etsi_ts/126400_126499/126405/06.00.00_60/ts_126405v060000p.pdf),
|
||||
Section 5.2.2 (Table 1 $Q=8$/
|
||||
@@ -125,11 +125,9 @@ $8+4+4$ child partition):
|
||||
|
||||
$$Y_p = \sum_{q\in C_p}\Bigl(\mathrm{Re}X_q + j\,s_q\,\mathrm{Im}X_q\Bigr),\qquad s_q\in\{\pm1\}$$
|
||||
|
||||
The loader verifies the archive and every array by SHA-256; the table version,
|
||||
all array hashes, and the 77 reference band-center values are part of the cache
|
||||
key. Public availability of a standard does not by itself grant permission to
|
||||
practice related patent claims. See
|
||||
[`data/README.en.md`](../data/README.en.md) and
|
||||
The tables are fixed at compile time, so no external archive is loaded and
|
||||
nothing enters a cache key at run time. Public availability of a standard does
|
||||
not by itself grant permission to practice related patent claims. See
|
||||
[`THIRD_PARTY_NOTICES.md`](../THIRD_PARTY_NOTICES.md) for the sources and the
|
||||
rights boundary.
|
||||
|
||||
|
||||
+4
-5
@@ -24,7 +24,7 @@ cache,不是交换格式。
|
||||
```powershell
|
||||
joc_cli input.m4a --binaural `
|
||||
--compiled-hrtf-cache path\to\subject.jochrtf `
|
||||
--kernels data\rosella_kernels.npz `
|
||||
--kernels path\to\rosella_kernels.npz `
|
||||
--jochrtf-room on `
|
||||
--binaural-mode mid --binaural-tail-seconds 5.0
|
||||
joc_cli input.m4a --binaural --personalized-headphone HRTF\binaural.personalized_headphone
|
||||
@@ -78,7 +78,7 @@ joc_cli input.m4a --binaural --personalized-headphone HRTF\binaural.personalized
|
||||
ridge 为 `1e-3`,SH ridge 为 `1e-5`。同方向 measurement 先合并,再用球面 Voronoi
|
||||
面积权重做 ridge fit。
|
||||
|
||||
固定表位于 `data/rosella_kernels.npz`,实现公开标准化的滤波器组,各表可由如下
|
||||
固定表按公开标准化的滤波器组实现并编译进源码,各表可由如下
|
||||
公式计算。
|
||||
|
||||
hybrid 分析核定义于 [3GPP TS 26.405 / ETSI TS 126 405](https://www.etsi.org/deliver/etsi_ts/126400_126499/126405/06.00.00_60/ts_126405v060000p.pdf)
|
||||
@@ -106,9 +106,8 @@ $8+4+4$ 子带划分):
|
||||
|
||||
$$Y_p = \sum_{q\in C_p}\Bigl(\mathrm{Re}X_q + j\,s_q\,\mathrm{Im}X_q\Bigr),\qquad s_q\in\{\pm1\}$$
|
||||
|
||||
loader 校验 archive 和每个数组的 SHA-256;table version、所有数组 hash 与
|
||||
77 个 band-center 参考值都属于 cache key。标准可公开获取不等于获准实施相关
|
||||
专利;更多来源信息见 [`data/README.md`](../data/README.md) 与
|
||||
固定表在编译期确定,运行时不加载外部 archive,也不参与缓存键。标准可公开
|
||||
获取不等于获准实施相关专利;来源与权利边界见
|
||||
[`THIRD_PARTY_NOTICES.md`](../THIRD_PARTY_NOTICES.md)。
|
||||
|
||||
## `.jochrtf`
|
||||
|
||||
+95
-13
@@ -147,15 +147,17 @@ If the clipgain field consists of integer $x$ and mantissa $y$, then
|
||||
|
||||
$$
|
||||
G_{\mathrm{clip}}=
|
||||
1+\frac{y}{32}2^{x-4}.
|
||||
2^{x-4}\left(1+\frac{y}{32}\right).
|
||||
$$
|
||||
|
||||
It is folded into the analysis-side scalar $S=\frac{1}{16}G_{\mathrm{clip}}$, which multiplies
|
||||
every core-bed sample before the QMF analysis; the $\times16$ after the object inverse QMF cancels the
|
||||
$1/16$, so the net effect is a multiply by $G_{\mathrm{clip}}$ and the $[-1,1]$ clamp sits **after** the
|
||||
gain. The scalar keeps two per-frame slots: the first 256 samples of a frame ramp linearly from the
|
||||
previous frame's value to this frame's value and the rest stays constant, and the first frame after a
|
||||
reset takes the new value directly. LFE bypasses this scalar.
|
||||
Its range is $[0.0625,15.75]$; at $x=4$ it reduces to $1+y/32$. It is folded into the analysis-side
|
||||
scalar $S=\frac{1}{16}G_{\mathrm{clip}}$, which multiplies every core-bed sample before the QMF
|
||||
analysis; the $\times16$ after the object inverse QMF cancels the $1/16$, so the net effect is a multiply
|
||||
by $G_{\mathrm{clip}}$ and the $[-1,1]$ clamp sits **after** the gain. The scalar keeps two per-frame
|
||||
slots: the first 256 samples of a frame ramp linearly from the previous frame's value to this frame's
|
||||
value and the rest stays constant, and the first frame after a reset takes the new value directly. LFE
|
||||
uses a separate path but applies the same full $G_{\mathrm{clip}}$ as a sample-wise ramp before its
|
||||
1217-sample delay; see section 8.
|
||||
|
||||
## 3. Parameter-band expansion and time interpolation
|
||||
|
||||
@@ -190,7 +192,13 @@ Thus $p(b)=k$ if and only if $b\in\mathcal B_k$. Other parameter-band counts use
|
||||
|
||||
### 3.2 One-data-point interpolation
|
||||
|
||||
Let $P_{o,c,b}$ be the previous frame-end value and $D_{o,c,p(b)}$ the current target. For slot $t=0\ldots23$:
|
||||
Let $P_{o,c,b}$ be the previous frame-end value and $D_{o,c,p(b)}$ the current target. When the object
|
||||
has no previous state yet (the first frame of the stream, or the object's first appearance), a single
|
||||
data point keeps all 24 slots at $D_{o,c,p(b)}$ (hard cut, no fade-in from zero); with two data points,
|
||||
the first 12 slots stay at $D_0$ and the last 12 slots still interpolate from $D_0$ to $D_1$ using the
|
||||
second segment of section 3.3 (with $P$ set to $D_0$).
|
||||
|
||||
With a previous state, for slot $t=0\ldots23$:
|
||||
|
||||
$$
|
||||
\alpha_t=\frac{t+1}{24},
|
||||
@@ -208,11 +216,31 @@ $$
|
||||
M_{o,c,b,23}=D_{o,c,p(b)}.
|
||||
$$
|
||||
|
||||
This value then becomes the previous state for the next frame.
|
||||
This value then becomes the previous state for the next frame. Once an object's present flag goes from 1
|
||||
to 0, it keeps being published with an all-zero matrix and its previous state is updated to zero until it
|
||||
becomes present again.
|
||||
|
||||
### 3.3 Multiple data points
|
||||
|
||||
When a frame contains two data points, `offset_ts` gives the segment boundary. Each segment uses the same linear relation between the previous and next targets; step mode switches targets at the designated slot.
|
||||
`offset_ts` gives the first slot at which each data point becomes active, using the raw 5-bit value
|
||||
(legal range $0\ldots23$); the values of one object must be strictly increasing. In the default mode
|
||||
(`slope_idx=0`), two data points $D_0$ and $D_1$ interpolate as
|
||||
|
||||
$$
|
||||
M_{o,c,b,t}=
|
||||
\begin{cases}
|
||||
(1-\alpha_t)P_{o,c,b}+\alpha_tD_{0}, & t=0\ldots10,\ \alpha_t=\dfrac{t+1}{12},\\[1mm]
|
||||
D_{0}, & t=11,\\[1mm]
|
||||
(1-\beta_t)D_{0}+\beta_tD_{1}, & t=12\ldots23,\ \beta_t=\dfrac{t-11}{12}.
|
||||
\end{cases}
|
||||
$$
|
||||
|
||||
When no previous state exists, the same formulas apply with $P_{o,c,b}$ set to $D_0$.
|
||||
|
||||
Step mode (`slope_idx=1`) switches targets directly at the designated slots: for $t<o_0$ it keeps the
|
||||
previous frame-end value $P_{o,c,b}$ (or $D_0$ when no previous state exists), for $o_0\le t<o_1$ it
|
||||
uses $D_0$, and for $t\ge o_1$ it uses $D_1$; with a single data point it keeps $P$ for $t<o_0$ and uses
|
||||
$D_0$ from $o_0$ on.
|
||||
|
||||
## 4. Analysis QMF for core PCM
|
||||
|
||||
@@ -337,15 +365,21 @@ where $r=0\ldots63$. Synthesis state must advance continuously by slot.
|
||||
|
||||
## 8. LFE path
|
||||
|
||||
LFE bypasses the object matrix and inverse QMF and uses a 1217-sample delay. After the input and output scale factors cancel:
|
||||
LFE bypasses the object matrix and inverse QMF. The core LFE samples are first multiplied by the
|
||||
sample-wise gain ramp $G[n]$ (the same full $G_{\mathrm{clip}}$ as section 2.4: for $n<256$,
|
||||
$G[n]=G_{\mathrm{old}}+n(G_{\mathrm{new}}-G_{\mathrm{old}})/256$; for $n\ge256$, $G[n]=G_{\mathrm{new}}$;
|
||||
on the first frame or after a reset, $G_{\mathrm{old}}=G_{\mathrm{new}}$). The scaled samples then
|
||||
enter the 1217-sample delay, and the read-out is only clamped, with no further gain:
|
||||
|
||||
$$
|
||||
y_{\mathrm{LFE}}[n]=
|
||||
\mathrm{clip}\left(
|
||||
x_{\mathrm{LFE,core}}[n-1217],-1,1
|
||||
x_{\mathrm{LFE,core}}[n-1217]\cdot G[n-1217],-1,1
|
||||
\right).
|
||||
$$
|
||||
|
||||
Here $G[k]$ uses the frame-local position of input sample $k$, i.e. $k\bmod1536$.
|
||||
|
||||
## 9. OAMD coordinates
|
||||
|
||||
The lateral and longitudinal grids use $N=62$; the height grid uses $N=15$. The quantizer is
|
||||
@@ -358,7 +392,7 @@ q_N(k)=
|
||||
\right).
|
||||
$$
|
||||
|
||||
OAR coordinates are
|
||||
The normalized room coordinates are
|
||||
|
||||
$$
|
||||
u=\frac{q_1}{32768},
|
||||
@@ -800,3 +834,51 @@ $$
|
||||
- Multiple OAMD position blocks must be scheduled in time order.
|
||||
- A limiter is separate post-processing and is not included in the mixing equations above.
|
||||
- Trim and front-back balance affect speaker rendering only; binaural rendering does not read them.
|
||||
|
||||
## 16. OAMD metadata application (speaker path)
|
||||
|
||||
When mapping object PCM to the target layout, speaker rendering applies the OAMD
|
||||
object attributes in addition to the geometric panning:
|
||||
|
||||
- per-block integer gain `Qg` (unity 4096) and `inactive`; the gain is applied to
|
||||
the target coefficients once, and the LFE uses its owning metadata object's
|
||||
gain/active state;
|
||||
- full basic/render status 0/1/2/3 block expansion, same-object previous-block
|
||||
inheritance, and local mask updates;
|
||||
- `zone_constraints_idx` region selection mapped through `[0,1,2,3,4,5,6,0]`;
|
||||
`enable_elevation=0` forces z=0 before position compensation and size spread;
|
||||
- `object_size_idx` 5-bit sizes, the `size_curve` piecewise mapping, and the size
|
||||
kernel; the kernel is generated at runtime from region geometry with
|
||||
equal-power grouped panning, the S448 weight and a power sum (20/20/8
|
||||
virtual points, 20 size nodes, 35/4 position nodes; boundary rows
|
||||
X(0), X(1), Y(0), Y(1), Z(1));
|
||||
- `snap` first-argmax speaker snapping, `divergence` left/right point-source
|
||||
combination, and element 5 high-precision position refinement;
|
||||
- `default_priority`/`priority_bits` choose which size objects keep their size
|
||||
when the size budget is limited;
|
||||
- `isf_idx` basis matrices (signed coefficients, no per-column normalization)
|
||||
with the per-basis compensation;
|
||||
- `b_bed_chan_distribute` label candidates, weight normalization, missing-channel
|
||||
fallback, and the direct/distribute compensation.
|
||||
|
||||
The ISF path orders the N ISF object audio essences into the column vector t
|
||||
according to the M.U.L.Z order of `isf_config`, selects the input configuration
|
||||
by `isf_idx` and the matrix M for the target output layout, and evaluates
|
||||
y = M·t: each ISF channel is distributed over the speakers by the corresponding
|
||||
matrix row, LFE bypasses the matrix, and each basis carries its own
|
||||
compensation. The matrix coefficients and layout descriptors are obtained from
|
||||
lookup tables stored in the compiled-in `src/oamd/isf_tables.h`; nothing reads a
|
||||
data file at run time.
|
||||
|
||||
Gain, size, priority, position, divergence, delta and refinement values are
|
||||
computed in code (`src/oamd/oamd_parser.*`) from formulas or fixed constants; the
|
||||
size kernel (`src/oamd/oamd_math.*`) is generated at runtime from region geometry
|
||||
with grouped equal-power panning, the S448 weight and a power sum. Bed labels,
|
||||
routing and reference positions are derived from the speaker layout tables
|
||||
(`src/speaker/speaker_layouts.h`) by
|
||||
`src/joc_bitstream/bed_layout_map.{h,cpp}`.
|
||||
ADM export and the binaural paths still use object positions only and do not apply
|
||||
these speaker target coefficients. The binaural path schedules positions from the
|
||||
complete `frame_state`: multiple position blocks and programmes with more than 16
|
||||
objects are scheduled block by block at their own time and ramp, and its position
|
||||
track list is not limited to 16; ADM export keeps the 15-track single-block view.
|
||||
+73
-9
@@ -147,13 +147,15 @@ $$
|
||||
|
||||
$$
|
||||
G_{\mathrm{clip}}=
|
||||
1+\frac{y}{32}2^{x-4}.
|
||||
2^{x-4}\left(1+\frac{y}{32}\right).
|
||||
$$
|
||||
|
||||
它并入分析端标量 $S=\frac{1}{16}G_{\mathrm{clip}}$,乘在核心 bed 的每个采样上(QMF 分析之前);
|
||||
值域为 $[0.0625,15.75]$;$x=4$ 时化为 $1+y/32$。它并入分析端标量
|
||||
$S=\frac{1}{16}G_{\mathrm{clip}}$,乘在核心 bed 的每个采样上(QMF 分析之前);
|
||||
对象 inverse QMF 之后的 $\times16$ 抵消 $1/16$,净效果是乘 $G_{\mathrm{clip}}$,因此钳位 $[-1,1]$
|
||||
处在增益**之后**。标量按帧保留两个槽,本帧前 256 个采样从上一帧值线性过渡到本帧值、之后为常数,
|
||||
复位后的第一帧直接取新值。LFE 走旁通通路,不参与该标量。
|
||||
复位后的第一帧直接取新值。LFE 走独立通路,但使用同一个完整 $G_{\mathrm{clip}}$ 的逐点斜坡:
|
||||
斜坡在进入 1217-sample 延迟之前乘到 LFE 采样上,见 §8。
|
||||
|
||||
## 3. 参数带展开与时间插值
|
||||
|
||||
@@ -188,7 +190,12 @@ $$
|
||||
|
||||
### 3.2 单数据点插值
|
||||
|
||||
令上一帧末值为 $P_{o,c,b}$,当前目标值为 $D_{o,c,p(b)}$。对时槽 $t=0\ldots23$:
|
||||
令上一帧末值为 $P_{o,c,b}$,当前目标值为 $D_{o,c,p(b)}$。对象没有 previous 状态时
|
||||
(整条流第一帧或对象首次出现):单数据点情形 24 个时槽恒为 $D_{o,c,p(b)}$(硬切,
|
||||
不从零淡入);双数据点情形前 12 个时槽为 $D_0$,后 12 个时槽按 §3.3 的第二段公式
|
||||
从 $D_0$ 插值到 $D_1$(把该节的 $P$ 取为 $D_0$)。
|
||||
|
||||
有 previous 状态时,对时槽 $t=0\ldots23$:
|
||||
|
||||
$$
|
||||
\alpha_t=\frac{t+1}{24},
|
||||
@@ -206,11 +213,28 @@ $$
|
||||
M_{o,c,b,23}=D_{o,c,p(b)}.
|
||||
$$
|
||||
|
||||
该值随后成为下一帧的 previous 状态。
|
||||
该值随后成为下一帧的 previous 状态。对象 present 由 1 变 0 后,从该帧起继续按全零矩阵发布,
|
||||
并把 previous 更新为零矩阵,直到它重新 present=1。
|
||||
|
||||
### 3.3 多数据点
|
||||
|
||||
当一帧含两个数据点时,`offset_ts` 给出分段边界。每一段在上一目标和下一目标之间使用相同的线性关系;阶跃模式则在指定时槽直接切换目标。
|
||||
`offset_ts` 给出各数据点开始生效的时隙序号,取原始 5 bit 值(合法范围 $0\ldots23$);
|
||||
同一对象的数据点必须严格递增。默认模式(`slope_idx=0`)下,两个数据点 $D_0,D_1$ 的插值为
|
||||
|
||||
$$
|
||||
M_{o,c,b,t}=
|
||||
\begin{cases}
|
||||
(1-\alpha_t)P_{o,c,b}+\alpha_tD_{0}, & t=0\ldots10,\ \alpha_t=\dfrac{t+1}{12},\\[1mm]
|
||||
D_{0}, & t=11,\\[1mm]
|
||||
(1-\beta_t)D_{0}+\beta_tD_{1}, & t=12\ldots23,\ \beta_t=\dfrac{t-11}{12}.
|
||||
\end{cases}
|
||||
$$
|
||||
|
||||
没有 previous 状态时同样使用上面的公式,只是把 $P_{o,c,b}$ 取为 $D_0$。
|
||||
|
||||
阶跃模式(`slope_idx=1`)在指定时槽直接切换目标:$t<o_0$ 保持上一帧末值 $P_{o,c,b}$
|
||||
(没有 previous 时取 $D_0$),$o_0\le t<o_1$ 取 $D_0$,$t\ge o_1$ 取 $D_1$;
|
||||
单数据点时 $t<o_0$ 保持 $P$、$t\ge o_0$ 取 $D_0$。
|
||||
|
||||
## 4. 核心 PCM 的 analysis QMF
|
||||
|
||||
@@ -334,15 +358,20 @@ $$
|
||||
|
||||
## 8. LFE 路径
|
||||
|
||||
LFE 不经过对象矩阵或 inverse QMF,而是使用 1217-sample 延迟。输入与输出端的比例因子抵消后:
|
||||
LFE 不经过对象矩阵或 inverse QMF。核心 LFE 先乘逐点增益斜坡 $G[n]$(与 §2.4 同一个完整
|
||||
$G_{\mathrm{clip}}$:$n<256$ 时 $G[n]=G_{\mathrm{old}}+n(G_{\mathrm{new}}-G_{\mathrm{old}})/256$,
|
||||
$n\ge256$ 时 $G[n]=G_{\mathrm{new}}$,首帧或复位后 $G_{\mathrm{old}}=G_{\mathrm{new}}$),
|
||||
再进入 1217-sample 延迟;读出后只做钳位,不再乘任何增益:
|
||||
|
||||
$$
|
||||
y_{\mathrm{LFE}}[n]=
|
||||
\mathrm{clip}\left(
|
||||
x_{\mathrm{LFE,core}}[n-1217],-1,1
|
||||
x_{\mathrm{LFE,core}}[n-1217]\cdot G[n-1217],-1,1
|
||||
\right).
|
||||
$$
|
||||
|
||||
其中 $G[k]$ 取输入采样 $k$ 所在帧内的位置,即 $k\bmod1536$。
|
||||
|
||||
## 9. OAMD 坐标
|
||||
|
||||
横向和纵向网格使用 $N=62$,高度网格使用 $N=15$。量化函数为
|
||||
@@ -355,7 +384,7 @@ q_N(k)=
|
||||
\right).
|
||||
$$
|
||||
|
||||
OAR 坐标为
|
||||
归一化房间坐标为
|
||||
|
||||
$$
|
||||
u=\frac{q_1}{32768},
|
||||
@@ -774,3 +803,38 @@ $$
|
||||
- 多个 OAMD position block 必须按其时间顺序调度。
|
||||
- limiter 属于独立后处理,不包含在上述混音公式中。
|
||||
- trim 与前后平衡只作用于扬声器渲染;双耳渲染不读取它们。
|
||||
|
||||
## 16. OAMD 元数据应用(扬声器路径)
|
||||
|
||||
扬声器渲染把对象 PCM 映射到目标布局时,除几何声像外还应用 OAMD 的对象属性:
|
||||
|
||||
- 每块整数增益 `Qg`(单位增益 4096)与 `inactive`;增益在生成目标系数时乘一次,
|
||||
LFE 使用所属元数据对象的增益/活动状态;
|
||||
- basic/render 状态 0/1/2/3 的完整块展开、同对象前一块继承与局部 mask 更新;
|
||||
- `zone_constraints_idx` 选择区域,映射为 `[0,1,2,3,4,5,6,0]`;`enable_elevation=0`
|
||||
在位置补偿和尺寸扩散前令 z=0;
|
||||
- `object_size_idx` 的 5 bit 尺寸、`size_curve` 分段线性映射与尺寸扩散核;
|
||||
尺寸核按分组等功率声像、S448 权重和幂和,在运行时用区域几何生成:
|
||||
20/20/8 个虚拟点、20 个尺寸节点、35/4 个位置节点,边界表为
|
||||
X(0)、X(1)、Y(0)、Y(1)、Z(1);
|
||||
- `snap` 的首个最大系数扬声器吸附、`divergence` 的左右两点合成、
|
||||
element 5 的高精度位置补充;
|
||||
- `default_priority`/`priority_bits` 在 size 数量预算不足时决定保留尺寸的对象;
|
||||
- `isf_idx` 的 ISF 基矩阵(可含负系数,不做逐列归一化)与逐 basis 补偿;
|
||||
- `b_bed_chan_distribute` 的 bed 标签候选筛选、权重归一化、缺失声道 fallback 和
|
||||
直达/distribute 的补偿。
|
||||
|
||||
ISF 路径把 N 路 ISF object audio essences 按 `isf_config` 的 M.U.L.Z 顺序组成
|
||||
列向量 t,按 `isf_idx` 选输入配置、按目标输出布局选矩阵 M,再计算 y = M·t:
|
||||
每个 ISF 声道按矩阵对应的一行分配到目标扬声器,LFE 不参与矩阵、直接旁路,
|
||||
每个 basis 另有补偿。矩阵系数与布局描述通过查表获得,表数据写在编译进源码的
|
||||
`src/oamd/isf_tables.h` 中,运行时不读取数据文件。
|
||||
|
||||
gain、size、priority、位置、divergence 与差分/细化值由 `src/oamd/oamd_parser.*`
|
||||
按公式或固定常量计算,size 扩散核由 `src/oamd/oamd_math.*` 从区域几何生成
|
||||
(分组等功率声像 + S448 权重 + 幂和)。bed 标签、路由和参考位置由
|
||||
`src/joc_bitstream/bed_layout_map.*` 从 `src/speaker/speaker_layouts.h` 的布局表
|
||||
推导。
|
||||
ADM 导出与双耳路径仍只使用对象位置,不应用这些扬声器目标系数。双耳路径按完整
|
||||
`frame_state` 调度位置:多 position block 与超过 16 个对象的节目都按各块的时间与 ramp
|
||||
逐个调度,双耳位置轨道数不限于 16;ADM 导出保持 15 轨单 block 视图。
|
||||
Reference in new issue
Block a user