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
+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