ARMovie: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(small re-org; mention common codecs)
(→‎Known video codecs: add codec descriptions)
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
* Extensions: rpl
* Extensions: rpl
* Technical Description: [http://multimedia.cx/AE7doc.txt http://multimedia.cx/AE7doc.txt]
* Technical Description: http://multimedia.cx/AE7doc.txt
* Samples: [http://www.mplayerhq.hu/MPlayer/samples/game-formats/rpl/ http://www.mplayerhq.hu/MPlayer/samples/game-formats/rpl/]
* Samples: http://samples.mplayerhq.hu/game-formats/rpl/


ARMovie is ostensibly a multimedia container format used on Acorn RISC computer systems. Perhaps the most curious aspect of the format's design is its use of variable-length strings in the file header.  
ARMovie is ostensibly a multimedia container format used on Acorn RISC computer systems. Perhaps the most curious aspect of the format's design is its use of variable-length strings in the file header.  


While apparently designed as a general container format, its most most notable use is in various [[Eidos Interactive]] computer games (using the extension rpl for Replay) including the Tomb Raider series. These [[FMV]] files contain video encoded with the [[ESCAPE]] video codec and a custom [[ADPCM]] audio codec.
While apparently designed as a general container format, its most most notable use is in various [[Eidos Interactive]] computer games (using the extension rpl for Replay) including the Tomb Raider series. These [[FMV]] files contain video encoded with the [[ESCAPE]] video codec, and the audio is either uncompressed PCM or a custom [[IMA ADPCM]] variant.
 
== Known video codecs ==
 
Most of the codecs output RGB555 or 5-bit YUV formats.
 
* 1 -- Acorn Moving lines
* 2 -- 15bpp uncompressed video (YUV or RGB)
* 3 -- 10bpp YUV (4:2:2 YUV with 5-bit components)
* 4 -- 8bpp raw video
* 5 -- 8bpp YUV (4:2:0 subsampling)
* 6 -- 6bpp YUV (4:1:0 subsampling)
* 7 -- Acorn Moving Blocks
* 8 -- 24bpp RGB
* 9 -- YYUV with 8-bit components
* 10 -- YV12
* 11 -- YUV9
* 12 -- indirect MPEG (a pointer to real MPEG movie)
* 13 -- MPEG video data
* 14 -- [[IBM UltiMotion]]
* 15 -- other indirect video formats
* 16 -- another packed YV12
* 17 -- Acorn Moving Blocks HQ
* 18 -- H.263
* 19 -- Acorn Super Moving Blocks
* 20 -- Acorn Moving Blocks Beta
* 21 -- YUYV8
* 22 -- packed YUV422
* 23 -- YUV422 with 6-bit Y and 5-bit U/V components
* 24 -- YUV420 with 6-bit Y and 5-bit U/V components
* 25 -- YUV410 with 6-bit components
* 100-199 -- [[ESCAPE]] codecs from Eidos Technologies
* 500 -- Iota Software LZW-compressed frames (like in their Euclid or ACE films)
* 600 -- WSS wrapper for 8-bit [[Microsoft Video 1]]
* 601 -- WSS wrapper for 15-bit [[Microsoft Video 1]]
* 602 -- WSS wrapper for [[Cinepak]]
* 603 -- WSS wrapper for [[RPZA]]
* 604 -- WSS wrapper for [[SMC]]
* 605 -- WSS wrapper for [[IBM UltiMotion]]
* 606 -- WSS wrapper for 8-bit RGB (AVI)
* 607 -- WSS wrapper for 8-bit [[Microsoft RLE]]
* 608 -- WSS wrapper for 24-bit RGB (AVI)
* 609 -- WSS wrapper for 8-bit [[Apple QuickTime RLE]]
* 610 -- WSS wrapper for [[FLI]]
* 613 -- WSS wrapper for 4-bit [[Apple QuickTime RLE]]
* 614 -- WSS wrapper for 16-bit [[Apple QuickTime RLE]]
* 615 -- WSS wrapper for 24-bit [[Apple QuickTime RLE]]
* 622 -- WSS DL (converted to raw palettised video)
* 623 -- WSS ANM (converted to raw palettised video)
* 624 -- WSS wrapper for 8-bit RGB (QuickTime)
* 630 -- WSS wrapper for QuickTime VR
* 699 -- WSS wrapper for unknown AVI or QT codecs
* 800 -- Henrik Pedersen's LinePack
* 802 -- Henrik Pedersen's Movie 16:3
* 803 -- Henrik Pedersen's wrapper for AVI/QT codecs and FLI
 
Some ARMovie-specific codecs are documented below.
 
=== Moving Lines ===
This codec operates in RGB555 or YUV555 format. It reads one or several 16-bit words to determine operation.
 
Control word with LSB set means raw pixel value in top 15 bits. Otherwise depending on those top 15-bit value range a specific operation should be performed:
* <code>[0x0000..0x4800)</code> -- motion compensation from previous frame. Low 6 bits are copy length minus two, top 9 bits are motion vector table index (you can decode it as <code>val = idx + (idx >= 144; dx = (val % 17) - 8; dy = (val / 17) - 8;)</code>
* <code>[0x4800..0x7300)</code> -- motion compensation from current frame. Operation length is the same as in previous case, motion values can be decoded as <code>dx = (idx - 0x120) % 19 - 9; dy = (idx - 0x120) / 19 - 9;</code>
* <code>0x7300</code> -- end of frame marker;
* <code>[0x7301..0x7800)</code> -- run. Low 6 bits are run length minus two, next 16-bit word is run pixel value;
* <code>[0x7800..0x7C00)</code> -- skip. Low 10 bits are skip length minus one;
* <code>[0x7C00..0x7FFF]</code> -- raw data. The following 16-bit words will contain continuously packed 15-bit values.
 
 
=== Moving Blocks ===
This codec operates on 4x4 blocks in YUV555 format. Each 4x4 block has three coding modes: raw, motion compensated (from previous or already decoded part of the current frame) and subdivide it into 2x2 blocks and code them in raw or motion compensated mode.
 
Format specification may be found
[https://www.chiark.greenend.org.uk/~theom/riscos/docs/apps/AcornReplayMovingBlocks.txt here].
 
=== Moving Blocks HQ ===
TODO
 
=== Super Moving Blocks ===
TODO
 
=== LinePack ===
This codec takes 16-bit little-endian words for input and outputs 15-bit RGB or YUV.
 
If top bit is not set the word is pixel value, otherwise bits 12-14 signal the operation and low 12 bits (with some exceptions) transmit number of pixels to perform the operation on (e.g. run or skip length).
 
Known operations are:
* 0 -- leave pixels unchanged from the previous frame;
* 1 -- motion: bits 0-2 are horizontal motion component plus four, bits 3-5 are vertical motion component plus four, bits 6-11 are operation length. Zero displacement means copying pixels from the line above, other values denote an offset in the previous frame;
* 2 -- run. Next 16-bit word is run value;
* 3 -- raw pixels (16-bit values are transmitted in the following bytes);
* 4 -- four-colour pattern. Next four 16-bit words are four colours, the following 16-bit words contain 2-bit colour indices for the pixels (LSB first);
* 5 -- pixel pair run. The following two 16-bit words are two colours that should be repeated the specified number of times.
 
=== Movie 16:3 ===
This codec codes 4x4 blocks in RGB555 format using 16-bit control words (though if pixel value is stored in control word, blue component there has only 4 bits). Two top bits specify operation:
* 0 -- fill block with the pixel value from the low bits;
* 1 -- copy block from previous frame with displacement. Horizontal displacement is stored in bits 0-4 (plus sign in bit 10), vertical displacement is stored in bits 5-9 (plus sign in bit 11);
* 2 -- patterned fill. Low 14 bits from the control word are the first colour value, low 15 bits from the next word are the second colour value. If top bit on the second word is not set, read 16-bit mask word and fill the block with those two colours; if top bit is set, another pixel is read -- if its top bit is not set, this is a raw tile and 13 more pixels need to be read, otherwise read 5 more pixels and 16-bit mask and do two-colour 2x2 block patterned fill like in [[Microsoft Video 1]];
* 3 -- paint block with three colours. For that another 16-bit word is read, top 2 bits are used for paint mode, low 14 bits are pixel value. The third colour is an average of those two colours. The patterns are ('1' mean interpolated colour):
  0 1 1 2    0 0 1 1    0 0 0 0    1 1 0 0
  0 1 1 2    0 1 1 1    1 1 1 1    1 1 1 0
  0 1 1 2    1 1 1 2    1 1 1 1    2 1 1 1
  0 1 1 2    1 1 2 2    2 2 2 2    2 2 1 1


== PC Games That Use RPL Files ==
== PC Games That Use RPL Files ==


* [http://www.mobygames.com/game/windows/fighting-force Fighting Force]
* [http://www.mobygames.com/game/big-red-racing Big Red Racing] ([[Escape 122]])
* [http://www.mobygames.com/game/windows/joint-strike-fighter-jsf Joint Strike Fighter]
* [http://www.mobygames.com/game/windows/fighting-force Fighting Force] ([[Escape 130]])
* [http://www.mobygames.com/game/windows/legacy-of-kain-soul-reaver Legacy of Kain: Soul Reaver]
* [http://www.mobygames.com/game/windows/ian-livingstones-deathtrap-dungeon Ian Livingstone's Deathtrap Dungeon] ([[Escape 130]])
* [http://www.mobygames.com/game/dos/tomb-raider Tomb Raider]
* [http://www.mobygames.com/game/windows/joint-strike-fighter-jsf Joint Strike Fighter] ([[Escape 130]])
* [http://www.mobygames.com/game/windows/tomb-raider-ii-the-dagger-of-xian Tomb Raider II]
* [http://www.mobygames.com/game/windows/legacy-of-kain-soul-reaver Legacy of Kain: Soul Reaver] ([[Escape 130]])
* [http://www.mobygames.com/game/windows/tomb-raider-iii-adventures-of-lara-croft Tomb Raider III]
* [http://www.mobygames.com/game/dos/lords-of-midnight Lords of Midnight] ([[Escape 122]])
* [http://www.mobygames.com/game/windows/warzone-2100 Warzone 2100]
* [http://www.mobygames.com/game/dos/tomb-raider Tomb Raider] ([[Escape 124]])
* [http://www.mobygames.com/game/windows/tomb-raider-ii-the-dagger-of-xian Tomb Raider II] ([[Escape 130]])
* [http://www.mobygames.com/game/windows/tomb-raider-iii-adventures-of-lara-croft Tomb Raider III] ([[Escape 130]])
* [http://www.mobygames.com/game/windows/warzone-2100 Warzone 2100] ([[Escape 130]])


[[Category:Container Formats]]
[[Category:Container Formats]]
[[Category:Game Formats]]
[[Category:Game Formats]]

Latest revision as of 02:32, 27 April 2024

ARMovie is ostensibly a multimedia container format used on Acorn RISC computer systems. Perhaps the most curious aspect of the format's design is its use of variable-length strings in the file header.

While apparently designed as a general container format, its most most notable use is in various Eidos Interactive computer games (using the extension rpl for Replay) including the Tomb Raider series. These FMV files contain video encoded with the ESCAPE video codec, and the audio is either uncompressed PCM or a custom IMA ADPCM variant.

Known video codecs

Most of the codecs output RGB555 or 5-bit YUV formats.

  • 1 -- Acorn Moving lines
  • 2 -- 15bpp uncompressed video (YUV or RGB)
  • 3 -- 10bpp YUV (4:2:2 YUV with 5-bit components)
  • 4 -- 8bpp raw video
  • 5 -- 8bpp YUV (4:2:0 subsampling)
  • 6 -- 6bpp YUV (4:1:0 subsampling)
  • 7 -- Acorn Moving Blocks
  • 8 -- 24bpp RGB
  • 9 -- YYUV with 8-bit components
  • 10 -- YV12
  • 11 -- YUV9
  • 12 -- indirect MPEG (a pointer to real MPEG movie)
  • 13 -- MPEG video data
  • 14 -- IBM UltiMotion
  • 15 -- other indirect video formats
  • 16 -- another packed YV12
  • 17 -- Acorn Moving Blocks HQ
  • 18 -- H.263
  • 19 -- Acorn Super Moving Blocks
  • 20 -- Acorn Moving Blocks Beta
  • 21 -- YUYV8
  • 22 -- packed YUV422
  • 23 -- YUV422 with 6-bit Y and 5-bit U/V components
  • 24 -- YUV420 with 6-bit Y and 5-bit U/V components
  • 25 -- YUV410 with 6-bit components
  • 100-199 -- ESCAPE codecs from Eidos Technologies
  • 500 -- Iota Software LZW-compressed frames (like in their Euclid or ACE films)
  • 600 -- WSS wrapper for 8-bit Microsoft Video 1
  • 601 -- WSS wrapper for 15-bit Microsoft Video 1
  • 602 -- WSS wrapper for Cinepak
  • 603 -- WSS wrapper for RPZA
  • 604 -- WSS wrapper for SMC
  • 605 -- WSS wrapper for IBM UltiMotion
  • 606 -- WSS wrapper for 8-bit RGB (AVI)
  • 607 -- WSS wrapper for 8-bit Microsoft RLE
  • 608 -- WSS wrapper for 24-bit RGB (AVI)
  • 609 -- WSS wrapper for 8-bit Apple QuickTime RLE
  • 610 -- WSS wrapper for FLI
  • 613 -- WSS wrapper for 4-bit Apple QuickTime RLE
  • 614 -- WSS wrapper for 16-bit Apple QuickTime RLE
  • 615 -- WSS wrapper for 24-bit Apple QuickTime RLE
  • 622 -- WSS DL (converted to raw palettised video)
  • 623 -- WSS ANM (converted to raw palettised video)
  • 624 -- WSS wrapper for 8-bit RGB (QuickTime)
  • 630 -- WSS wrapper for QuickTime VR
  • 699 -- WSS wrapper for unknown AVI or QT codecs
  • 800 -- Henrik Pedersen's LinePack
  • 802 -- Henrik Pedersen's Movie 16:3
  • 803 -- Henrik Pedersen's wrapper for AVI/QT codecs and FLI

Some ARMovie-specific codecs are documented below.

Moving Lines

This codec operates in RGB555 or YUV555 format. It reads one or several 16-bit words to determine operation.

Control word with LSB set means raw pixel value in top 15 bits. Otherwise depending on those top 15-bit value range a specific operation should be performed:

  • [0x0000..0x4800) -- motion compensation from previous frame. Low 6 bits are copy length minus two, top 9 bits are motion vector table index (you can decode it as val = idx + (idx >= 144; dx = (val % 17) - 8; dy = (val / 17) - 8;)
  • [0x4800..0x7300) -- motion compensation from current frame. Operation length is the same as in previous case, motion values can be decoded as dx = (idx - 0x120) % 19 - 9; dy = (idx - 0x120) / 19 - 9;
  • 0x7300 -- end of frame marker;
  • [0x7301..0x7800) -- run. Low 6 bits are run length minus two, next 16-bit word is run pixel value;
  • [0x7800..0x7C00) -- skip. Low 10 bits are skip length minus one;
  • [0x7C00..0x7FFF] -- raw data. The following 16-bit words will contain continuously packed 15-bit values.


Moving Blocks

This codec operates on 4x4 blocks in YUV555 format. Each 4x4 block has three coding modes: raw, motion compensated (from previous or already decoded part of the current frame) and subdivide it into 2x2 blocks and code them in raw or motion compensated mode.

Format specification may be found here.

Moving Blocks HQ

TODO

Super Moving Blocks

TODO

LinePack

This codec takes 16-bit little-endian words for input and outputs 15-bit RGB or YUV.

If top bit is not set the word is pixel value, otherwise bits 12-14 signal the operation and low 12 bits (with some exceptions) transmit number of pixels to perform the operation on (e.g. run or skip length).

Known operations are:

  • 0 -- leave pixels unchanged from the previous frame;
  • 1 -- motion: bits 0-2 are horizontal motion component plus four, bits 3-5 are vertical motion component plus four, bits 6-11 are operation length. Zero displacement means copying pixels from the line above, other values denote an offset in the previous frame;
  • 2 -- run. Next 16-bit word is run value;
  • 3 -- raw pixels (16-bit values are transmitted in the following bytes);
  • 4 -- four-colour pattern. Next four 16-bit words are four colours, the following 16-bit words contain 2-bit colour indices for the pixels (LSB first);
  • 5 -- pixel pair run. The following two 16-bit words are two colours that should be repeated the specified number of times.

Movie 16:3

This codec codes 4x4 blocks in RGB555 format using 16-bit control words (though if pixel value is stored in control word, blue component there has only 4 bits). Two top bits specify operation:

  • 0 -- fill block with the pixel value from the low bits;
  • 1 -- copy block from previous frame with displacement. Horizontal displacement is stored in bits 0-4 (plus sign in bit 10), vertical displacement is stored in bits 5-9 (plus sign in bit 11);
  • 2 -- patterned fill. Low 14 bits from the control word are the first colour value, low 15 bits from the next word are the second colour value. If top bit on the second word is not set, read 16-bit mask word and fill the block with those two colours; if top bit is set, another pixel is read -- if its top bit is not set, this is a raw tile and 13 more pixels need to be read, otherwise read 5 more pixels and 16-bit mask and do two-colour 2x2 block patterned fill like in Microsoft Video 1;
  • 3 -- paint block with three colours. For that another 16-bit word is read, top 2 bits are used for paint mode, low 14 bits are pixel value. The third colour is an average of those two colours. The patterns are ('1' mean interpolated colour):
  0 1 1 2    0 0 1 1    0 0 0 0    1 1 0 0
  0 1 1 2    0 1 1 1    1 1 1 1    1 1 1 0
  0 1 1 2    1 1 1 2    1 1 1 1    2 1 1 1
  0 1 1 2    1 1 2 2    2 2 2 2    2 2 1 1

PC Games That Use RPL Files