문제

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

도움이 되었습니까?

해결책 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

다른 팁

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)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top