audio perf: Ogg page CRC slice-by-4, Opus comb filter index offsets
This commit is contained in:
1 parent
5e71837637
commit
738b881349
2 files changed
+28
-7
No files matched your search
@@ -1433,14 +1433,16 @@ local function combFilter(mem: { number }, base: number, T0: number, T1: number,
|
||||
overlap = 0
|
||||
end
|
||||
local i = 0
|
||||
local d1 = 2 - T1
|
||||
while i < overlap do
|
||||
local p = base + i
|
||||
local x0 = mem[p - T1 + 2]
|
||||
local x0 = mem[p + d1]
|
||||
local w = WINDOW[i + 1]
|
||||
local f = w * w
|
||||
local of = 1 - f
|
||||
mem[p] = mem[p] + (of * g00) * mem[p - T0] + (of * g01) * (mem[p - T0 + 1] + mem[p - T0 - 1])
|
||||
+ (of * g02) * (mem[p - T0 + 2] + mem[p - T0 - 2]) + (f * g10) * x2 + (f * g11) * (x1 + x3)
|
||||
local t = p - T0
|
||||
mem[p] = mem[p] + (of * g00) * mem[t] + (of * g01) * (mem[t + 1] + mem[t - 1])
|
||||
+ (of * g02) * (mem[t + 2] + mem[t - 2]) + (f * g10) * x2 + (f * g11) * (x1 + x3)
|
||||
+ (f * g12) * (x0 + x4)
|
||||
x4 = x3
|
||||
x3 = x2
|
||||
@@ -1458,7 +1460,7 @@ local function combFilter(mem: { number }, base: number, T0: number, T1: number,
|
||||
x2 = mem[p - T1]
|
||||
x1 = mem[p - T1 + 1]
|
||||
for q = p, base + N - 1 do
|
||||
local x0 = mem[q - T1 + 2]
|
||||
local x0 = mem[q + d1]
|
||||
mem[q] = mem[q] + g10 * x2 + g11 * (x1 + x3) + g12 * (x0 + x4)
|
||||
x4 = x3
|
||||
x3 = x2
|
||||
|
||||
Reference in new issue
Block a user