TechSmith Screen Capture Codec 2
From MultimediaWiki
(Difference between revisions)
| Revision as of 19:18, 4 July 2012 Kostya (Talk | contribs) ← Previous diff |
Revision as of 13:12, 7 July 2012 Kostya (Talk | contribs) Next diff → |
||
| Line 36: | Line 36: | ||
| 5 7 11 14 | 5 7 11 14 | ||
| 6 12 13 15 | 6 12 13 15 | ||
| + | |||
| + | Quantisation: | ||
| + | |||
| + | Q0 Q1 Q0 Q1 | ||
| + | Q1 Q2 Q1 Q2 | ||
| + | Q0 Q1 Q0 Q1 | ||
| + | Q1 Q2 Q1 Q2 | ||
| + | |||
| + | where | ||
| + | |||
| + | Q0 = 4 * round(quant * 327.68) | ||
| + | Q1 = 4 * round(quant / 5 * 16384 * 0.1313064328597225) // about 4 * round(quant * 430.265) | ||
| + | Q2 = 4 * round(quant * 32768 * 0.1313064328597225^2 ) // about 4 * round(quant * 564.966) | ||
| IDCT: (TODO) | IDCT: (TODO) | ||
Revision as of 13:12, 7 July 2012
- FOURCC: TSC2
- Company: TechSmith
This codec was developed by TechSmith and used in their screen capturing products.
Frame format
This codec operates on 16x8 macroblocks.
0 - frame type (1- coded, 0 - skip frame) 1 - luma quantiser? 2 - chroma quantiser? 3 - ??? [macroblock properties] [macroblock slices]
Macroblock properties:
4 bytes LE - chunk size rest - RLE-coded properties in bytes in form (val << 6) | (count)
Macroblock slices begin with slice size. If the first byte is odd, then it's the full size. Otherwise read whole 32-bit word and divide it by two in order to obtain real macroblock data size.
Macroblocks encode series of 4x4 DCT blocks (4x2), one component after another.
Block format:
DC - 8 bits for the first block, or VLC (for the difference from the previous DC) number of AC coefficients - VLC [AC coefficients] - VLC, bottom 4 bits - skip value, top 8 bits - AC value
Scan order is zigzag:
0 2 3 9 1 4 8 10 5 7 11 14 6 12 13 15
Quantisation:
Q0 Q1 Q0 Q1 Q1 Q2 Q1 Q2 Q0 Q1 Q0 Q1 Q1 Q2 Q1 Q2
where
Q0 = 4 * round(quant * 327.68) Q1 = 4 * round(quant / 5 * 16384 * 0.1313064328597225) // about 4 * round(quant * 430.265) Q2 = 4 * round(quant * 32768 * 0.1313064328597225^2 ) // about 4 * round(quant * 564.966)
IDCT: (TODO)
