From 56d0b852e70e1d2b36a792447e041e4e298bdd32 Mon Sep 17 00:00:00 2001 From: TheM14 Date: Wed, 28 Oct 2026 19:19:32 +0800 Subject: [PATCH] Align the math notes with the QMF-domain implementation --- docs/math.en.md | 23 +++++++++++++++-------- docs/math.md | 17 ++++++++++++----- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/docs/math.en.md b/docs/math.en.md index 29ba5b8..60ded1d 100644 --- a/docs/math.en.md +++ b/docs/math.en.md @@ -216,7 +216,7 @@ When a frame contains two data points, `offset_ts` gives the segment boundary. E ## 4. Analysis QMF for core PCM -The matrix input uses core channels L, R, C, Ls, and Rs; LFE follows a separate path. Core PCM is first scaled as +The matrix input uses $N$ core channels ($N\in\{5,7\}$, read from $joc\_dmx\_config\_idx$: $k=0\ldots4$ maps to $N=5,7,7,5,7$); LFE follows a separate path. Core PCM is first scaled as $$ \widetilde x_c[n]=\frac{x_c[n]}{16}. @@ -236,10 +236,16 @@ This consists of the analysis window/polyphase stage, modulation, a 64-point FFT ## 5. QMF-domain processing of core channels -$k$ selects the core channel count $N\in\{5,7\}$ ($k=0\ldots4$ maps to $N=5,7,7,5,7$) and the -phase switch $\sigma(k)=1\iff k\in\{3,4\}$. Every core channel is delayed by ten QMF slots -before entering the object matrix; the $-j$ rotation ($b>0$) and the band-0 21-tap complex FIR -are both gated by that same switch and applied to Ls and Rs only: +L, R, and C are delayed by ten QMF slots before entering the object matrix: + +$$ +\widehat X_{c,b,t}=X_{c,b,t-10}, +\qquad c\in\{L,R,C\}. +$$ + +Ls and Rs take the same delay inside the surround path, whose delay line advances +regardless; the $-j$ rotation for $b>0$ and the band-0 21-tap complex FIR are gated by +the **same switch** $\sigma(k)=1\iff k\in\{3,4\}$: $$ \widehat X_{c,b,t}= @@ -250,9 +256,10 @@ X_{c,b,t-10}, & \text{otherwise}. \end{cases} $$ -For $N=7$ the sixth and seventh core channels (Lb/Rb or Tfl/Tfr) behave like the front channels -and only take the ten-slot delay: channel identity affects metadata and rendering, not the DSP. -These delays and filter histories are decoder state and cannot be reset independently for every frame. +For $N=7$ the sixth and seventh core channels (Lb/Rb or Tfl/Tfr) behave like the front +channels and only take the ten-slot delay: channel identity affects metadata and rendering, +not the DSP. These delays and filter histories are decoder state and cannot be reset +independently for every frame. ## 6. Object matrix diff --git a/docs/math.md b/docs/math.md index fc9a2ec..fbf3763 100644 --- a/docs/math.md +++ b/docs/math.md @@ -214,7 +214,8 @@ $$ ## 4. 核心 PCM 的 analysis QMF -矩阵输入使用核心声道 L、R、C、Ls、Rs;LFE 走独立路径。核心 PCM 先缩放为 +矩阵输入使用 $N$ 个核心声道($N\in\{5,7\}$,由 $joc\_dmx\_config\_idx$ 查表得到, +$k=0\ldots4$ 对应 $N=5,7,7,5,7$);LFE 走独立路径。核心 PCM 先缩放为 $$ \widetilde x_c[n]=\frac{x_c[n]}{16}. @@ -234,9 +235,15 @@ $$ ## 5. 核心声道的 QMF 域处理 -$k$ 决定核心通道数 $N\in\{5,7\}$($k=0\ldots4$ 对应 $N=5,7,7,5,7$)与相位开关 -$\sigma(k)=1\iff k\in\{3,4\}$。所有核心声道在进入对象矩阵前延迟 10 个 QMF 时槽; -$-j$ 旋转($b>0$)与 band-0 的 21-tap 复 FIR **由同一个开关**只作用于 Ls、Rs: +L、R、C 在进入对象矩阵前延迟 10 个 QMF 时槽: + +$$ +\widehat X_{c,b,t}=X_{c,b,t-10}, +\qquad c\in\{L,R,C\}. +$$ + +Ls、Rs 的 10 时槽延迟在环绕通路内完成,延迟线照常推进;$b>0$ 的 $-j$ 旋转与 band-0 的 +21-tap 复 FIR 由**同一个开关** $\sigma(k)=1\iff k\in\{3,4\}$ 门控: $$ \widehat X_{c,b,t}= @@ -247,7 +254,7 @@ X_{c,b,t-10}, & \text{其他情况}. \end{cases} $$ -$N=7$ 时第 6、7 个核心通道(Lb/Rb 或 Tfl/Tfr)与前级相同,只做 10 时槽延迟: +$N=7$ 时第 6、7 个核心声道(Lb/Rb 或 Tfl/Tfr)与前级相同,只做 10 时槽延迟: 通道身份只影响元数据与渲染,不进入 DSP。这些延迟和滤波历史属于解码状态, 不能按帧独立清零。