Winnow Video: Difference between revisions
mNo edit summary |
(→Winnov Video 2 (FOURCC: WINX): Fill WINX information) |
||
(One intermediate revision by one other user not shown) | |||
Line 16: | Line 16: | ||
newval = code; | newval = code; | ||
else | else | ||
newval = oldval | newval = oldval + (code << SHIFT); | ||
SHIFT = 6 (may be another, but no samples with another value are known), ESCAPE = 15 (code for ESCAPE is mentioned above) | SHIFT = 6 (may be another, but no samples with another value are known), ESCAPE = 15 (code for ESCAPE is mentioned above) | ||
Line 22: | Line 22: | ||
== Winnov Video 2 (FOURCC: WINX) == | == Winnov Video 2 (FOURCC: WINX) == | ||
This one is | This one is slightly more advanced codec that codes YUY2 data in 8x8 tiles. | ||
The bitstream is LSB first and has no special header. Each tile is prefixed by coded flag (0 means that the tile is skipped) and 4-bit mode (for coded tiles only). | |||
Supported tile modes | |||
* 1 - 5-bit raw deltas and codebook deltas shifted by 4 bits; | |||
* 3 - 6-bit raw deltas and codebook deltas shifted by 5 bits; | |||
* 15 - end of stream. | |||
Each tile is coded as a sequence of deltas to the previous component value. If the delta value is not "escape" then it should be shifted by the amount of bits defined by the tile mode and added to the previous value, otherwise raw delta value should be read and added instead. | |||
=== Codebook === | |||
The codes are represented here in reversed form for clarity (in reality e.g. -3 is stored as <code>0x17</code>). | |||
111111100 - 7 | |||
11111100 - 6 | |||
1111100 - 5 | |||
111100 - 4 | |||
11100 - 3 | |||
1100 - 2 | |||
100 - 1 | |||
0 - 0 | |||
101 - -1 | |||
1101 - -2 | |||
11101 - -3 | |||
111101 - -4 | |||
1111101 - -5 | |||
11111101 - -6 | |||
111111101 - -7 | |||
11111111 - escape | |||
[[Category:Video Codecs]] | [[Category:Video Codecs]] | ||
Latest revision as of 08:21, 3 November 2023
- FourCC: WINX, WNV1
- Samples:
Winnov Video 1 (FOURCC: WNV1)
Another hardware codec like ATI VCR1, Indeo 2 or Video XL. It uses YUYV format and stores deltas with static code.
Codes used really are simple unary codes with following sign bit and 11111111 code used as escape.
Each component may be decoded this way:
code = get_code(); if(code == ESCAPE) newval = code; else newval = oldval + (code << SHIFT);
SHIFT = 6 (may be another, but no samples with another value are known), ESCAPE = 15 (code for ESCAPE is mentioned above)
Winnov Video 2 (FOURCC: WINX)
This one is slightly more advanced codec that codes YUY2 data in 8x8 tiles.
The bitstream is LSB first and has no special header. Each tile is prefixed by coded flag (0 means that the tile is skipped) and 4-bit mode (for coded tiles only).
Supported tile modes
- 1 - 5-bit raw deltas and codebook deltas shifted by 4 bits;
- 3 - 6-bit raw deltas and codebook deltas shifted by 5 bits;
- 15 - end of stream.
Each tile is coded as a sequence of deltas to the previous component value. If the delta value is not "escape" then it should be shifted by the amount of bits defined by the tile mode and added to the previous value, otherwise raw delta value should be read and added instead.
Codebook
The codes are represented here in reversed form for clarity (in reality e.g. -3 is stored as 0x17
).
111111100 - 7 11111100 - 6 1111100 - 5 111100 - 4 11100 - 3 1100 - 2 100 - 1 0 - 0 101 - -1 1101 - -2 11101 - -3 111101 - -4 1111101 - -5 11111101 - -6 111111101 - -7 11111111 - escape