Use CMSampleBuffer or CVPixelBuffer color space
Pass the color space from CoreMedia or CoreVideo to the FrameReceiver, and to the rest of the pipeline. Prefer to use the ColorSpace specified by the CVPixelBuffer over the CMSampleBuffer. Of note is that on macOS, the default capture transfer function is BT709_APPLE (gamma of 1.961) which is different from regular BT709 (sRGB transfer function, in our interpretation). This fixes a bug whereby the colors of a captured IOSurface are different based on if it is being composited by CoreAnimation (in which case it getting the BT709_APPLE via IOSurface metadata) versus viz::GLRenderer (in which case it used to be defaulting to BT709). Bug: 959962 Change-Id: Idb2fdab39e4b4b292932c9bdb2f62dd3f662d4f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2459690Reviewed-by:Markus Handell <handellm@google.com> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#815041}
Showing
Please register or sign in to comment