VideoFormat struct
#include <Jazz2/VideoFormat.h>
Layout of the game's own cinematic format.
The original .j2v videos store four interleaved zlib streams, and inflating them costs more than a frame's entire budget on the weakest platforms (measured at 55-115 ms per frame on the Dreamcast, against 42 ms available). This format keeps the same idea - 8-bit indexed frames encoded as changes against the previous one - but replaces the entropy coding with a byte-oriented codec whose decoder is nothing but memcpy and memset over a reused frame buffer.
A file starts with the same signature and type/version fields every other file the game writes uses, followed by a fixed header, an extension area that older players skip, and then one payload per frame. Files are identified by their signature, so the player accepts both this and the original format.
Public static variables
-
static std::
uint64_t Signature constexpr - Signature shared by all files the game writes.
-
static std::
uint16_t CurrentVersion constexpr - Version this build writes, and the highest it can read.
-
static std::
uint8_t PixelFormatIndexed8 constexpr - 8 bits per pixel through a 256 entry palette
-
static std::
uint8_t CodecDeltaRle constexpr - Per-frame changes as skip/literal/run commands (see VideoFormat).
-
static std::
uint8_t FrameFlagPalette constexpr - Set in a frame's flag byte when a palette precedes its commands.
-
static std::
uint8_t CommandLiteralMax constexpr 0x00-0x7F: copy this many + 1 bytes from the payload-
static std::
uint8_t CommandRunBase constexpr 0x80-0xBF: repeat the following byte this many -0x80+ 3 times-
static std::
uint8_t CommandRunMax constexpr -
static std::
uint8_t CommandRunMinLength constexpr -
static std::
uint8_t CommandSkipBase constexpr 0xC0-0xDF: leave this many -0xC0+ 1 bytes of the previous frame in place-
static std::
uint8_t CommandSkipMax constexpr -
static std::
uint8_t CommandSkipLong constexpr 0xE0: skip a 16-bit count-
static std::
uint8_t CommandLiteralLong constexpr 0xE1: copy a 16-bit count of bytes-
static std::
uint8_t CommandRunLong constexpr 0xE2: repeat one byte a 16-bit number of times-
static std::
uint8_t CommandEndOfFrame constexpr 0xFF: no more commands for this frame-
static std::
int32_t MaxShortSkip constexpr - Longest span a single-byte skip command can express.
-
static std::
int32_t MaxShortLiteral constexpr - Longest span a single-byte literal command can express.
-
static std::
int32_t MaxShortRun constexpr - Longest run a single-byte run command can express.