API Reference
C-compatible programming interface for the Ultraziq x265 Toolkit.
Technical Introduction
Ultraziq public interface is pure C, defined in uhdkit.h, ensuring
maximum portability.
Build & Compilation
Custom x265/HEVC builds allow for target-specific optimizations. Below are the recommended build procedures for various platforms.
🐧 Linux (x86_64)
Ensure you have cmake, gcc, and nasm
installed.
# Standard build process
git clone https://bitbucket.org/multicoreware/x265_git.git
cd x265_git/build/linux
./make-Makefiles.bash
make -j $(nproc) install
🏗 Linux ARM (aarch64)
Standard Ubuntu-based ARM builds utilize native GCC and specific ARM-neon optimizations.
# Native build on ARM (Ubuntu)
cd x265_git/build/linux
cmake -DENABLE_ASSEMBLY=ON -DCMAKE_CXX_FLAGS="-march=native" ../../source
make -j $(nproc) install
🪟 Windows (MinGW-W64)
For Windows builds, MinGW-W64 is recommended to ensure ABI compatibility with the Ultraziq toolkit.
# MinGW build procedure
cd x265_git/build/msys
cmake -G "MSYS Makefiles" ../../source
make -j $(nproc) install
Parameter Management
Allocates an uhdkit_param instance for the x265/HEVC encoder core.
Initializes the parameter structure with a target preset (e.g., "medium", "ultrafast") and tune factor.
uhdkit_param* p = uhdkit_param_alloc(UHDKIT_TYPE_HEVC);
uhdkit_param_default_preset(p, "medium", "ssim");
Restricts parameters to a specific HEVC profile (e.g., "main", "main10").
Parses individual parameters by string name. Used for Ultraziq-specific features.
Pictures & Stats
Allocates a picture container for raw YUV input.
Allocates a statistics object for tracking encode performance.
Encoder Core
Creates a new encoder instance. All parameters are cloned internally.
The primary encoding entry point. Processes a single frame. Pass
in = NULL to flush.
Dynamically updates encoder parameters in real-time.
Logging & Cleanup
Shuts down the encoder and releases internal thread pools.
Global static resource cleanup for the library.
Color Space Conversion
Utility functions to translate internal Ultraziq tokens to x265 constants.