emmcb / cxx-image

A flexible and lightweight image processing library written in modern C++17.
Apache License 2.0
1 stars 0 forks source link

Support for UBWCTP10 #3

Open Uzver123 opened 2 days ago

Uzver123 commented 2 days ago

Hello, is there way you could add support for files with extension .UBWCTP10 (Universal Bandwidth Compression) sensor raw dump that is used by Qualcomm Snapdragon phones?

It briefly mentioned on qualcomm development forum:

app/sw code cannot access the UBWC format data directly, there is no public information for the UBWC format. ofcourse you can still use glReadPixels() to read the UBWC format framework, driver will perform the conversion from UBWC data to non-UBWC data when reutrn to app.

From what i could found about it:

UBWCTP10 is a YUV-format image data format, a block-based compression format, also known as a 10-bit compression format. It is a compression format for image and video data in resource-constrained application scenarios such as mobile devices. UBWCTP10 can compress image and video data into a smaller space, reduce bandwidth and storage requirements, and provide higher image quality and lower power consumption. However, the processing speed of UBWCTP10 may be slower than the uncompressed format because the compressed data needs to be decompressed.

Reference file could be found here https://www.upload.ee/files/17184486/UBWCTP10.zip.html File contents. image

emmcb commented 2 days ago

Hello, this seems to be a proprietary format, without any specification or at least some public information about it. Thus without knowing how to decode the file and how the compression is done it would be very difficult to add support for it. Maybe with your work if you have access to Qualcomm developer tools you can find some way to convert it to another format (maybe even open a ticket to Qualcomm directly), but I have never encountered these UBWCTP10 files before so I am afraid I will not be able to help you more than this.