ACMX 2.136.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
media_utils.hpp
Go to the documentation of this file.
1#ifndef ACMXVK_APP_MEDIA_UTILS_HPP
2#define ACMXVK_APP_MEDIA_UTILS_HPP
3
4#include "options.hpp"
5
6#include <opencv2/core.hpp>
7
8#include <cstdint>
9#include <iosfwd>
10#include <string>
11#include <vector>
12
13namespace acmxvk {
14
15 struct VideoHdrInfo {
16 bool valid = false;
17 bool hdr = false;
18 int bit_depth = 0;
21 int color_space = 0;
22 int color_range = 0;
23 std::vector<std::uint8_t> mastering_display;
24 std::vector<std::uint8_t> content_light;
25 };
26
27 [[nodiscard]] cv::Mat loadRgbaImage(const std::string &filename);
28 [[nodiscard]] double probeVideoDuration(const std::string &filename);
29 [[nodiscard]] VideoHdrInfo probeVideoHdrInfo(const std::string &filename);
30 void printVideoHdrInfo(const VideoHdrInfo &info, std::ostream &output);
31 void rotateFrame(cv::Mat &frame, FrameRotation rotation);
32 [[nodiscard]] bool rotationSwapsDimensions(FrameRotation rotation);
33#ifdef ACMXVK_WITH_MXVK_CUDA
34 void select_cuda_device(int device_index);
35 void list_cuda_devices(std::ostream &output);
36#endif
37
38} // namespace acmxvk
39
40#endif
cv::Mat loadRgbaImage(const std::string &filename)
bool rotationSwapsDimensions(FrameRotation rotation)
double probeVideoDuration(const std::string &filename)
void printVideoHdrInfo(const VideoHdrInfo &info, std::ostream &output)
void rotateFrame(cv::Mat &frame, FrameRotation rotation)
VideoHdrInfo probeVideoHdrInfo(const std::string &filename)
FrameRotation
Definition options.hpp:35
std::vector< std::uint8_t > content_light
std::vector< std::uint8_t > mastering_display