title: Converting a NV12 (YUV4:2:0) Byte array to RGB byte Array
body: <p>I have a stream of bytes captured from a webcam (using Aforge.Net Library). But the image captured is returned in NV12 or YUV</p>
  
  <p>I need to convert it to RGB byte stream.In order can I achieve this transform, I need to know how to read / interpret the byte array.</p>
  
  <p>I'm hoping to implement a function that does this</p>
  
  <pre><code>byte[] ConvertToRGB(byte[] YCbCrarray)
  {
  
  //Read the byte array and encode it in RGB format and return it as a byte array
  
      return rgbarray;
  
  
  }
  </code></pre>