Commit Graph
22 Commits
Author SHA1 Message Date
4DBug c420eab820 ws-polish: Flash ADPCM (FLV SoundFormat 1) decodes through codecs/audio/Adpcm.swf
Adpcm.swf / swfFrames: the SWF ADPCM bit stream (2..5-bit codes, 4096-frame blocks), bit-exact with
ffmpeg's adpcm_swf (mono and stereo FLV fixtures). containers/AudioWrap decodes adpcm_swf tracks into a
float WAV, so FLV audio opens through the api hook.
2026-10-31 17:10:51 -05:00
4DBug da743e2fb8 merge master (ws/video2: MPEG-2, Theora, legacy codecs) into ws/video2-flv 2026-10-31 15:35:03 -05:00
4DBug 9694c652ec merge ws/video2-legacy (FLIC, Cinepak, MSV1, QT RLE / SMC, Smacker; video/fli, video/smk) 2026-10-31 15:23:13 -05:00
4DBug 77479b6a2f merge ws/video2-theora (Theora codec, ogv) 2026-10-31 15:22:40 -05:00
4DBug f23d0aa3e8 ws-video2-flv: FLV writer test from ADTS AAC (MPEG-TS), bench lines (H.263 / Sorenson CIF fps), docs/guide/video.md FLV and H.263 section (inputs: tools/fixtures/docs_flv.py) 2026-10-31 15:13:14 -05:00
4DBug efc0812746 ws-video2-flv: video/flv (FLV demux: tags, onMetaData AMF0, Sorenson / H.264 (avcC, composition times) / VP6 / screen video / enhanced FourCC tracks, MP3 / AAC / PCM / G.711 / ADPCM / Nellymoser / Speex audio, keyframe seek; FLV mux: H.264 / Sorenson / VP6 / screen copied, AAC (ADTS re-framed) / MP3 / PCM audio, onMetaData)
Outside the folder: codecs/video/Video BUILTIN gains known (decoder-less) entries vp6f, vp6a, flashsv, flashsv2.
2026-10-31 15:09:20 -05:00
4DBug bf639260e4 video/smk: Smacker (SMK2 / SMK4) with its video codec and audio
containers into containers/Demux (palette updates ride on each video packet as packet.palette); the Smacker video
codec (header Huffman trees with the escape cache, MONO / FULL (+ SMK4 doubled modes) / SKIP / FILL blocks) lives in
codecs/video/Legacy/Smacker and registers as 'smackvid'; Smacker's packed DPCM-Huffman audio (8 / 16-bit, mono /
stereo) and raw PCM tracks decode in video/smk/Audio, the Decoder built by the format over codecs/audio/Stream
(Smk.openAudio; open() installs it as the openAudio hook). Fixtures encoded by tools/fixtures/smk.py: video and
audio bit-exact with ffmpeg.
2026-10-31 14:37:39 -05:00
4DBug 22db57f348 ws-video2: MPEG-2 in MPEG-TS (0x02 / private 0x80), MPEG-PS, MKV, AVI, MP4 caps; tests/video/mpeg2.luau 2026-10-31 14:28:11 -05:00
4DBug a1d2e7218c video/fli: FLI / FLC / FLX animations (read)
Header (FLI 1/70 s, FLC ms, depths 8 / 15 / 16 / 24), frame chunks into containers/Demux, open() through the
registry's flic decoder (codecs/video/Legacy/Flic); the ring frame is dropped unless opts.ringFrame. Fixtures
encoded by tools/fixtures/fli.py (every chunk type) with ffmpeg's decode as the reference: bit-exact.
2026-10-31 14:24:29 -05:00
4DBug 4dcb005180 ws-video2-theora: video/ogv, Ogg video (Theora + Vorbis / Opus / FLAC)
Demuxes every logical stream of the first Ogg group into containers/Demux:
Theora (frame times from granules, Xiph-laced headers as track.config, comment
tags in meta.tags), Vorbis / Opus / FLAC audio (headers in track.config) for the
api's openAudio hook; open = Video.open. Sniff claims only Ogg files with a Theora
BOS page. encode remuxes Theora (+ Vorbis / Opus pages from AudioWrap, interleaved
by time). codecs/video/Theora gains info / comment helpers.
2026-10-31 14:22:39 -05:00
4DBug 6274eedd12 ws-apifix: MP4 AAC length matches ffmpeg: the edit list's length (Track.playDuration) cuts the end padding as well as the priming (codecDelay); a 1 s clip decodes to 44100 frames, not 45056. AudioWrap.trim(dec, skip, length?); the MP4 writer keeps the edit length of copied audio. Video tests compare the whole decoded audio length with ffmpeg (not yet for Matroska) 2026-10-31 14:13:08 -05:00
4DBug d73b93c740 ws-apifix: videos save as animated images (F.save(video, gif | apng | webp), F.convert(avi, "gif"): frames / fps / maxFrames (300) / maxPixels (2^25)); VideoFrame.index restarts at the seek position; F.detect names WebM files "webm"
api: encoderFor finds image formats for a VideoDecoder, videoToImage() collects the frames; F.detect asks a
format's optional variant(r) for a more precise name (video/mkv: Mkv.variant, from Parse.docType).
codecs/video/Video: index after seek = round(pts * frameRate) + 1.
2026-10-31 14:00:36 -05:00
4DBug 51b08575c4 ws-cleanup: codecs/ grouped by domain; containers/Chunks, codecs/audio/Stream, codecs/image/Pixels, codecs/model/Mat4
C2, the hierarchy (tools/move.py, every reference rewritten mechanically):
- codecs/compress: Deflate Lzma Zstd Brotli Bzip2 Lzw; codecs/entropy: Huffman (from core) RangeCoder;
  codecs/image: Jpeg Dct Vp8 Vp8L Yuv Quantize Raster Blend Pixels; codecs/audio: Mdct Aac Alac Pcm Resample
  VorbisComment Tracker SoundFont Stream; codecs/video: H264 Mpeg1 Video; codecs/text: Json Xml Text Url;
  codecs/font: TrueType Cff; codecs/model: MeshFlatten Mat4. containers/ stays flat; core/ keeps Bytes Bits Err
  Crc32 Adler32 Base64 Md5 Input Sniff.
- LAYERS lint: codecs must sit in a domain folder; gen_registry lists codecs by domain (docs/FORMATS.md).
- Checked: build.py both targets, rojo build of build/roblox, the full suite on both runtimes.

C3, generic code out of format folders:
- containers/Chunks (new): the chunked-file walker (RIFF / RIFX / IFF / PNG / CAF layouts: endianness, size first,
  trailer, padding, lenient missing pad, open-ended ids, size hooks). containers/Riff walks with it (RF64 ds64
  through the resize hook); image/png, audio/aiff and audio/caf list their chunk handlers over it.
- codecs/audio/Stream (new): Stream.packets, the packet-decoder Decoder (read / seek with pre-roll / position,
  priming and end trimming) that aac, caf and m4a each carried (~70 lines each).
- codecs/image/Pixels: image/bmp/Pixels promoted (+ rgb555); image/ico's DIB decoder uses its row loops instead of
  its own (the AND mask / alpha rule stay ICO's).
- codecs/model/Mat4 (new): matrices / quaternions / TRS shared by FBX (Xform keeps only the FBX transform model),
  Collada (Math keeps only <lookat> / <skew>) and USD (its matrix helpers and general 4x4 inverse); Mat4.mul is
  Types.Scene.mul. The Collada normal matrix is now the inverse transpose (it was the inverse; same result for the
  fixtures' bind shapes).
- README rewritten (install for Rojo and LÖVE / LuaJIT, quick start per category, F.* and F.ops, host notes:
  FORMATS_NO_JIT_TUNE, paths, layout); docs/STYLE.md: the codec domains, "what belongs in a format folder" with the
  shared building blocks and the DUP rule, conventions (WAVE order, lower-case tags, loops, the api hooks
  decodeImage / encodeImage / openAudio / plugins / resolve, the codecs/video/Video registry), Err.from, the type
  baseline. New tests: tests/containers/chunks, tests/codecs/mat4. Type baseline 93.
2026-10-31 12:25:03 -05:00
4DBug 7271e6e3fa ws-h264: F.video.open end to end on MP4 / MKV / TS / AVI / raw H.264 (bit-exact vs ffmpeg), display-order pts from the sorted packet times; JVT conformance test (48 streams bit-exact vs JM yuv, 4 refused); video/mp4 writer: a video edit list plays every frame (the B-frame delay no longer cut 2 frames off the end); tests tune LuaJIT through host 2026-10-31 10:53:34 -05:00
4DBug 93a7f44ce0 ws-video: VP8 checks are strict now (inter frames merged); writer fixtures include the VP8 re-encodes 2026-10-31 10:06:25 -05:00
4DBug 33318c8b73 ws-video: animated WebP through F.video.open checked against Pillow's canvases 2026-10-31 10:05:40 -05:00
4DBug f2a4a33713 ws-video: video/mp4 (MP4 / MOV / 3GP on containers/IsoBmff: edit lists, fragments, dOps -> OpusHead, PCM entries, AAC priming as codec delay; writer: copied H.264 / HEVC / AV1 / MJPEG / AAC / ALAC / Opus / FLAC / MP3, MJPEG from frames, PCM in MOV, edit lists for B-frame / codec delays); IsoBmff Mux writes no empty DecoderSpecificInfo (ffmpeg refuses it); writer checks extended to MP4 / MOV / H.264 remux 2026-10-31 10:02:25 -05:00
4DBug 8d2deb13ab ws-video: writers checked by ffprobe / ffmpeg (tools/fixtures/videoenc.py + _video_encode.luau, tests/video/encode.luau); constant-rate output for AVI / Y4M shared in Source.constantRate (uneven GIF delays repeat frames) 2026-10-31 09:59:16 -05:00
4DBug 242ba7e5dc ws-video: Vorbis granules from the block sizes (exact Ogg pages for Matroska Vorbis), ADTS AAC from TS passed through, audio checks read until filled 2026-10-31 09:53:16 -05:00
4DBug aa4963dc27 ws-video: video/mpegts (containers/MpegTs absorbed from mpegts-luau 6e16197, its unit queue fixed for LuaJIT; M2TS, resync before the first packet, private stream types by PES id), video/mpegps (containers/MpegPs: MPEG-1 / MPEG-2 packs, PSM, private stream 1; pictures cut from the joined ES, PTS from PES / GOP temporal references; raw .m1v), containers/MpegEs; tests vs ffprobe / ffmpeg 2026-10-31 09:50:42 -05:00
4DBug a2763bee35 ws-video: video/avi tests (OpenDML / idx1 / scan, PCM / ADPCM / MP2 audio, raw RGB / I420, mux round trip), video/y4m tests (every C tag, 10-bit, writer), empty audio chunks are padding 2026-10-31 09:45:10 -05:00
4DBug 3ae152ac81 ws-video: video/mkv tests (ffprobe packets, ffmpeg audio, lacing / zlib / unknown clusters / subtitles, WebM remux), zlib content compression, codec-delay trimming of non-Opus audio (AudioWrap.trim), video/y4m, containers/Avi + video/avi (WIP tests) 2026-10-31 09:41:22 -05:00