Interest in a custom FMV format?
Posted: Fri Feb 01, 2019 7:35 pm
Since I just got my hands on a SegaCD this past Tuesday I got a little curious and started diving into the inner workings of FMV.
The product of this has been some tinkering with vector quantization / codebook compression techniques similar to what is used in the Sega Cinepak format.
This is what I have now. It compresses single frames of 256x160 into a single palette row of 16 colors (it assumes it can use color 0 since it can also set the VDP's background color to that), optionally bayer-dithered, and split into cells of 8x8 where each cell can either be compressed with 4x2 blocks, 2x2 blocks, or uncompressed. There can be up to 256 4x2 blocks and up to 256 2x2 blocks. Kinda want to experiment with splitting palettes on individual tiles, but I get the feeling this would very much complicate the codebook generation / quantization step, and despite some hefty optimizations (shy of attempting to SIMD optimize it) it already takes a pretty long time to encode a frame (about 10 ish seconds right now) :T
Results with a few different images:
I guess at some level the format would work almost identically to Sega Cinepak, but I get the benefit of being able to document my format way better and also being able to write modern conversion tools for it (ideally I'd like to make a one-stop commandline utility that could, say, convert MP4s directly into the format)
Don't suppose there'd be any interest in sharing this work as I go along? Originally just intended as a hobby project but wondered if somebody'd find it useful.
The product of this has been some tinkering with vector quantization / codebook compression techniques similar to what is used in the Sega Cinepak format.
This is what I have now. It compresses single frames of 256x160 into a single palette row of 16 colors (it assumes it can use color 0 since it can also set the VDP's background color to that), optionally bayer-dithered, and split into cells of 8x8 where each cell can either be compressed with 4x2 blocks, 2x2 blocks, or uncompressed. There can be up to 256 4x2 blocks and up to 256 2x2 blocks. Kinda want to experiment with splitting palettes on individual tiles, but I get the feeling this would very much complicate the codebook generation / quantization step, and despite some hefty optimizations (shy of attempting to SIMD optimize it) it already takes a pretty long time to encode a frame (about 10 ish seconds right now) :T
Results with a few different images:
I guess at some level the format would work almost identically to Sega Cinepak, but I get the benefit of being able to document my format way better and also being able to write modern conversion tools for it (ideally I'd like to make a one-stop commandline utility that could, say, convert MP4s directly into the format)
Don't suppose there'd be any interest in sharing this work as I go along? Originally just intended as a hobby project but wondered if somebody'd find it useful.