Metadata-Version: 2.4
Name: pixtreme-aces
Version: 0.9.0
Summary: ACES color management for pixtreme (OCIO ACES 1.2 compliant)
Project-URL: repository, https://github.com/sync-dev-org/pixtreme
Project-URL: issues, https://github.com/sync-dev-org/pixtreme/issues
Author-email: minamik <mia@sync.dev>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: pixtreme-core>=0.9.0
Description-Content-Type: text/markdown

# pixtreme-aces

ACES Color Management for pixtreme (OCIO ACES 1.2 Compliant)

## Overview

`pixtreme-aces` provides professional ACES color management functionality for VFX and color grading workflows. It implements the Academy Color Encoding System (ACES) 1.2 standard with full GPU acceleration.

## Features

- **ACES 1.2 Compliance**: Matrix values match OpenColorIO-Config-ACES standard
- **Industry Standard Workflow**: Compatible with Nuke, Houdini, Maya color pipelines
- **GPU Accelerated**: All operations run on CUDA-enabled GPUs via CuPy
- **Type Preservation**: Seamlessly works with both NumPy and CuPy arrays

## Installation

**Requirements**:
- Python >= 3.12
- CUDA Toolkit 12.x
- NVIDIA GPU with compute capability >= 6.0

```bash
pip install pixtreme-aces
```

Requires `pixtreme-core` and CUDA Toolkit 12.x.

## Quick Start

```python
import pixtreme_aces as aces
import pixtreme_core as px

# Read display-referred image (Rec.709/sRGB)
img = px.imread("input.jpg")

# Convert to ACES2065-1 (scene-referred, linear AP0)
aces_img = aces.rec709_to_aces2065_1(img)

# Work in ACES color space
# ... color grading, compositing, etc.

# Convert back to Rec.709 for display
output = aces.aces2065_1_to_rec709(aces_img)

px.imwrite("output.jpg", output)
```

## Color Space Conversions

### ACES Working Spaces

- **ACES2065-1**: Archive format (linear AP0, wide gamut)
- **ACEScg**: CG/VFX working space (linear AP1)
- **ACEScct**: Grading space (log-encoded AP1)

```python
# ACES2065-1 ↔ ACEScg
acescg = aces.aces2065_1_to_acescg(aces_img)
aces_img = aces.acescg_to_aces2065_1(acescg)

# ACES2065-1 ↔ ACEScct
acescct = aces.aces2065_1_to_acescct(aces_img)
aces_img = aces.acescct_to_aces2065_1(acescct)
```

### Transfer Functions

The IEC 61966-2-1 sRGB and ITU-R BT.1886 transfer functions are available as
independent building blocks. BT.1886 supports configurable display white and
black luminance through `L_w` and `L_b`.

```python
# sRGB signal ↔ linear light
linear = aces.srgb_eotf(img)
encoded = aces.srgb_inverse_eotf(linear)

# BT.1886 signal ↔ normalized display luminance
linear = aces.bt1886_eotf(img, L_w=100.0, L_b=0.1)
encoded = aces.bt1886_inverse_eotf(linear, L_w=100.0, L_b=0.1)
```

### ACES AP0 and CIE XYZ

Low-level matrix transforms convert between ACES2065-1 AP0 and CIE XYZ with a
D60 white point.

```python
xyz_d60 = aces.ap0_to_xyz_d60(aces_img)
aces_img = aces.xyz_d60_to_ap0(xyz_d60)
```

All conversions above accept NumPy and CuPy arrays, preserve the input array
kind and shape, and normalize computation to `float32` without clipping
scene-referred values.

## References

- [ACES Central](https://acescentral.com)
- [ACES Technical Documentation](https://docs.acescentral.com)
- [OpenColorIO-Config-ACES](https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES)
- SMPTE ST 2065-1: ACES2065-1 specification

## License

MIT License - see LICENSE file for details.

ACES® is a trademark of the Academy of Motion Picture Arts and Sciences (A.M.P.A.S.).
This software is not endorsed by A.M.P.A.S.

## Links

- Repository: https://github.com/sync-dev-org/pixtreme
