code: public static void rgbToYuv( double r , double g , double b , double yuv[] ) {
  		double y = yuv[0] = 0.299*r + 0.587*g + 0.114*b;
  		yuv[1] = 0.492*(b-y);
  		yuv[2] = 0.877*(r-y);
  	}
docs: Conversion from RGB to YUV using same equations as Intel IPP.