> When I create a video patch and connect to a Billboard in QC, the output of
> the video patch is a CVPixelBuffer, and colorspace and native pixel format
> seem to be device dependent.
Typically it's 709 (new Apple-shipping cameras all do 709). Older ones will
usually be 601. (note that those are technically colorspaces, not pixel
formats. QC doesn't handle that distinction particularly well)
> If I run this through a simple CI Kernel, like :
> kernel vec4 image(sampler image)
> {
> return sample( image, samplerCoord( image ) );
> }
> The image turns to a CIImage (makes sense), the colorspace turns
> LinearRGB(!), and there is no native pixel format. This makes sense, and a
> small question I have is if it ever proves beneficial to convert to LinearRGB
> to get any kind of gain or difference in the way image processing happens
> after that step.
It provides one great benefit: the image can be used in CI. CI cannot handle
YCbCr images, so they must be converted to RGB (LinearRGB, or one of several
other similar variations). Colorspace conversions like this are pricey, so
there's no sense in RGB->YUV'ing it again at the end. The image is RGB-ified
when you stick it on a billboard anyway, that step's just hidden inside the
Billboard so you can't see it on any port.
The downside is that a colorspace conversion introduces some precision loss,
and costs time. These are unfortunately unavoidable if you intend to filter
video, or display it on an RGB display (e.g. all of them).
(Fun fact: The OpenGL YUV texture format, made available via
GL_APPLE_ycbcr_422, only uses 601 matrices. Thus, 709 input _also_ requires
some massaging, otherwise colors shift. QC doesn't use YCbCr textures, so this
isn't a problem in QC).
Regarding the image buffer question, an example composition would be nice, just
to see what's going on.
--
Christopher Wright
[email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]