On2 VP6: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
Line 41: Line 41:
| frame_mode || 1 || Enum || 0=intra 1=inter
| frame_mode || 1 || Enum || 0=intra 1=inter
|-
|-
| qp || 6 || Unsigned || Quantization parameter
| qp || 6 || Unsigned || Quantization parameter valid range 0..63
|-
|-
| marker_bit || 1 || Constant || Value should be 1
| marker_bit || 1 || Constant || Value should be 0x1
|-
|-
| version || 7 || Constant || Value should be 0x23
| version || 7 || Constant || Value should be 0x23
|-
|-
| interlace || 1 || Boolean ||  
| interlace || 1 || Boolean || true (0x1) means frame is interlaced
|-
|-
| dim_x || 8 || Unsigned || Macroblock height of video  
| dim_x || 8 || Unsigned || Macroblock height of video  

Revision as of 03:06, 4 May 2006

Other Implementations

Early Open source implementation could be found here http://libvp62.sourceforge.net/. (broken link, project removed)

Format

The aim here is to open this standard with a full description of the bitstream format and decoding process. Contributors from On2 especially encouraged here, but it is suspected that this section will be completed through reverse engineering and by people who saw libvp62 source code before it was censored.

Introduction

VP6 uses unidirectional ("P-frame") and intra-frame (within the current frame) prediction. Entropy coding is performed using arithmetic coding. The format supports dynamic adjustment of encoded video resolution.

Macroblocks

Each video frame is composed of an array of 16x16 macroblocks, just like MPEG-2, MPEG-4 parts 2 and 10. Each MB (macroblock) takes one of the following modes ("MV" means "motion vector"):

  • Intra MB
  • Inter MB, null MV, previous frame reference
  • Inter MB, differential MV, previous frame reference
  • Inter MB, four MVs, previous frame reference
  • Inter MB, MV 1, previous frame reference
  • Inter MB, MV 2, previous frame reference
  • Inter MB, null MV, bookmarked frame reference
  • Inter MB, differential MV, bookmarked frame reference
  • Inter MB, MV 1, bookmarked frame reference
  • Inter MB, MV 2, bookmared frame reference

Frame Header

This is the only part of the bitstream that is not encoded using arithmetic compression.

Syntax Number of bits Type Semantics
frame_mode 1 Enum 0=intra 1=inter
qp 6 Unsigned Quantization parameter valid range 0..63
marker_bit 1 Constant Value should be 0x1
version 7 Constant Value should be 0x23
interlace 1 Boolean true (0x1) means frame is interlaced
dim_x 8 Unsigned Macroblock height of video
dim_y 8 Unsigned Macroblock width of video
render_x 8 Unsigned Display height of video
render_y 8 Unsigned Display width of video

If dim_x or dim_y have different values to the previous frame, then the resolution of the encoded image has changed.

Arithmetic Coding