android / graphics-samples

Multiple samples showing the best practices in graphics on Android.
Apache License 2.0
311 stars 134 forks source link

Android HDR | Add ability to transform 10-bit content to 8-bit content #48

Closed madebymozart closed 1 year ago

madebymozart commented 1 year ago

Description

This CL contains sample code on how a developer can use the Transformer API to transcode 10-bit HDR files to 8-bit SDR files for compatibility with TextureView as well as older devices.

On devices that are API 32 and below, 10-Bit content on a TextureView will produce 'Color Washout' which shows itself as desaturated colors within a video file. image1

With the TransformerAPI, a developer can transcode the content to 8-bit so that it is compatible with other devices that may not be able to decode 10-bit HDR content as well as TextureView Display.

ezgif com-gif-maker

How Has This Been Tested?

This sample app was tested on 3 devices on 3 different version of android:

Test Configuration #1 - Pixel 6 Pro:

Test Configuration #2 - Samsung Galaxy s22 Ultra :

Checklist: