5,323
edits
(→C API) |
|||
Line 71: | Line 71: | ||
Note that the exact sizes of buffers may vary depending on alignment.<br> | Note that the exact sizes of buffers may vary depending on alignment.<br> | ||
;AV_PIX_FMT_RGB24 | |||
This is your standard 24 bits per pixel RGB.<br> | * This is your standard 24 bits per pixel RGB.<br> | ||
In your AVFrame, data[0] will contain your single buffer RGBRGBRGB.<br> | * In your AVFrame, data[0] will contain your single buffer RGBRGBRGB.<br> | ||
Where the linesize is typically <math>3 * width</math> bytes per row and <math>3</math> bytes per pixel. | * Where the linesize is typically <math>3 * width</math> bytes per row and <math>3</math> bytes per pixel. | ||
;AV_PIX_FMT_YUV420P | |||
This is a planar YUV pixel format with chroma subsampling.<br> | * This is a planar YUV pixel format with chroma subsampling.<br> | ||
Each pixel will have its own luma component (Y) but each <math>2 \times 2</math> block of pixels will share chrominance components (U, V)<br> | * Each pixel will have its own luma component (Y) but each <math>2 \times 2</math> block of pixels will share chrominance components (U, V)<br> | ||
In your AVFrame, data[0] will contain your Y image, data[1] will contain your .<br> | * In your AVFrame, data[0] will contain your Y image, data[1] will contain your .<br> | ||
Data[0] will typically be <math>width * height</math> bytes.<br> | * Data[0] will typically be <math>width * height</math> bytes.<br> | ||
Data[1] and data[2] will typically be <math>width * height / 4</math> bytes.<br> | * Data[1] and data[2] will typically be <math>width * height / 4</math> bytes.<br> | ||
===Muxing to memory=== | ===Muxing to memory=== |