Difference between revisions of "SpeedHQ"

From MultimediaWiki
Jump to navigation Jump to search
(some description)
 
(update for SHQ7 and SHQ9)
Line 1: Line 1:
* FOURCCs: SHQ0, SHQ1, ..., SHQ5
* FOURCCs: SHQ0, SHQ1, ..., SHQ5, SHQ7, SHQ9
* Company: NewTek
* Company: NewTek


This is a simple intermediate codec with different subsampling and alpha support (420, 422 and 444 with or without alpha gives exactly six FOURCCs).
This is a simple intermediate codec with different subsampling and alpha support (420, 422 and 444 with or without alpha gives exactly six FOURCCs, <code>SHQ7</code> is 422 with alpha coded as luma and chroma blocks, <code>SHQ9</code> is the same for 444 format).


Frame is always coded as two fields, data is packed into 32-bit little-endian words and is read from LSB.
Frame is always coded as two fields, data is packed into 32-bit little-endian words and is read from LSB.

Revision as of 10:01, 1 July 2016

  • FOURCCs: SHQ0, SHQ1, ..., SHQ5, SHQ7, SHQ9
  • Company: NewTek

This is a simple intermediate codec with different subsampling and alpha support (420, 422 and 444 with or without alpha gives exactly six FOURCCs, SHQ7 is 422 with alpha coded as luma and chroma blocks, SHQ9 is the same for 444 format).

Frame is always coded as two fields, data is packed into 32-bit little-endian words and is read from LSB.

First byte is frame quantiser, next three bytes form an offset to the second field.

Field format

Blocks are coded with static VLCs — one for DC and one RL VLC for ACs.

Alpha is coded as run-level too: first it has a codeword telling how many elements to skip (or whether this is end of block) and then a codeword for nonzero element, repeat.

Quantiser

Default quantisers:

 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36, 40, 44, 48, 52, 56, 64, 72, 80, 88, 96, 104, 112

Provided quantiser is clipped to 99, also if it's less than 38 or odd then a nearest smaller value from default quantisers table is used instead.

Quantisation matrix:

  8, 16, 19, 22, 26, 27, 29, 34,
 16, 16, 22, 24, 27, 29, 34, 37,
 19, 22, 26, 27, 29, 34, 34, 38,
 22, 22, 26, 27, 29, 34, 37, 40,
 22, 26, 27, 29, 32, 35, 40, 48,
 26, 27, 29, 32, 35, 40, 48, 58,
 26, 27, 29, 34, 38, 46, 56, 69,
 27, 29, 35, 38, 46, 56, 69, 83