Search code examples
c#color-schemeyuvcolor-spacescanline

Scanline in YUV image format


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


Solution

  • 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