The source frame buffer contains the input frame pixels. It contains two parts: luminance pixels (Luma) followed by chrominance pixels (Chroma). Luma pixels are stored in pixel raster scan order, shown in the following figure. Chroma pixels are stored in an U/V-interleaved pixel raster scan order. Therefore, the Chroma portion is half the size of the Luma portion when using a 4:2:0 format and the same size as the Luma portion when using a 4:2:2 format. The encoder picture buffer must be one contiguous memory region.
Two packing formats are supported in external memory: 8 bits per component or 10 bits per component, shown in the following tables. The 8-bit format can only be used for an 8-bit component depth and the 10-bit format can only be used for a 10-bit component depth.
255 | 248 | ... | 31 | 24 | 23 | 16 | 15 | 8 | 7 | 0 | ||
Yx+31,y | ... | Yx+3,y | Yx+2,y | Yx+1,y | Yx,y | |||||||
...(all Luma in pixel raster scan order)... | ||||||||||||
255 | 248 | 247 | 240 | ... | 31 | 24 | 23 | 16 | 15 | 8 | 7 | 0 |
Vx+15,y | Ux+15,y | ... | Vx+1,y | Ux+1,y | Vx,y | Ux,y | ||||||
...(all interleaved Chroma in pixel raster scan order)... |
255 | 254 | 253 | 244 | 31 | 30 | 29 | 20 | 19 | 10 | 9 | 0 | |||||||||
0 | 0 | Vx+23,y | 0 | 0 | Yx+2,y | Yx+1,y | Yx,y | |||||||||||||
...(all Luma in pixel raster scan order)... | ||||||||||||||||||||
255 | 254 | 253 | 244 | ... | 63 | 62 | 61 | 52 | 51 | 42 | 41 | 32 | 31 | 30 | 29 | 20 | 19 | 10 | 9 | 0 |
0 | 0 | Vx+11,y | ... | 0 | 0 | Vx+2,y | Ux+2,y | Vx+1,y | 0 | 0 | Ux+1,y | Vx,y | Ux,y | |||||||
...(all interleaved Chroma in pixel raster scan order)... |
The encoder buffer must be one contiguous memory region and should be aligned to a 32-byte boundary.
The frame buffer width (pitch) can be larger than the frame width. When the pitch is greater than the frame width, pixels in each line beyond the picture width are ignored, as illustrated in the following figure.