问题 I am using the code here to convert a CGImageRef into a CVPixelBufferRef on OS X . Convert UIImage to CVImageBufferRef However, I need the image to be drawn in YUV (kCVPixelFormatType_420YpCbCr8Planar) instead of RBG as it is now. Is there anyway to directly draw a CGImage in YUV colorspace? And if not, does anyone have an example for the best way to go about converting the CVPixedBufferRef from RBG into YUV ? I understand the formulas for the conversion but doing it on the CPU is painfully