YLC
From MultimediaWiki
(Difference between revisions)
| Revision as of 01:14, 20 August 2009 Alex (Talk | contribs) ← Previous diff |
Current revision Kostya (Talk | contribs) |
||
| Line 1: | Line 1: | ||
| * Website: http://spring-fragrance.mints.ne.jp/aviutl/ (Japanese) | * Website: http://spring-fragrance.mints.ne.jp/aviutl/ (Japanese) | ||
| * FourCC: YLC0 | * FourCC: YLC0 | ||
| + | * Sample: http://samples.libav.org/V-codecs/ylc0.avi | ||
| The website names it as "YUY2 Lossless Codec". | The website names it as "YUY2 Lossless Codec". | ||
| + | |||
| + | === Format === | ||
| + | |||
| + | bytes 0- 3 'YLC0' | ||
| + | bytes 4- 7 zero | ||
| + | bytes 8-11 offset to luma plane (should be 16) | ||
| + | bytes 12-15 offset to chroma plane | ||
| + | |||
| + | Bitstream is read as 32-bit little-endian words MSB. | ||
| + | |||
| + | Luma plane contains residues stored as exp-Golomb codes (unary-coded exponent + N bits of mantiss). | ||
| + | |||
| + | Chroma plane contains chroma values coded in groups and uses static Huffman trees: | ||
| + | |||
| + | if (get_bit()) { | ||
| + | val = decode_sym(tree1); | ||
| + | if (val < 0xE1) { | ||
| + | output chroma_table[val]; | ||
| + | } else { | ||
| + | for (i = 0; i < (val - 0xDF); i++) | ||
| + | output {0, 0, 0, 0} | ||
| + | } | ||
| + | } else { | ||
| + | u0 = decode_sym(tree2); | ||
| + | v0 = decode_sym(tree3); | ||
| + | u1 = decode_sym(tree2); | ||
| + | v1 = decode_sym(tree4); | ||
| + | |||
| + | output { u0, v0, u0 + u1, v1 } | ||
| + | } | ||
| + | |||
| + | Looks like for luma plane median prediction is used and for chroma only left prediction is used. | ||
| [[Category:Video Codecs]] | [[Category:Video Codecs]] | ||
| [[Category:Lossless Video Codecs]] | [[Category:Lossless Video Codecs]] | ||
| - | [[Category:Undiscovered Video Codecs]] | + | [[Category:Incomplete Video Codecs]] |
Current revision
- Website: http://spring-fragrance.mints.ne.jp/aviutl/ (Japanese)
- FourCC: YLC0
- Sample: http://samples.libav.org/V-codecs/ylc0.avi
The website names it as "YUY2 Lossless Codec".
[edit]
Format
bytes 0- 3 'YLC0' bytes 4- 7 zero bytes 8-11 offset to luma plane (should be 16) bytes 12-15 offset to chroma plane
Bitstream is read as 32-bit little-endian words MSB.
Luma plane contains residues stored as exp-Golomb codes (unary-coded exponent + N bits of mantiss).
Chroma plane contains chroma values coded in groups and uses static Huffman trees:
if (get_bit()) {
val = decode_sym(tree1);
if (val < 0xE1) {
output chroma_table[val];
} else {
for (i = 0; i < (val - 0xDF); i++)
output {0, 0, 0, 0}
}
} else {
u0 = decode_sym(tree2);
v0 = decode_sym(tree3);
u1 = decode_sym(tree2);
v1 = decode_sym(tree4);
output { u0, v0, u0 + u1, v1 }
}
Looks like for luma plane median prediction is used and for chroma only left prediction is used.
