Question

Can some body explain to me that what is scanline mean in general and what does it mean in YUV color format? Some explanation with some example will be great.

Thanks A.S

Was it helpful?

Solution 2

A scan line indicate the number of bytes for making up one channel in your format.

For example if you have YV12 image which corresponds to YVU420P then for 640 x 480 image. you will have 640 bytes for Y plane 640/2 bytes for V plane and 640/2 bytes for U plane. so the scanline for the three channels of your YV12 format will be like

y Plane ========>   640 Bytes


V plane ========>   320 bytes


U plane ========>   320 bytes

OTHER TIPS

A scanline is just the bytes that makes up one "line" of the image, including luma and chroma-data.

See e.g. wikipedias entry

As an example, consider VGA which is 640x480, i.e. 480 rows, each one consisting of 640 pixels.

One scanline YCbCr (4:2:0 sub-sampling, planar) in VGA resolution consists of

640 bytes Luma-data, followed by
(skip the rest of the luma-data, since all luma is consecutive)
160 bytes of chroma-data (Cb), followed by
(skip the rest of the cb-data, since all Cb is consecutive)
160 bytes of chroma-data (Cr)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top