Autodesk Animator Codec

From MultimediaWiki
(Redirected from AASC)
Jump to: navigation, search

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