HyperHDR Documentation

repository·master·Indexed 24 days ago

https://github.com/awawa-dev/hyperhdr

A high-performance, open-source ambient lighting system for TVs and music setups that analyzes video and audio to drive LED strips and lamps. It features the Infinite Color Engine for high-precision rendering, supports Windows, macOS, and Linux, and is compatible with various capture methods (USB grabbers, DirectX, PipeWire) and LED controllers including WS281x, APA102, and the HyperSerial/Hyperk families.

Tokens
4.2K
Snippets
7
Records
21
Agent score
83%

What's inside HyperHDR

  1. Overview of HyperHDR

    master
    HyperHDR is an open-source ambient lighting system designed for TVs and music setups. It performs real-time analysis of video and audio streams to create immersive LED lighting. The system is optimized for high performance and low latency, supporting both single- and multi-threaded video processing. It is highly portable, running on Windows, macOS (x64 & arm64), and Linux (x64 & ARM, including Raspberry Pi).
  2. Key features of the Infinite Color Engine

    master

    Introduced in HyperHDR v22, the Infinite Color Engine is a high-precision rendering pipeline. Unlike standard 24-bit color operations, it uses floating-point arithmetic to eliminate rounding artifacts and ensure smooth gradients.

    Core capabilities include:

    • Floating-Point Precision: High-precision computations for accurate color transformations.
    • Linear sRGB Accuracy: Processing in linear sRGB space for physically correct light reproduction.
    • Deep-Color Support: Compatibility with devices like Philips Hue, LIFX, and HD108 for rendering beyond 24-bit RGB.
    • Advanced Smoothing: Uses inertial-physics, exponential, and perceptually-uniform YUV/RGB interpolators for natural transitions.
    • RGB-to-RGBW Conversion: Features energy-aware power balancing, white point temperature calibration, and temporal dithering with anti-flicker hysteresis.
  3. Build HyperHDR installers using Docker

    master

    You can build HyperHDR installers for any supported Linux system using Docker and Bash, even from a Windows machine (via WSL). This method uses HyperDockerBuilder images, so no local dependencies are required other than Docker and Bash. This is useful for cross-compiling, such as building an arm64 installer for Raspberry Pi on an x64 PC.

    Run the build.sh script in the main directory. Use environment variables to specify the target.

    Supported PLATFORM values: osx, windows, linux, rpi.

    Example: Build a Debian Bullseye arm64 installer for Raspberry Pi

    PLATFORM=rpi DISTRO_NAME=debian DISTRO_VERSION=bullseye ARCHITECTURE=arm64 ./build.sh

    Installers will be located in the deploy folder.

    ./build.sh
  4. Prepare build environment for Fedora

    master

    Install the necessary dependencies on Fedora using dnf.

    sudo dnf -y install alsa-lib-devel chrpath cmake fedora-packager flatbuffers-compiler flatbuffers-devel gcc gcc-c++ git gtk3-devel libX11-devel libayatana-appindicator-gtk3-devel libftdi-c++-devel libglvnd-devel libusb1-devel libzstd-devel mesa-libEGL-devel mesa-libGL-devel ninja-build openssl-devel pipewire-devel pkg-config qt6-qtbase-devel qt6-qtserialport-devel systemd-devel turbojpeg-devel unzip wget xz-devel chrpath
  5. Prepare build environment for Debian/Ubuntu

    master

    To build HyperHDR natively on Debian or Ubuntu, install the required build tools and development libraries using apt-get.

    For optional Raspberry Pi CEC support, you must also install libcec-dev, libp8-platform-dev, and libudev-dev.

    sudo apt-get update
    
    sudo apt-get install build-essential cmake flatbuffers-compiler git libasound2-dev libayatana-appindicator3-dev libegl-dev libflatbuffers-dev libftdi1-dev libgl-dev libglvnd-dev libgtk-3-dev liblzma-dev libpipewire-0.3-dev libssl-dev libsystemd-dev libturbojpeg0-dev libusb-1.0-0-dev libx11-dev libzstd-dev ninja-build patchelf pkg-config python3 qt6-serialport-dev qt6-base-dev unzip wget chrpath
  6. Compile and install HyperHDR on Windows

    master

    To build on Windows, you must first initialize the MSVC environment using vcvars64.bat. Use the Visual Studio 17 2022 generator with CMake.

    git clone --recursive https://github.com/awawa-dev/HyperHDR.git hyperhdr
    cd hyperhdr
    mkdir build
    cd build
    
    # Setup MSVC environment
    call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
    
    cmake -DPLATFORM=windows -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release ..
    cmake --build . --config Release -- -maxcpucount
    
    # Run from build directory
    bin/Release/hyperhdr -d
  7. Prepare build environment for Arch Linux

    master

    Install the required packages on Arch Linux using pacman.

    sudo pacman -Syy
    
    sudo pacman -S alsa-lib base-devel bash binutils chrpath cmake dpkg fakeroot flatbuffers freetds git gtk3 libayatana-appindicator libfbclient libftdi libglvnd libjpeg-turbo libx11 mariadb-libs mesa ninja openssl pipewire pkgfile postgresql-libs python qt6-base qt6-serialport sdbus-cpp systemd-libs unzip wayland wget xz chrpath
  8. Compile and install HyperHDR on Linux/macOS

    master

    Follow these steps to perform a native build on Linux or macOS. If the build process hangs due to memory constraints, use make -j 2 instead of make -j $(nproc).

    To build installers (recommended for Linux, except Arch), use cpack or the CMake target.

    git clone --recursive https://github.com/awawa-dev/HyperHDR.git hyperhdr
    cd hyperhdr
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make -j $(nproc)
    
    # Run from build directory
    bin/hyperhdr -d
    
    # Build installers
    cpack
    # OR
    cmake --build . --target package --config Release
  9. Prepare build environment for Windows

    master

    Building on Windows 10 (64-bit) requires several manual installations:

    1. Git: Add to PATH during installation.
    2. CMake: Use the Windows win64-x64 Installer and add to PATH.
    3. Visual Studio 2022 Community Edition: Select 'Desktop development with C++'. Specifically, ensure MSVC v143 VS 2022 C++ x64/x86-Buildtools and the latest Windows 10 SDK are selected.
    4. OpenSSL: Use v1.1.1 for QT5.15-6.2, or v3 for QT6.
    5. libjpeg-turbo: Download from official releases.
    6. Python 3: Add to PATH and Debug Symbols during installation. After installing, run:
      pip install aqtinstall
      mkdir c:\Qt
      cd c:\Qt
      aqt install -O c:\Qt 6.8.3 windows desktop win64_msvc2022_64 -m qtserialport
      Note: You may need to set CMAKE_PREFIX_PATH to the Qt installation path before compiling.
    7. NSIS 3.x (Optional): Required for creating installer packages.