EVA

From MultimediaWiki
Jump to navigation Jump to search

EVA is a family of formats created by T.Yamamoto. They employ RLE for video compression.

EVA3 header format

 4 bytes  - "EVA3"
 1+ bytes - comment ending with 0x1A byte
 2 bytes  - number of frames
 1 byte   - frames per second
 1 byte   - unused

Frames are stored as raw 2-bit 96x92 images.

EVA4 header format

 4 bytes  - "EVA4"
 1+ bytes - comment ending with 0x1A byte
 2 bytes  - number of frames
 1 byte   - frames per second
 1 byte   - unused

Frame format is hardcoded to 2-bit 96x92.

Each frame is preceded by 16-bit frame size.

EVA5 header format

 4 bytes  - "EVA5"
 1+ bytes - comment ending with 0x1A byte
 2 bytes  - number of frames
 2 bytes  - width
 2 bytes  - height
 1 byte   - colour depth (usually 2-bit)
 1 byte   - frames per second
 1 byte   - bits per audio sample (0 - 8bps, 1 - 4bps)
 2 bytes  - sampling frequency
 2 bytes  - audio block size
 1 byte   - unused

Each frame is preceded by audio block bytes and 16-bit frame size.

Video compression

EVA4 and EVA5 use the following opcodes:

  • 00sssccc -- skip sss bytes, copy ccc bytes
  • 01ssssss -- skip ssssss bytes
  • 10cccccc -- copy cccccc bytes
  • 11sssrrr -- skip sss bytes, repeat the next byte rrr times