Difference between revisions of "Alaris VideoGramPiX"

From MultimediaWiki
Jump to navigation Jump to search
(add missing information)
(→‎Codebooks: typos)
 
Line 39: Line 39:
  011 - 2
  011 - 2
  111 - 5
  111 - 5
   01 - 10
   01 - 9


Default inter op codebook:
Default inter op codebook:
Line 59: Line 59:
   01 - 2
   01 - 2
  011 - 5
  011 - 5
   10 - 10
   10 - 9
  111 - 12
  111 - 11


Inter op codebook when global skip length is non-zero:
Inter op codebook when global skip length is non-zero:

Latest revision as of 10:41, 27 February 2021

Sample Java player available here: http://www.ila-ila.com/xvd-hist/sites/vgram/index.htm

The codec works by reading a code for an operation using a codebook and performs some action on pixels (RGB triplets in this case) depending on it (usually copy, skip or average):

  • 0 - skip current pixel
  • 1 - copy left pixel value
  • 2 - copy top pixel value
  • 3 - copy right pixel value
  • 4 - copy bottom pixel value
  • 5 - set pixel to an average of top and left pixels
  • 6 - set pixel to an average of top and right pixels
  • 7 - set pixel to an average of bottom and right pixels
  • 8 - set pixel to an average of bottom and left pixels
  • 9 - read three codes for pixel difference (different codebook for the second and the third component)
  • 10 - skip a number of pixels the number of times defined in byte 32 of extradata (default = 4)
  • 11 - repeat left pixel value the number of times defined in byte 33 of extradata (default = 4)

Something similar can be found in an alternative frame coding method for VT codec of VGM Video family.

Frame format

First byte if frame flags:

  • 0x02 - this is skip frame
  • 0x05 - if either of the bits is set select an alternative codebook set
  • 0x08 - intra frame (unless alternative codebook is selected)
  • 0x10 - interlaced content?
  • 0x20 - upside-down flipped frame?

Bytes 1-3 are probably components order.

The rest of frame is packed codes.

Codebooks

Default intra op codebook:

  0 - 1
011 - 2
111 - 5
 01 - 9

Default inter op codebook:

   11 - 0
   00 - 1
  110 - 2
11001 - 3
01001 - 4
 0001 - 5
00101 - 6
10101 - 7
 1101 - 8
  010 - 9

Intra op codebook when global skip length is non-zero:

 00 - 1
 01 - 2
011 - 5
 10 - 9
111 - 11

Inter op codebook when global skip length is non-zero:

    11 - 0
    00 - 1
   110 - 2
 11001 - 3
 01001 - 4
  0001 - 5
000101 - 6
010101 - 7
  1101 - 8
   010 - 9
100101 - 10
110101 - 11

First component difference code:

      010100 - 128
         000 - 120
         001 - 112
        1010 - 104
       00100 - 96
       00101 - 88
      000010 - 80
      110101 - 72
     1010101 - 64
    00010101 - 56
   110010101 - 48
 10001110100 - 40
 01001110100 - 32
010101110100 - 24
110101110100 - 16
 01101110100 - 8
 00101110100 - 248
011001110100 - 240
111001110100 - 232
011101110100 - 224
111101110100 - 216
 00001110100 - 208
   010010101 - 200
    11110100 - 192
     0110100 - 184
      100010 - 176
       10010 - 168
        1101 - 160
        1100 - 152
         110 - 144
          11 - 136

Second and third component difference codes:

           0 - 128
         001 - 120
        1101 - 112
      110101 - 104
    11010101 - 96
 01101010101 - 88
110101010101 - 80
011101010101 - 72
111101010101 - 248
010101010101 - 240
 00101010101 - 232
   001010101 - 224
     0010101 - 216
       00101 - 208
          11 - 200