From 919eb6df5721ec0a7974218d40b636eb81f7429c Mon Sep 17 00:00:00 2001 From: TheM14 Date: Mon, 7 Sep 2026 10:35:35 +0800 Subject: [PATCH] Fix the syntax in math.md --- docs/math.en.md | 79 +++++++++++++++++-------------------------------- docs/math.md | 73 ++++++++++++++++----------------------------- 2 files changed, 52 insertions(+), 100 deletions(-) diff --git a/docs/math.en.md b/docs/math.en.md index 946c6c3..bd5e1d0 100644 --- a/docs/math.en.md +++ b/docs/math.en.md @@ -75,14 +75,12 @@ $$ For object $o$, data point $d$, core channel $c$, and parameter band $p$, the coded difference $\Delta_{o,d,c,p}$ reconstructs to $$ -Q_{o,d,c,0} -= +Q_{o,d,c,0}= \left(O_q+\Delta_{o,d,c,0}\right)\bmod N_q, $$ $$ -Q_{o,d,c,p} -= +Q_{o,d,c,p}= \left(Q_{o,d,c,p-1}+\Delta_{o,d,c,p}\right)\bmod N_q, \qquad p>0. $$ @@ -92,8 +90,7 @@ $$ The dequantized matrix coefficient is $$ -D_{o,d,c,p} -= +D_{o,d,c,p}= \left(Q_{o,d,c,p}-\frac{N_q}{2}\right) \frac{820}{4096(1+q_i)}. $$ @@ -105,8 +102,7 @@ The effective denominator is therefore 4096 in coarse mode and 8192 in fine mode If the clipgain field consists of integer $x$ and mantissa $y$, then $$ -G_{\mathrm{clip}} -= +G_{\mathrm{clip}}= 1+\frac{y}{32}2^{x-4}. $$ @@ -152,8 +148,7 @@ $$ $$ $$ -M_{o,c,b,t} -= +M_{o,c,b,t}= (1-\alpha_t)P_{o,c,b} +\alpha_tD_{o,c,p(b)}. $$ @@ -181,8 +176,7 @@ $$ Let $\mathcal A_b$ denote the 64-band analysis-QMF operator with polyphase history state. Then $$ -X_{c,b,t} -= +X_{c,b,t}= \mathcal A_b\!\left( \widetilde x_c[64t],\ldots,\widetilde x_c[64t+63]; \mathbf s^{\mathrm A}_{c,t} @@ -210,8 +204,7 @@ $$ Band 0 of each surround channel additionally passes through a 21-tap complex FIR: $$ -\widehat X_{c,0,t} -= +\widehat X_{c,0,t}= \sum_{k=0}^{20}h_kX_{c,0,t-k}. $$ @@ -222,8 +215,7 @@ These delays and filter histories are decoder state and cannot be reset independ For each object $o$, subband $b$, and slot $t$, the object's frequency-domain value is a linear combination of the five core channels: $$ -Z_{o,b,t} -= +Z_{o,b,t}= \sum_{c=0}^{4} M_{o,c,b,t}\widehat X_{c,b,t}. $$ @@ -248,8 +240,7 @@ $$ Treat `zone` as 64 complex values and apply an unnormalized 64-point FFT: $$ -F_k -= +F_k= \sum_{n=0}^{63} \operatorname{zone}_n \exp\!\left(-j\frac{2\pi kn}{64}\right). @@ -260,8 +251,7 @@ $$ Define the rotation coefficient $$ -r_k -= +r_k= \frac12\left( \sin\frac{\pi k}{128} +j\cos\frac{\pi k}{128} @@ -277,8 +267,7 @@ $$ Let $\mathcal S$ denote polyphase synthesis with a 640-value synthesis window and cross-slot state: $$ -\mathbf y_{o,t} -= +\mathbf y_{o,t}= \mathcal S\!\left( \mathbf R_{o,t},W,\mathbf s^{\mathrm S}_{o,t} \right). @@ -287,8 +276,7 @@ $$ Object output is $$ -y_o[64t+r] -= +y_o[64t+r]= \operatorname{clip}\!\left( 16\,\mathbf y_{o,t}[r],-1,1 \right)G_{\mathrm{clip}}, @@ -301,8 +289,7 @@ where $r=0\ldots63$. Synthesis state must advance continuously by slot. LFE bypasses the object matrix and inverse QMF and uses a 1217-sample delay. After the input and output scale factors cancel: $$ -y_{\mathrm{LFE}}[n] -= +y_{\mathrm{LFE}}[n]= \operatorname{clip}\!\left( x_{\mathrm{LFE,core}}[n-1217],-1,1 \right). @@ -313,8 +300,7 @@ $$ The lateral and longitudinal grids use $N=62$; the height grid uses $N=15$. The quantizer is $$ -q_N(k) -= +q_N(k)= \min\!\left( 32767, \left\lfloor\frac{32768k}{N}+\frac12\right\rfloor @@ -404,16 +390,14 @@ $$ The two-dimensional point gain is $$ -\mathbf G_{\mathrm{2D}}(u,v) -= +\mathbf G_{\mathrm{2D}}(u,v)= \mathbf h(u)\odot\mathbf v(v). $$ For 5.1-family layouts with one horizontal surround pair rather than separate side and rear pairs, the longitudinal coordinate is $$ -v_{\mathrm{floor}} -= +v_{\mathrm{floor}}= \operatorname{clamp}(2v,0,1). $$ @@ -424,8 +408,7 @@ Other layouts use $v_{\mathrm{floor}}=v$. Three-dimensional layouts compute floor gain $\mathbf G_f$ and height gain $\mathbf G_h$ separately: $$ -\mathbf G_{\mathrm{point}}(u,v,w) -= +\mathbf G_{\mathrm{point}}(u,v,w)= \cos\left(\frac\pi2w\right)\mathbf G_f + \sin\left(\frac\pi2w\right)\mathbf G_h. @@ -450,8 +433,7 @@ $$ Maximum position compensation is $$ -A_{\max} -= +A_{\max}= -\max\left(4.5-1.5H-3F,0\right) \quad\text{dB}. $$ @@ -479,8 +461,7 @@ $$ The object's target-gain vector is $$ -\mathbf G_{\mathrm{target}} -= +\mathbf G_{\mathrm{target}}= G_{\mathrm{object}} G_{\mathrm{pos}} \mathbf G_{\mathrm{point}}. @@ -491,8 +472,7 @@ $$ The coded position of an OAMD update is $$ -s_{\mathrm{coded}} -= +s_{\mathrm{coded}}= s_{\mathrm{frame}} +s_{\mathrm{outer}} +s_{\mathrm{OAMD}} @@ -502,16 +482,15 @@ $$ The theoretical update position on the decoder-output PCM timeline is $$ -s_{\mathrm{theoretical}} -=s_{\mathrm{coded}}+d_{\mathrm{decoder}}, +s_{\mathrm{theoretical}}= +s_{\mathrm{coded}}+d_{\mathrm{decoder}}, \qquad d_{\mathrm{decoder}}=1473. $$ The speaker renderer retains the existing processing-block length $B=32$, so the aligned update point is $$ -\widehat s -= +\widehat s= B\left\lfloor \frac{s_{\mathrm{theoretical}}+B/2-1}{B} \right\rfloor. @@ -522,8 +501,7 @@ Thus, for frame-aligned updates, `align32(1473)=1472`. The 1473 value is the the For ramp duration $D$, the number of blocks is $$ -K -= +K= \left\lfloor \frac{D+B/2-1}{B} \right\rfloor. @@ -550,8 +528,7 @@ If no new metadata update intervenes, this is equivalent to a sample-wise linear For target output channel $c$: $$ -y_c[n] -= +y_c[n]= \delta_{c,\mathrm{LFE}}x_{\mathrm{LFE}}[n] + \sum_{o=1}^{15}x_o[n]g_{o,c}[n]. @@ -560,8 +537,7 @@ $$ Here $$ -\delta_{c,\mathrm{LFE}} -= +\delta_{c,\mathrm{LFE}}= \begin{cases} 1, & c\text{ is the target layout's LFE channel},\\ 0, & \text{otherwise}. @@ -573,8 +549,7 @@ A layout without LFE output does not mix input LFE into other channels. After ob For PCM24 output, quantization is $$ -y_{24}[n] -= +y_{24}[n]= \operatorname{trunc}\left( 8388607\,\operatorname{clip}(y[n],-1,1) \right). diff --git a/docs/math.md b/docs/math.md index 1ed6125..db37f39 100644 --- a/docs/math.md +++ b/docs/math.md @@ -90,8 +90,7 @@ $$ 矩阵系数的去量化值为 $$ -D_{o,d,c,p} -= +D_{o,d,c,p}= \left(Q_{o,d,c,p}-\frac{N_q}{2}\right) \frac{820}{4096(1+q_i)}. $$ @@ -103,8 +102,7 @@ $$ 若 clipgain 字段由整数 $x$ 和尾数 $y$ 组成,则 $$ -G_{\mathrm{clip}} -= +G_{\mathrm{clip}}= 1+\frac{y}{32}2^{x-4}. $$ @@ -150,8 +148,7 @@ $$ $$ $$ -M_{o,c,b,t} -= +M_{o,c,b,t}= (1-\alpha_t)P_{o,c,b} +\alpha_tD_{o,c,p(b)}. $$ @@ -179,8 +176,7 @@ $$ 令 $\mathcal A_b$ 表示带 polyphase 历史状态的 64-band analysis-QMF 算子,则 $$ -X_{c,b,t} -= +X_{c,b,t}= \mathcal A_b\!\left( \widetilde x_c[64t],\ldots,\widetilde x_c[64t+63]; \mathbf s^{\mathrm A}_{c,t} @@ -208,8 +204,7 @@ $$ 环绕声道的 band 0 还经过 21-tap 复 FIR: $$ -\widehat X_{c,0,t} -= +\widehat X_{c,0,t}= \sum_{k=0}^{20}h_kX_{c,0,t-k}. $$ @@ -220,8 +215,7 @@ $$ 对每个对象 $o$、子带 $b$ 和时槽 $t$,对象频域值为五个核心声道的线性组合: $$ -Z_{o,b,t} -= +Z_{o,b,t}= \sum_{c=0}^{4} M_{o,c,b,t}\widehat X_{c,b,t}. $$ @@ -246,8 +240,7 @@ $$ 把 `zone` 重新视为 64 个复数后执行未归一化 64 点 FFT: $$ -F_k -= +F_k= \sum_{n=0}^{63} \operatorname{zone}_n \exp\!\left(-j\frac{2\pi kn}{64}\right). @@ -258,8 +251,7 @@ $$ 定义旋转系数 $$ -r_k -= +r_k= \frac12\left( \sin\frac{\pi k}{128} +j\cos\frac{\pi k}{128} @@ -275,8 +267,7 @@ $$ 令 $\mathcal S$ 表示带 640 项 synthesis window 和跨时槽状态的 polyphase 合成算子: $$ -\mathbf y_{o,t} -= +\mathbf y_{o,t}= \mathcal S\!\left( \mathbf R_{o,t},W,\mathbf s^{\mathrm S}_{o,t} \right). @@ -285,8 +276,7 @@ $$ 对象输出为 $$ -y_o[64t+r] -= +y_o[64t+r]= \operatorname{clip}\!\left( 16\,\mathbf y_{o,t}[r],-1,1 \right)G_{\mathrm{clip}}, @@ -299,8 +289,7 @@ $$ LFE 不经过对象矩阵或 inverse QMF,而是使用 1217-sample 延迟。输入与输出端的比例因子抵消后: $$ -y_{\mathrm{LFE}}[n] -= +y_{\mathrm{LFE}}[n]= \operatorname{clip}\!\left( x_{\mathrm{LFE,core}}[n-1217],-1,1 \right). @@ -311,8 +300,7 @@ $$ 横向和纵向网格使用 $N=62$,高度网格使用 $N=15$。量化函数为 $$ -q_N(k) -= +q_N(k)= \min\!\left( 32767, \left\lfloor\frac{32768k}{N}+\frac12\right\rfloor @@ -402,16 +390,14 @@ $$ 二维点增益为 $$ -\mathbf G_{\mathrm{2D}}(u,v) -= +\mathbf G_{\mathrm{2D}}(u,v)= \mathbf h(u)\odot\mathbf v(v). $$ 对于只有一对水平环绕、没有独立 side/rear 两对的 5.1 系列布局,纵向坐标使用 $$ -v_{\mathrm{floor}} -= +v_{\mathrm{floor}}= \operatorname{clamp}(2v,0,1). $$ @@ -422,8 +408,7 @@ $$ 三维布局分别计算地面层增益 $\mathbf G_f$ 和高度层增益 $\mathbf G_h$: $$ -\mathbf G_{\mathrm{point}}(u,v,w) -= +\mathbf G_{\mathrm{point}}(u,v,w)= \cos\left(\frac\pi2w\right)\mathbf G_f + \sin\left(\frac\pi2w\right)\mathbf G_h. @@ -448,8 +433,7 @@ $$ 最大位置补偿为 $$ -A_{\max} -= +A_{\max}= -\max\left(4.5-1.5H-3F,0\right) \quad\text{dB}. $$ @@ -477,8 +461,7 @@ $$ 对象的目标增益向量为 $$ -\mathbf G_{\mathrm{target}} -= +\mathbf G_{\mathrm{target}}= G_{\mathrm{object}} G_{\mathrm{pos}} \mathbf G_{\mathrm{point}}. @@ -489,8 +472,7 @@ $$ OAMD 更新的编码位置为 $$ -s_{\mathrm{coded}} -= +s_{\mathrm{coded}}= s_{\mathrm{frame}} +s_{\mathrm{outer}} +s_{\mathrm{OAMD}} @@ -500,16 +482,15 @@ $$ decoder 输出 PCM timeline 上的理论更新位置为 $$ -s_{\mathrm{theoretical}} -=s_{\mathrm{coded}}+d_{\mathrm{decoder}}, +s_{\mathrm{theoretical}}= +s_{\mathrm{coded}}+d_{\mathrm{decoder}}, \qquad d_{\mathrm{decoder}}=1473. $$ 扬声器 renderer 保留现有的处理块长度 $B=32$,更新点对齐为 $$ -\widehat s -= +\widehat s= B\left\lfloor \frac{s_{\mathrm{theoretical}}+B/2-1}{B} \right\rfloor. @@ -520,8 +501,7 @@ $$ 给定 ramp duration $D$,block 数为 $$ -K -= +K= \left\lfloor \frac{D+B/2-1}{B} \right\rfloor. @@ -548,8 +528,7 @@ $$ 对目标输出声道 $c$: $$ -y_c[n] -= +y_c[n]= \delta_{c,\mathrm{LFE}}x_{\mathrm{LFE}}[n] + \sum_{o=1}^{15}x_o[n]g_{o,c}[n]. @@ -558,8 +537,7 @@ $$ 其中 $$ -\delta_{c,\mathrm{LFE}} -= +\delta_{c,\mathrm{LFE}}= \begin{cases} 1, & c\text{ 为目标布局的 LFE},\\ 0, & \text{其他声道}. @@ -571,8 +549,7 @@ $$ 若输出 PCM24,量化关系为 $$ -y_{24}[n] -= +y_{24}[n]= \operatorname{trunc}\left( 8388607\,\operatorname{clip}(y[n],-1,1) \right).