VC-1
- FourCCs: WMV3, WMV9, WMVA, WVC1, WMVP
- Company: Microsoft
- Samples:
- General Overview: http://www.microsoft.com/windows/windowsmedia/forpros/events/NAB2005/VC-1.aspx
VC-1 is a video coding standard developed by Microsoft. It began as Windows Media Video 9. It is prevalent in ASF files downloaded from the internet. It is also supposed to be used on HD-DVDs.
See Understanding VC-1 for more information about the technical details of the format.
Encapsulation
Most commonly, VC-1 data is found inside of Microsoft ASF files and identified with the FourCC 'WMV3'. Note that the FourCC 'WMV9' may not actually exist in the wild but the acronym gained prominence anyway due to the fact that this video codec was introduced as part of the Windows Media 9 tool suite. VC-1 video will probably be encapsulated in other types of containers and stream formats such as MPEG for HD-DVD transport.
Profiles And Levels
This table is cribbed wholesale from http://www.microsoft.com/windows/windowsmedia/forpros/events/NAB2005/VC-1.aspx
VC-1 has 3 profiles: simple, main, and advanced. Each has various levels. The combinations of profiles and levels represent trade-offs between encoding/decoding complexity, compression quality, and compressed image size.
Profile | Level | Maximum Bit Rate | Representative Resolutions by Frame Rate (Format) |
---|---|---|---|
Simple | Low | 96 kilobits per second (Kbps) | 176 x 144 @ 15 Hz (QCIF) |
Medium | 384 Kbps | 240 x 176 @ 30 Hz 352 x 288 @ 15 Hz (CIF) | |
Main | Low | 2 megabits per second (Mbps) | 320 x 240 @ 24 Hz (QVGA) |
Medium | 10 Mbps | 720 x 480 @ 30 Hz (480p) 720 x 576 @ 25 Hz (576p) | |
High | 20 Mbps | 1920 x 1080 @ 30 Hz (1080p) | |
Advanced | L0 | 2 Mbps | 352 x 288 @ 30 Hz (CIF) |
L1 | 10 Mbps | 720 x 480 @ 30 Hz (NTSC-SD) 720 x 576 @ 25 Hz (PAL-SD) | |
L2 | 20 Mbps | 720 x 480 @ 60 Hz (480p) 1280 x 720 @ 30 Hz (720p) | |
L3 | 45 Mbps | 1920 x 1080 @ 24 Hz (1080p) 1920 x 1080 @ 30 Hz (1080i) 1280 x 720 @ 60 Hz (720p) | |
L4 | 135 Mbps | 1920 x 1080 @ 60 Hz (1080p) 2048 x 1536 @ 24 Hz |
Coding Concepts
Colorspace
VC-1 codes a sequence of images in the YUV 4:2:0 colorspace.
Macroblocks, Blocks, and Sub-blocks
When VC-1 codes an image, it divides the image into macroblocks. Each 16x16 macroblock is comprised of 6 8x8 sample blocks (4 Y blocks, 1 U block, and 1 V block). Further, the coding method may divide an individual 8x8 block into 2 8x4 blocks, 2 4x8 blocks, or 4 4x4 blocks.
Transform Coding
VC-1 uses a variation of the Discrete Cosine Transform to convert blocks of samples into a transform domain to facilitate more efficient coding. The transform may operate on the full 8x8 block or any of the 3 supported sub-block sizes (8x4, 4x8, or 4x4). Unlike many codec standards preceding VC-1, the specification defines a bit-accurate transform method that all implementations are expected to conform to so as to minimize transform error.
Zigzag
After tranforming sample data into the transform domain, VC-1 reorders the transformed data in a zigzag pattern which makes certain successive coding techniques more effective. VC-1 has 31 different zigzag patterns depending on various parameters.
Quantization
Quantization is the compression step that potentially loses the most information in a lossy compression scheme such as VC-1. This codec features an impressive number of quantization modes.
Bitplane Coding
VC-1 uses a number of bitplanes which are simply maps of ones and zeros that specify properties for the macroblocks in an image. For example, a particular bitplane codes information about which macroblocks are not coded in a frame. These bitplanes are coded into the final bitstream using a number of methods.
Differential Coding
In addition the usual type of differential coding where differences between successive values are stored rather than the absolute values, VC-1 also uses XOR bit operations.
Motion Compensation
VC-1 uses half-pel and quarter-pel interframe motion compensation.
Huffman Coding
Intensity Compensation
Bitstream Packing
VC-1 bitstreams are packed as bits into bytes in left -> right order:
byte 0 byte 1 byte 2 byte 3 byte 4 ....
byte 0 byte 1 abcdefgh ijklmnop
Given the preceding bytestream/bitstream, a get_bit() operation to retrieve the next bit in the stream would return bit a. A get_bits(5) operation to request the next 5 bits would return 'bcdef'. The next get_bits(4) operation would return 'ghij'.
Official Information
This Wiki aims to provide a complete, independent, and understandable description of the VC-1 format. Until such time, here are some external references on the format.
- Old specs can be found here: http://jovian.com/files/C24.008-VC9-Spec-CD1.pdf
- VC-1 Compressed Video Bitstream Format and Decoding Process http://www.smpte.org/smpte_store/standards/pdf/s421m.pdf
- VC-1 Bitstream Transport Encodings (specs for placing VC-1 in MPEG-2 Program and Transport streams) http://www.smpte.org/smpte_store/standards/pdf/rp227.pdf
- VC-1 Decoder and Bitstream Conformance http://www.smpte.org/smpte_store/standards/pdf/rp228.pdf
- Googling for VC1_reference_decoder_release6.zip might turn up sources for the reference decoder.