oximedia-accel
Hardware acceleration layer for OxiMedia using Vulkan compute shaders, with automatic CPU fallback for systems without GPU support.
Part of the oximedia workspace — a comprehensive pure-Rust media processing framework.
Features
- Automatic GPU device enumeration and selection via Vulkan
- Efficient GPU memory allocation and buffer transfer
- Compute kernels: image scaling, color conversion, motion estimation
- Automatic CPU fallback when GPU is unavailable
- Safe Vulkan API access via vulkano
- Task graph scheduling for concurrent GPU operations
- Memory arena and pool management
- Fence timeline for GPU synchronization
- Pipeline acceleration abstractions
- Profiling and performance statistics
- Prefetch and cache management
Usage
Add to your Cargo.toml:
[]
= "0.1.0"
use ;
use PixelFormat;
API Overview
Core types:
AccelContext— Main entry point; selects GPU or CPU backend automaticallyHardwareAccel(trait) — Unified interface for GPU and CPU implementationsScaleFilter— Scaling filter variants (nearest, bilinear, bicubic)AccelError,AccelResult— Error types
Backends:
VulkanAccel— Vulkan compute backendCpuFallback— Pure-CPU fallback implementation
Modules (37 source files, 401 public items):
device,device_caps— GPU device management and capability detectionbuffer,pool,memory_arena,memory_bandwidth— Memory managementkernels,shaders— Compute kernels and SPIR-V shaderstask_graph,task_scheduler,dispatch— Parallel task schedulingpipeline_accel— Pipeline-level accelerationfence_timeline— GPU synchronization primitivesops— High-level compute operationscache,prefetch— Caching and prefetch strategiesaccel_profile,accel_stats— Profiling and statisticstraits— Core trait definitionserror— Error types
License
Apache-2.0 — Copyright 2024-2026 COOLJAPAN OU (Team Kitasan)