It took a little while to iron out a few problems, but I eventually got it to work perfectly. When a run length of n=3 or more of the same pixel is found, encode the pixel by itself, and then store a back reference of offset -1 and length (n-1). My compressor would search for runs of data (plentiful when I started to stretch the frame for subtitling purposes). While the algorithm revolves around back references, my approach was to essentially write an RLE encoder. Expanding the frame to 576×288 (165,888 pixels) would overflow this limit.Īnyway, the upshot is that I needed to compress the data up front.įortunately, the LZS compressor is pretty straightforward, at least if you have experience writing VLC-oriented codecs. Leaving space for the audio portion of the frame, this only leaves a per-frame byte budget of about 63000 bytes for the video. Since these tables only use 16 bits to specify a size, the maximum frame size is 65536 bytes. One table describes the entire frame size (audio + video) while the second table describes just the video frame size. While the format does support both compressed and uncompressed frames (even though ScummVM indicates that the uncompressed path is yet unexercised), the goal of this project requires making the frames so large that they overflow certain parameters of the file.Ī Robot file has a sequence of frames and 2 tables describing the size of each frame. However, this turned out to be mathematically intractable. Normally, my first goal is to decompress the video and store the data in a raw form. Make the tool dump raw Portable NetMap (PNM) files of varying dimensions and ensure that they look correct. Adapt the LZS compression decoding algorithm from ScummVM into the new tool.The result of this should be a bitwise identical file. Create a C program that can traverse through an input file, piece by piece, and generate an output file.Thankfully, many of the lessons I learned from the previous project are applicable to this project, including: subtitle library interfacing, subtitling in the paletted colorspace, and replacing encoded frames from the original file instead of trying to create a new file. It shows up in several RFCs and was apparently used in MS-DOS’s transparent disk compression scheme. It evidently uses an unmodified version of a standard algorithm called Lempel-Ziv-Stac (LZS). While the Phantasmagoria VMD files are usually 288×144 (which are usually double-sized for the benefit of a 640×400 Super VGA canvas), these frames are meant to be plotted on a game field that was roughly 576×288 (288×144 doublesized).įor example, 2 minimalist animation frames from a desk investigation Robot file:Īs for compression, my first impression was that the algorithm was the same as VMD. Because of these characteristics, each frame encodes its own unique dimensions and origin coordinate within the frame. These are paletted animations which consist of a sequence of independent frames that are designed to be overlaid on top of static background. I have not worked with a format quite like this before. I have created a new MultimediaWiki page describing the Robot Animation format based on the ScummVM source code. “What’s in the refrigerator?” I should note at this juncture that I am not sure if this particular Robot file even has sound or dialogue since I was conducting these experiments on a computer with non-working audio. The source code is here (subtitle-rbt.c). In the end, I was successful in creating a completely standalone tool that can take a Robot file and a subtitle file and create a new Robot file with subtitles. It would be a shame if the effort ground to a halt due to this.įortunately, the folks behind the ScummVM project already figured out enough of the format to be able to decode the RBT files in Phantasmagoria. What are we going to do? We had come so far by solving the VMD subtitling problem for Phantasmagoria. After I completed the VMD subtitling, The Translator discovered a wealth of animation files in a format called RBT (this apparently stands for “Robot” but I think “Ribbit” format could be more fun). This is part 2 of the adventure started in my Subtitling Sierra VMD Files post.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |