| 766 | } |
| 767 | |
| 768 | static 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 | |
| 780 | static TimingStats RunCpuCompositeBenchmark(const BenchmarkOptions& options, const QImage& overlay_image, |
| 781 | DecodeKind decode_kind, bool& used_hw_decode) { |
no test coverage detected