Looking at Digital Pictures video format(s)

Since OSQ format requires obtaining a copy of some expensive software of unknown old version, I’ll leave it to somebody else. Meanwhile I’ve looked closer at the AVC format mentioned in the previous post and its relatives.

For those of you who don’t recognize the name immediately, Digital Pictures is the company responsible for some FMV-based action games, including the infamous Night Trap. As I rediscovered previously, the AVC files they use are really SGA files with compression method 0x81 but what about the other formats?

About half of the games I could look at contain an archive occupying most of the CD space, inside that archive are the same AVC files. Other half of the games usually has one or two AVC files with a company logo and one megamovie in various formats. And after some research it turned out to be the same 0x81 compression format but with audio data and varying headers.

And since nobody bothered to document it for The Wiki, I’ll explain it here.

There are essentially four parts in a usual DP frame (not counting the header): audio data, colour values, palette update data, and block opcodes.

Audio data is raw PCM, in some formats having fixed size of 1576 bytes. Palette update consists of RGB555 palette entries to replace some old values. Colour values are mere bytes telling which colour to use. And opcode data consists of codes telling how to paint 8×8 tiles.

There are ninety-something opcodes specifying tile painting modes and additionally values with high bit set are used to signal a tile repeat run. In the latter case you (depending on the mode) either repeat the last decoded tile or transform it a bit before copying. Normal opcodes specify what block size to use (8×8, 8×4 or 4×4), how many colours it takes (colours are taken from the other frame part) and in what pattern to paint those colours. Additionally that opcode may be followed by a bit mask telling which one of the pair of colours to take: e.g. for 4×4 block pattern specifies which colour to use for each 2×2 sub-block (for example, pattern may tell to use colours 1, 3, 5, 3 and a bit mask may tell to use colours 0, 3, 5, 2 instead). Of course there are opcodes to skip some (sub)block so its value remains unchanged.

Even if there are many limitations to this compression scheme I still find it interesting and more advanced than most of the formats the competitors used at that time.

3 Responses to “Looking at Digital Pictures video format(s)”

  1. These are Sega CD titles, right? If so, while the audio is likely raw PCM, it’s coded as sign/magnitude PCM, basically the only place anyone has ever seen that format for PCM coding.

  2. Kostya says:

    Those are multi-platform releases, some of the games I looked at were DOS or Macintosh releases (or both). But the formats are obviously SEGA CD first ones so I have no reasons to doubt your words about PCM.

  3. […] my previous post on this matter I mentioned that the formats I took interest in are using 8×8 tiles that may be […]