In the case of planar data, such as YUV420
, linesize[i]
contains stride for the i
-th plane.
For example, for frame 640x480
data[0]
contains pointer to Y
component, data[1]
and data[2]
contains pointers to U
and V
planes. In this case, linesize[0] == 640
, linesize[1] == linesize[2] == 320
(because the U
and V
planes is less than Y
plane half)
In the case of pixel data (RGB24
), there is only one plane (data[0]
) and linesize[0] == width * channels
(640 * 3
for RGB24
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…