Autodesk Animator Codec

From MultimediaWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Autodesk Animator Codec (AASC) is a 24-bit Run Length Encoding algorithm similar to Microsoft RLE.

Decoding Algorithm

A frame of AASC data is decoded bottom row first and the decode operation iterates to the top row.

  • foreach row from bottom to top
    • read the next byte from the encoded stream as the RLE code
    • if RLE code is 0
      • read the next byte from the encoded stream as the command code
      • else if the command code is 0
        • row decode finished; move to the next row
      • else if the command code is 1
        • frame decode is finished
      • else if the command code is 2
        • reposition the frame decode coordinates:
        • read the next byte as the number of pixels to move to the right
        • read the next byte as the number of rows to move up
      • else
        • copy the next (command code) pixesl from the encoded byte to the output image
        • if the command code is odd
          • skip the next byte in the encoded bytestream
  • else
    • read the next byte as the pixel
    • write the pixel into the output image (command code) times