Autodesk Animator Codec: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
m (Update samples link)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
* FourCCs: AASC
* FourCCs: AASC
* Company: [[Autodesk]]
* Company: [[Autodesk]]
* Samples: [http://www.mplayerhq.hu/MPlayer/samples/V-codecs/AASC/ http://www.mplayerhq.hu/MPlayer/samples/V-codecs/AASC/]
* Samples: [http://samples.mplayerhq.hu/V-codecs/AASC/ http://samples.mplayerhq.hu/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]]

Latest revision as of 13:00, 17 August 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