mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-15 08:15:06 +00:00
5a3954ae0e
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project. Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
// 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
|