This project is designed for graphical visualization and conversion of Adobe ACV files into Android gamma panel format. It includes a main script that reads an *.acv file, draws curves plot, and converts curves data into a format suitable for Android TV panel *.ini file. And an additional script, that decodes 12bit HEX gamma_table_x values, draws a plot with RGB curves and exports them in AMP format.
- ACV Curve Plotting: The main script (
ACV_12bit_converter.py) plots the curves from the ACV file, which shows input Luma and RGB curves, and also calculates combined Luma + RGB curves. - Conversion to Panel Format: The curves are converted into a 12-bit hexadecimal format compliant with the requirements of Android TV's panel calibration configuration. This data is stored in an
inifile, for example:/vendor/tvconfig/config/panel/FullHD_CMO216_H1L01.ini. - Gamma Curve Review: An additional script (
12bit_gamma_plotter.py) provides functionality to review the converted gamma curves or to visualize the original gamma curves from an Android TV panelinifile. - Gamma Curve Export: A script (
12bit_gamma_plotter.py) can also export gamma table to Adobe *.amp format.
-
ACV to 12-bit Converter (
ACV_12bit_converter.py):- Run the script or the corresponding executable.
- Use the graphical interface to open an
.acvfile. - Observe the plotted gamma curves for the Luma and RGB channels.
- The output 12-bit gamma tables for the Red, Green, and Blue channels are displayed in the text field. They can be copied for use in panel calibration configurations.
-
12-bit Gamma Plotter (
12bit_gamma_plotter.py):- Run the script or the corresponding executable to initiate the graphical tool for plotting gamma curves.
- Paste the 12-bit gamma parameters for the Red, Green, and Blue channels into the text area provided.
- Press the "Update Plot" button to visualize the curves.
- Press the "Export AMP File" button to export curves to *.amp format.
You can download windows executable builds in Releases section.
To set up the project, ensure you have Python installed (3.12.0 works well on Windows 10) along with the following dependencies:
matplotlibnumpyopencv-pythonscipytkinter
You can use pip to install any missing dependencies:
pip install matplotlib numpy opencv-python scipyNote: tkinter is usually included in standard Python distributions. If it's missing, refer to Python's documentation for installation instructions suitable for your operating system.
The output gamma curves are formatted as follows:
parameter_r = \
{ \
# Red Gamma table here...
} \
;
parameter_g = \
{ \
# Green Gamma table here...
} \
;
parameter_b = \
{ \
# Blue Gamma table here...
} \
;This format is also used as input by the 12bit_gamma_plotter.py script, that could be usefull to look through original curve from *.ini file.
To upload and download system files to an Android device, you may need proper file system permissions (root access), and you should also enable Developer Mode. I used ADB AppControl to perform all the manipulations.
-
Locate your device's panel *.ini file. The path to it can be found in the
Customer_1.inifile, which is located here, for example:/tvconfig/config/model/Customer_1.ini -
Open it in a text editor (I recommend using Sublime Text) and find the
m_pPanelNameentry. For example:m_pPanelName = "/vendor/tvconfig/config/panel/FullHD_CMO216_H1L01.ini" -
Download the panel *.ini file and make a backup. Open it in a text editor, look through it, and find the text segment:
[gamma_table_0]
parameter_r = \
{ \
0x40,0x00,0x01,0xD8,0x02,0x03,0x61,0x05,0x06, \
.....- Carefully replace the original values for
parameter_r,parameter_g, andparameter_bwith the desired gamma tables under each[gamma_table_x]. For my device, I replaced[gamma_table_x]values 4 times. - Save the file, upload it to the device by replacing the existing one, and reboot the device.
A: Try adding more points before saving the *.acv file. Adobe uses its own interpolation method for curve points.
A: Try to change the Picture mode and Gamma settings back and forth if they are present. If that doesn't work, double-check the panel file location.
Contributions to the project are welcome!
- Andrey Voskresensky - RailwayFX (aka NameRX)
This project is licensed under the MIT License - see the LICENSE.md file for details


