codecs/audio: comments to specs only
This commit is contained in:
1 parent
0bd7b87d2b
commit
6dcce481bb
69 files changed
+523
-1604
No files matched your search
@@ -1,10 +1,8 @@
|
||||
--!strict
|
||||
-- codecs/audio/Musepack/Tables: the Musepack SV7 / SV8 Huffman tables, the synthesis window and the requantisation
|
||||
-- constants. Ported from libmpcdec (musepack_src_r475: huffman.c, synth_filter.c, requant.c, mpc_bits_reader.c;
|
||||
-- BSD-3-Clause, (c) The Musepack Development Team, licenses/libmpcdec-BSD.txt); the tables are transcribed by script.
|
||||
-- Each Huffman table is a flat { code, length, value, ... } list sorted by descending left-aligned 16-bit code;
|
||||
-- canonical (SV8) tables map value - (code >> (16 - length)) through their symbol list. lut(table, sym?) builds the
|
||||
-- 8-bit first-level lookup the decoder uses.
|
||||
-- codecs/audio/Musepack/Tables: the Musepack SV7 / SV8 Huffman tables, synthesis window and requantisation constants.
|
||||
-- Ported from libmpcdec (musepack_src_r475: huffman.c, synth_filter.c, requant.c, mpc_bits_reader.c; BSD-3-Clause,
|
||||
-- (c) The Musepack Development Team, licenses/libmpcdec-BSD.txt). Huffman tables: flat { code, length, value, ... }
|
||||
-- sorted by descending left-aligned 16-bit code; canonical (SV8) tables map value - (code >> (16 - length)).
|
||||
local T = {}
|
||||
|
||||
T.HuffHdr = {
|
||||
@@ -332,15 +330,14 @@ do
|
||||
end
|
||||
|
||||
export type Lut = {
|
||||
len: { number }, -- 256 entries: code length when the 8-bit prefix decides the symbol, else 0
|
||||
val: { number }, -- the symbol, or the 1-based table entry to scan from
|
||||
len: { number },
|
||||
val: { number },
|
||||
codes: { number },
|
||||
lens: { number },
|
||||
vals: { number },
|
||||
sym: { number }?,
|
||||
}
|
||||
|
||||
-- lut(table, sym?) -> Lut
|
||||
function T.lut(tab: { number }, sym: { number }?): Lut
|
||||
local codes, lens, vals = {}, {}, {}
|
||||
for i = 1, #tab, 3 do
|
||||
|
||||
Reference in new issue
Block a user