# Raw data API provides CVPixelBuffers with wrong color range

**URL:** <https://devforum.zoom.us/t/raw-data-api-provides-cvpixelbuffers-with-wrong-color-range/53858>\
**Category:** iOS\
**Created:** [July 8, 2021, 3:44pm UTC](https://devforum.zoom.us/t/raw-data-api-provides-cvpixelbuffers-with-wrong-color-range/53858 "2021-07-08T15:44:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcfly](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mcfly](https://devforum.zoom.us/u/mcfly)\
**Post date:** [July 8, 2021, 3:44pm UTC](https://devforum.zoom.us/t/raw-data-api-provides-cvpixelbuffers-with-wrong-color-range/53858/1 "2021-07-08T15:44:27Z")

</div>

**Description**  
In general, stages of the image processing process are described in Fig. 1.

 ![Screen Shot 2021-02-23 at 6.57.32 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/2/d220b3a1d5ce4e7c8bdec2558786539a6ec9c459.png)  
Figure 1: Stages of image processing process

To find out where the image quality is being destroyed, we have performed the test. We have feed the color test pattern image into the Zoom app. Then the image was sent to our iOS application and then sent back to Zoom.  
The original preview image (1), the image on the entrance to our iOS application (2) and the image received from our iOS application by Zoom Mac application (3) were captured on the same screen and colors were measured by the Digital Color Meter utility (Fig. 2).

 ![Screen Shot 2021-02-23 at 6.21.04 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/1/81337de20fdb35d05ac34b1ffae163de2f01c27a.png)  
Figure 2: Measurement method

The color distortion implemented by our iOS application (between steps 2 and 3) is minimal (1-3 points) and is caused by the .264 encoding-decoding process.  
The significant change is implemented inside the Zoom CDN and Zoom SDK. The nature of this distortion (black changed from 0 to 16, white changed from 255 to 235) is peculiar for conversion from Full-range to Video-range color space. However, the pixel buffer provided by the Zoom SDK is erroneously marked as full range (Fig. 3).

 ![Screen Shot 2021-02-23 at 7.31.34 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/e/ce0d342105f7edd119536e8de167f98777593c7e.png)  
Figure 3: Properties of the CVPixelBuffer provided by the Raw Data API

**Which iOS Client SDK version?**  
5.4.54520.1229

**Smartphone (please complete the following information):**

- Device: Any iPad
- OS: iOS 14

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [July 8, 2021, 5:05pm UTC](https://devforum.zoom.us/t/raw-data-api-provides-cvpixelbuffers-with-wrong-color-range/53858/2 "2021-07-08T17:05:22Z")

</div>

Hey @mcfly,

Thanks for using the dev forum!

Can you update to the latest version, run the test again, and get the SDK logs?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 8, 2021, 3:05am UTC](https://devforum.zoom.us/t/raw-data-api-provides-cvpixelbuffers-with-wrong-color-range/53858/3 "2021-08-08T03:05:54Z")

</div>

Closed on August 8, 2021, 3:05am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
