Expand description
CPU-vs-GPU backend selection.
The decision compares estimated end-to-end times built from measured
throughputs: a one-time GPU micro-benchmark (GpuCalibration, cached per
context) and CPU throughputs supplied by the caller (CpuCosts, measured by
the flashraw facade the same way). Hard rules come first: software adapters are
never auto-selected, tiny frames stay on the CPU, and outputs that need no
processing never go through the GPU.
Structs§
- CpuCosts
- CPU throughputs (pixels per ms with all threads) for the same operations.
- Decision
- Outcome of
decide. - GpuCalibration
- Measured GPU characteristics.
- Workload
- Description of one decode for the cost model.
Enums§
- Work
Output - What the caller wants produced.
Constants§
- GPU_
MARGIN - The GPU must win by this factor (estimates are noisy; CPU is the safer default).
- MIN_
GPU_ SAMPLES - Frames below this size stay on the CPU (fixed GPU overheads dominate).
Functions§
- decide
- Estimate CPU and GPU times and choose.