title: Planar YUV420 data layout
body: <p>In my project I use <a href="https://github.com/cisco/openh264" rel="noreferrer">OpenH264</a> codec, which is said to output data in the <code>YUV 4:2:0 planar</code> format. After decoding I get <strong>one array</strong> with <code>width * height * 1.5</code> elements, which, when displaying, looks like this image:</p>
  
  <p><a href="http://o3d.googlecode.com/svn/trunk/samples_webgl/assets/shaving_cream.png" rel="noreferrer">http://o3d.googlecode.com/svn/trunk/samples_webgl/assets/shaving_cream.png</a></p>
  
  <p>Why there are four areas below the main one (which contains Y - responsible for grayscale - elements ), instead of two, like on my second picture? Is that mean that the format is different or am I wrong and my world just collapsed?</p>
  
  <p>I thought that the resoult should have looked like this:</p>
  
  <p><img src="https://i.stack.imgur.com/4DRB4.png" alt="enter image description here"></p>