home/ atoms/ hap-gpu-decompression

The HAP codec decompresses on the GPU to enable many simultaneous high-resolution video streams

HAP is a family of video codecs that store frames in GPU-native texture formats (DXT/S3TC, BC7, and similar), so the graphics hardware performs the final decompression step rather than the CPU. Because the GPU has dedicated fixed-function texture units for these formats, decompression is nearly free from the CPU’s perspective. This makes real-time playback of many simultaneous high-resolution or 4K streams feasible on modest hardware — a case that would saturate the CPU with a CPU-decoded codec like H.264. The tradeoff is storage bandwidth: HAP files are substantially larger than H.264 at the same resolution, trading disk space for CPU headroom. Variant choice (Hap, Hap Alpha, Hap Q, Hap Q Alpha, Hap R, Hap HDR) balances quality, alpha-channel support, and data rate against the playback system’s storage throughput. Some hosts provide a dedicated HAP-optimized playback module, though a standard video module can usually play HAP acceptably.

Examples

In Resolume or VDMX, six simultaneous 1080p layers encoded as Hap Q stay CPU-idle, while the same clips as H.264 peg the CPU and stutter at three layers. Encode 4K loops as HAP and load them in VPT’s HAP source module; the CPU meter stays low across several streams.

Assessment

For a rig needing four simultaneous 1080p clips, explain why HAP is preferred over H.264 and what happens to CPU load versus storage-bandwidth demand when you switch. Compare HAP and H.264: which uses more disk space and which more CPU during playback?

“HAP is a family of video codecs which perform decompression using a computer's graphics hardware, substantially reducing the CPU usage necessary to play video”
corpus · hap-video-codecs-open-source-gpu-accelerated-playback-vidvox · chunk 1
“the hap module is optimised for videos encoded using the HAP codec (although the standard video module does a pretty good job at playing back HAP videoes as well)”
corpus · vpt-8-documentation-hc-gilje-s-free-projection-tool · chunk 6