Sorenson Video 3: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Some more info) |
||
Line 20: | Line 20: | ||
* all other values are for inter 4x4 blocks, type is used to set prediction direction and coded block pattern | * all other values are for inter 4x4 blocks, type is used to set prediction direction and coded block pattern | ||
Dezigzag pattern (from [[H.264]]): | |||
o-->o-->o o | |||
| /| | |||
o o o / o | |||
| / | |/ | | |||
o o o o | |||
/ | |||
o-->o-->o-->o | |||
=== Macroblock transform and dequantization === | |||
Transform coefficients: | |||
13 17 1 7 | |||
13 7 -1 -17 | |||
13 -7 -1 17 | |||
13 -17 1 -7 | |||
Dequantization is performed by multiplying every coefficient by the same value determined by quantizer. | |||
In case if inter blocks first coefficient may be quantized slightly differently: | |||
For some intra blocks ('''TODO''': condition): | |||
dc = 169 * 1538 * block[0] | |||
For chroma blocks (?): | |||
dc = (svq3_dequant_coeff[Q] * (block[0] >> 3)) >> 1; | |||
Quantizer table (from svq3.c) | |||
static const uint32_t svq3_dequant_coeff[32] = { | |||
3881, 4351, 4890, 5481, 6154, 6914, 7761, 8718, | |||
9781, 10987, 12339, 13828, 15523, 17435, 19561, 21873, | |||
24552, 27656, 30847, 34870, 38807, 43747, 49103, 54683, | |||
61694, 68745, 77615, 89113,100253,109366,126635,141533 | |||
}; | |||
Dequantization formula (dc=0 if not defined otherwise): | |||
out = (coeff * svq3_dequant_coeff[Q] + dc + 0x80000) >> 20; | |||
[[Category:Video Codecs]] | [[Category:Video Codecs]] | ||
[[Category:Incomplete Video Codecs]] | [[Category:Incomplete Video Codecs]] |
Revision as of 01:24, 29 April 2007
- FOURCCs: SVQ3
- Company: Sorenson Media
- Samples: http://samples.mplayerhq.hu/V-codecs/SVQ3/
Video codec apparently based on an early H.264 draft.
The decoder in FFmpeg produces heavy artifacting for some uncommon samples.
Decoding Process
This codec extensively uses Golomb coding.
Slice Header
TODO
Macroblock layer
Each macroblock starts with Golomb code signalling MB type:
- 0 - skip block
- 1-7 - inter 16x16 blocks, type specifies prediction direction
- 8 and 33 - intra 4x4 block (type 33 means that there are no coefficients for this block)
- all other values are for inter 4x4 blocks, type is used to set prediction direction and coded block pattern
Dezigzag pattern (from H.264):
o-->o-->o o | /| o o o / o | / | |/ | o o o o / o-->o-->o-->o
Macroblock transform and dequantization
Transform coefficients:
13 17 1 7 13 7 -1 -17 13 -7 -1 17 13 -17 1 -7
Dequantization is performed by multiplying every coefficient by the same value determined by quantizer. In case if inter blocks first coefficient may be quantized slightly differently:
For some intra blocks (TODO: condition):
dc = 169 * 1538 * block[0]
For chroma blocks (?):
dc = (svq3_dequant_coeff[Q] * (block[0] >> 3)) >> 1;
Quantizer table (from svq3.c)
static const uint32_t svq3_dequant_coeff[32] = { 3881, 4351, 4890, 5481, 6154, 6914, 7761, 8718, 9781, 10987, 12339, 13828, 15523, 17435, 19561, 21873, 24552, 27656, 30847, 34870, 38807, 43747, 49103, 54683, 61694, 68745, 77615, 89113,100253,109366,126635,141533 };
Dequantization formula (dc=0 if not defined otherwise):
out = (coeff * svq3_dequant_coeff[Q] + dc + 0x80000) >> 20;