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

Function ForceOpaqueAlpha

examples/VulkanBenchmark.cpp:768–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768static void ForceOpaqueAlpha(AVFrame* frame) {
769 if (!frame || frame->format != AV_PIX_FMT_RGBA)
770 throw std::runtime_error("ForceOpaqueAlpha expects an RGBA software frame");
771 CheckAv(av_frame_make_writable(frame), "av_frame_make_writable opaque alpha");
772 for (int y = 0; y < frame->height; ++y) {
773 uint8_t* row = frame->data[0] + y * frame->linesize[0];
774 for (int x = 0; x < frame->width; ++x) {
775 row[x * 4 + 3] = 255;
776 }
777 }
778}
779
780static TimingStats RunCpuCompositeBenchmark(const BenchmarkOptions& options, const QImage& overlay_image,
781 DecodeKind decode_kind, bool& used_hw_decode) {

Callers 1

RunVulkanUploadBenchmarkFunction · 0.85

Calls 1

CheckAvFunction · 0.85

Tested by

no test coverage detected