MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / MakeVulkanCompositeResult

Function MakeVulkanCompositeResult

examples/VulkanBenchmark.cpp:2137–2156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2135}
2136
2137static BenchmarkResult MakeVulkanCompositeResult(const BenchmarkOptions& options, const QImage& overlay_image,
2138 const std::string& name, DecodeKind decode_kind,
2139 const std::string& decode_label) {
2140 BenchmarkResult result;
2141 result.name = name;
2142 result.decode_backend = decode_label;
2143 result.composite_backend = "custom_vulkan";
2144 result.hw_decode_requested = decode_kind != DecodeKind::Software;
2145 result.readback_to_cpu = decode_kind == DecodeKind::Cuda || decode_kind == DecodeKind::Vaapi || decode_kind == DecodeKind::Vulkan;
2146 result.upload_to_vulkan = true;
2147 result.note = decode_kind == DecodeKind::Software
2148 ? "Software decode -> RGBA upload -> custom Vulkan scale + alpha overlay"
2149 : decode_kind == DecodeKind::Cuda
2150 ? "CUDA decode -> CPU readback -> custom Vulkan scale + alpha overlay"
2151 : decode_kind == DecodeKind::Vaapi
2152 ? "VAAPI decode -> CPU readback -> custom Vulkan scale + alpha overlay"
2153 : "Vulkan decode -> CPU readback -> custom Vulkan scale + alpha overlay";
2154 result.stats = RunVulkanUploadBenchmark(options, overlay_image, decode_kind, result.hw_decode_used);
2155 return result;
2156}
2157
2158static BenchmarkResult MakeVulkanDirectResult(const BenchmarkOptions& options, const QImage& overlay_image) {
2159 BenchmarkResult result;

Callers 1

mainFunction · 0.85

Calls 1

RunVulkanUploadBenchmarkFunction · 0.85

Tested by

no test coverage detected