obs-StreamFX/source/nvidia/vfx/nvidia-vfx-denoising.hpp

50 lines
1.5 KiB
C++
Raw Normal View History

// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2021-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// AUTOGENERATED COPYRIGHT HEADER END
#pragma once
#include "nvidia-vfx-effect.hpp"
#include "nvidia-vfx.hpp"
#include "nvidia/cuda/nvidia-cuda-gs-texture.hpp"
#include "nvidia/cuda/nvidia-cuda-obs.hpp"
#include "nvidia/cuda/nvidia-cuda.hpp"
#include "nvidia/cv/nvidia-cv-image.hpp"
#include "nvidia/cv/nvidia-cv-texture.hpp"
#include "obs/gs/gs-texture.hpp"
namespace streamfx::nvidia::vfx {
class denoising : protected effect {
bool _dirty;
std::shared_ptr<::streamfx::nvidia::cv::texture> _input;
std::shared_ptr<::streamfx::nvidia::cv::image> _convert_to_fp32;
std::shared_ptr<::streamfx::nvidia::cv::image> _source;
std::shared_ptr<::streamfx::nvidia::cv::image> _destination;
std::shared_ptr<::streamfx::nvidia::cv::image> _convert_to_u8;
std::shared_ptr<::streamfx::nvidia::cv::texture> _output;
std::shared_ptr<::streamfx::nvidia::cv::image> _tmp;
void* _states[1];
::streamfx::nvidia::cuda::device_ptr_t _state;
uint32_t _state_size;
float _strength;
public:
~denoising();
denoising();
void set_strength(float strength);
float strength();
void size(std::pair<uint32_t, uint32_t>& size);
std::shared_ptr<::streamfx::obs::gs::texture> process(std::shared_ptr<::streamfx::obs::gs::texture> in);
private:
void resize(uint32_t width, uint32_t height);
void load();
};
} // namespace streamfx::nvidia::vfx