title: RGB to YCbCr Conversion problems
body: <p>i need convert RGB image to YCbCr colour space, but have some colour shift problems, i used all formulas and got the same result.</p>
  
  <p>Formula in python</p>
  
  <pre><code>    cbcr[0] =  int(0.299*rgb[0] + 0.587*rgb[1] + 0.114*rgb[2]) #Y
      cbcr[1] =  int(-0.1687*rgb[0] - 0.3313*rgb[1] + 0.5*rgb[2] + 128) #Cb
      cbcr[2] =  int( 0.5*rgb[0] - 0.4187*rgb[1] - 0.0813*rgb[2] + 128) #Cr
  </code></pre>
  
  <p>I know that i should get the same image with different way to record data, but i got wrong colour result.</p>
  
  <p><a href="http://i.imgur.com/zHuv8yq.png" rel="noreferrer">http://i.imgur.com/zHuv8yq.png</a> Original</p>
  
  <p><a href="http://i.imgur.com/Ek2WEA1.png" rel="noreferrer">http://i.imgur.com/Ek2WEA1.png</a> Result</p>
  
  <p>So how i can get normal image or convert RGB PNG into YCbCr 4:2:2?</p>