Skip to content

Luxian/lxn-prowide

Repository files navigation

LXN ProWide

OpenFX plugins that make GoPro WIDE=1 (sensor-native gamut) footage usable in DaVinci Resolve — decoder-agnostic: pair them with GP-Tune+, Leeming LUTs, or a plain CST.

Crate What it is
crates/prowide-core GPMF/WRGB telemetry, LOGB curve, Power-Knee, Native→DWG matrix, DaVinci Intermediate curve. No OFX/UI knowledge.
crates/prowide-gpu Generic CUDA plumbing (NVRTC compile, per-context cache, launch, parity-test harness).
crates/prowide-awb ProWide AWB — OFX plugin (id ro.lxn.prowide.awb): applies the camera's per-frame auto-white-balance gains (WRGB) with keyframeable trim sliders.
crates/prowide-decode ProWide Decode — OFX plugin (id ro.lxn.prowide.decode): GoPro Labs LOG → DaVinci Wide Gamut / DaVinci Intermediate in one node (walking skeleton).

Status

Working (v0.12): per-frame WB relative to a Target WB (Daylight preset or custom calibrated triplet), keyframeable trim sliders with an exposure-neutral Preserve Brightness toggle, Exposure (EV), highlight roll-off (Power-Knee shoulder in linear light, default off — switch on before 3D LUTs, whose input clamps at 1.0; keep off before GP-Tune, which has its own), clipping zebra colored by the clipped channel(s) and flagging pre-roll-off clipping, Auto Log Base from clip metadata (the manual slider keeps its value for quick A/B; log math skipped entirely on clips without Labs LOG; WRGB only applied on WIDE=1 clips where WB is not baked in), clip color-temperature summary, collapsible Info section with the full camera-settings readout. Uses the Resolve 20+ OFX host properties (OfxImageEffectPropSrcFilePath, OfxImageEffectPropSrcFrame) for exact per-frame source mapping.

Renders on the GPU (OFX CUDA render extension) when Resolve runs in CUDA mode: the kernel is compiled at first use with the NVRTC compiler Resolve itself ships, so no CUDA toolkit is required to build or run. Real-time 5.3K playback (~0.6 ms/frame). On non-NVIDIA machines the multithreaded CPU path is used automatically (OpenCL/Metal paths are planned — see TODO.md).

Diagnostics are logged to %TEMP%\prowide-awb.log only when Resolve is launched with the PROWIDE_DEBUG environment variable set.

ProWide Decode (v0.2): the full package in one node — LOGB decode (Auto Log Base from metadata) → white balance in native linear (Per-Frame Auto from the camera's WRGB telemetry, Fixed Daylight, Fixed Custom, or Off) → keyframeable trims with Preserve Brightness → Exposure → highlight roll-off (default ON, Auto Strength) → Protune Native→DWG matrix → DaVinci Intermediate encode. Clipping/recovered zebras and the camera Info section as in AWB. CUDA kernel for real-time playback, multithreaded CPU fallback. With WB Off the output is bit-compatible with xtremestuff's free GoPro_GP-Log_Native_DWG_DaVinci-Intermediate.dctl (enforced by a transcription parity test — the M2 verification gate, parade-verified). Debug log: %TEMP%\prowide-decode.log.

Build

Requirements: Rust (stable, MSVC), LLVM (for bindgen), Windows.

cargo build --release

Install: copy target\release\prowide_awb.dll to C:\Program Files\Common Files\OFX\Plugins\ProWideAWB.ofx.bundle\Contents\Win64\ProWideAWB.ofx (admin required), then restart Resolve. The plugin appears in the OpenFX panel under LXN ProWide → ProWide AWB.

Test

cargo test

Extraction parity is enforced against golden fixture data generated by the Python reference implementation (the resolve-gopro-info repo — same clip, same expected 200 WRGB samples). Golden tests skip when the fixture drive is not mounted; point PROWIDE_FIXTURE at any Hero 11 WIDE clip to substitute.

Install (release build)

installer/prowide.iss (Inno Setup) builds a Windows installer that installs both plugin bundles into C:\Program Files\Common Files\OFX\Plugins. Close DaVinci Resolve before installing; Resolve scans OFX plugins at startup. Third-party OFX requires DaVinci Resolve Studio (the free edition does not load external OFX).

License

MIT — see LICENSE. Ported math carries its upstream MIT notices in THIRD-PARTY-LICENSES.md.

Design notes

  • WIDE=1 records sensor-native color without baking in white balance; the WRGB telemetry is the camera's per-frame AWB estimate, meant to be applied at decode time. Downstream decoders apply a fixed pretuned WB (typically Daylight), so the plugin applies only the difference — WRGB(t) / Target — making footage behave as if shot with that fixed WB. Applying the full gains would double up with the decoder's WB and tint the image pink. Target = 1/1/1 applies the camera gains untouched.
  • Trim sliders are luminance-normalized (Rec.709 weights): pushing one shifts color at constant exposure instead of brightening the image.
  • Pixel pipeline: LOGB→linear → × (WRGB(t)/Target × trim) → linear→LOGB. LOGB curve per GoPro's official docs: linear = (B^code − 1)/(B − 1), B=400 ≡ GP-Log (confirmed by GoPro engineering).
  • Calibrating Target per camera: copy the RGB values of the decoder's Daylight preset, or record a short clip with PTWB=DAYLIGHT and read its constant WRGB from the Info section (or the WRGB HUD).
  • The highlight roll-off is a port of Power-Knee.dctl from xtremestuff/resolve-dctl (MIT — see THIRD-PARTY-LICENSES.md), transcribed exactly so it stays bit-comparable with the reference DCTL and its inverse.
  • Dependencies are permissive only (telemetry-parser MIT/Apache-2.0, ofx-rs fork Apache-2.0). gyroflow-plugins (GPLv3) is architectural reference reading, never a code source.

About

GoPro Labs Wide=1 decoder

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors