Friday, May 24, 2013

vp8 encoder input format

[vp8 encoder input format] Currently vp8 only supports input formats of YV12 and i420.
[vp8 encoder input format]


YV12

This is the format of choice for many software MPEG codecs. It comprises an NxM Y plane followed by (N/2)x(M/2) V and U planes.
Horizontal Vertical
Y Sample Period 1 1
V Sample Period 2 2
U Sample Period 2 2
 
Positive biHeight implies top-down image (top line first)
ATI says they have a download which contains this codec but I can't find it on their site. If you would like something similar for Quicktime, try here.

IYUV and I420

These formats are identical to YV12 except that the U and V plane order is reversed. They comprise an NxN Y plane followed by (N/2)x(N/2) U and V planes. Full marks to Intel for registering the same format twice and full marks to Microsoft for not picking up on this and rejecting the second registration.
(Note: There is some confusion over these formats thanks to the definitions on Microsoft's site which tend to suggest that the two FOURCCs are different. One is described as a 4:2:0 format while the other is described as 4:1:1. Later, however, the same page states that YV12 is the same as both of these with the U and V plane order reversed. I would consider 4:2:0 to imply 1 chroma sample for every 2x2 luma block and 4:1:1 to imply 1 chroma sample for every 4x1 luma block but it seems as if the Microsoft writer may have been using the terms interchangeably. If you know these formats, please could you let me know whether the definition here is correct or whether I need to update one or other?)
Horizontal Vertical
Y Sample Period 1 1
V Sample Period 2 2
U Sample Period 2 2

Positive biHeight implies top-down image (top line first)