Autodesk Animator Codec: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
(add algorithm)
Line 3: Line 3:
* Samples: [http://www.mplayerhq.hu/MPlayer/samples/V-codecs/AASC/ http://www.mplayerhq.hu/MPlayer/samples/V-codecs/AASC/]
* Samples: [http://www.mplayerhq.hu/MPlayer/samples/V-codecs/AASC/ http://www.mplayerhq.hu/MPlayer/samples/V-codecs/AASC/]


AASC is a 24-bit variation of the [[Microsoft RLE]] algorithm.
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


[[Category:Video Codecs]]
[[Category:Video Codecs]]

Revision as of 20:42, 5 June 2006

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