ws-cleanup: audio codecs out of the format folders (codecs/audio/Opus, Vorbis, Flac, Mpa)
The decoders / encoders are libraries, not the file format: audio/opus/{Celt, CeltTables, CeltEncoder, Mdct, Packet,
Silk, SilkTables, Decoder} -> codecs/audio/Opus; audio/vorbis/{Codebook, Packet, Setup, Tables} ->
codecs/audio/Vorbis; audio/flac/{Frame, Encode} -> codecs/audio/Flac; audio/mp3/{Core, Tables, Header, Encode2,
Encode3, EncTables, Analysis} -> codecs/audio/Mpa (tools/move.py; code unchanged). Each gets an index init.luau.
The format folders keep the file mapping: Ogg Opus / Ogg Vorbis (headers, granules, seeking, the Vorbis encoder's
Ogg writer), native / Ogg FLAC streams and metadata, ID3 / Xing / the MP3 frame index. docs: STYLE says a codec is
not the format. Full suite: 248 runs pass on both runtimes, lint green.
This commit is contained in:
1 parent
f5cf02026d
commit
9941113b7b
39 files changed
+146
-82
No files matched your search
@@ -88,12 +88,16 @@ Codecs (layer 3, shared by formats; not loadable on their own), by domain:
|
||||
- **audio**
|
||||
- codecs/audio/Aac: AAC-LC decoder (ISO/IEC 14496-3 subpart 4, ISO/IEC 13818-7): the AudioSpecificConfig (with a program
|
||||
- codecs/audio/Alac: Apple Lossless (ALAC) decoder and encoder, the codec inside m4a / mov / caf. A codec (layer 1).
|
||||
- codecs/audio/Flac: FLAC frames without the container: frame header parsing, subframe decoding (constant, verbatim,
|
||||
- codecs/audio/Mdct: the MDCT / IMDCT of any window length N divisible by 4 (N / 2 coefficients), through an N / 4-point
|
||||
- codecs/audio/Mpa: MPEG audio layers I / II / III (ISO/IEC 11172-3, 13818-3, MPEG-2.5) without the file around it:
|
||||
- codecs/audio/Opus: the Opus codec (RFC 6716) without its container: TOC / packet framing (Packet), the SILK and CELT
|
||||
- codecs/audio/Pcm: PCM plumbing shared by audio formats: raw sample formats, streaming Decoders, encoder input sources.
|
||||
- codecs/audio/Resample: audio sample-rate conversion by band-limited (Kaiser-windowed sinc) interpolation, streaming or
|
||||
- codecs/audio/SoundFont: SoundFont 2 banks and the sample synth that plays MIDI through them. A codec (layer 1) shared by
|
||||
- codecs/audio/Stream: the streaming Decoder (Types.Decoder: read / seek / position) over a packetised codec, the part
|
||||
- codecs/audio/Tracker: the shared tracker engine behind music/mod, music/s3m, music/xm and music/it. The four loaders read
|
||||
- codecs/audio/Vorbis: the Vorbis I decoder without its container: identification / comment / setup headers (Setup),
|
||||
- codecs/audio/VorbisComment: Vorbis comment fields ("KEY=value", the tag block of Vorbis, Opus and FLAC) <-> Types.Tags.
|
||||
- **compress**
|
||||
- codecs/compress/Brotli: Brotli (RFC 7932) decompression. A codec (layer 3): archive/br and font/woff2 build on it. Written
|
||||
|
||||
+5
-2
@@ -27,7 +27,7 @@ src/Formats/
|
||||
codecs/<domain>/<Name> codecs (layer 3) generic algorithms, by domain:
|
||||
compress/ Deflate Lzma Zstd Brotli Bzip2 Lzw entropy/ Huffman RangeCoder
|
||||
image/ Jpeg Dct Vp8 Vp8L Pixels Yuv Quantize Raster Blend
|
||||
audio/ Pcm Stream Resample Mdct Aac Alac VorbisComment Tracker SoundFont
|
||||
audio/ Opus Vorbis Flac Mpa Aac Alac Mdct Pcm Stream Resample VorbisComment Tracker SoundFont
|
||||
video/ H264 Mpeg1 Video (the video codec registry) text/ Json Xml Text Url
|
||||
font/ TrueType Cff model/ Mat4 MeshFlatten
|
||||
host/ host (layer 2) runtime adapters; only the api uses them
|
||||
@@ -183,7 +183,10 @@ A Luau error unwinding through a native frame crashes Roblox Studio, even inside
|
||||
## 2a. What belongs in a format folder
|
||||
|
||||
A format folder holds only what is specific to the format: its header / chunk parsing, the mapping to and from the
|
||||
standard type, its writer, and hot loops nothing else shares. Anything generic goes down a layer and is called:
|
||||
standard type, its writer, and hot loops nothing else shares. A codec is not the format: the Opus, Vorbis, FLAC and
|
||||
MPEG audio decoders / encoders live in `codecs/audio/` (audio/opus is Ogg Opus around `codecs/audio/Opus`), as JPEG,
|
||||
VP8 / VP8L, H.264 and MPEG-1 live in `codecs/image/` / `codecs/video/`, so containers and other formats can reach
|
||||
them. Anything generic goes down a layer and is called:
|
||||
|
||||
| Need | Use |
|
||||
|---|---|
|
||||
|
||||
Reference in new issue
Block a user