Imported Upstream version 0.13.2+dsfg1
This commit is contained in:
commit
fb3990e9e5
2036 changed files with 287360 additions and 0 deletions
21
plugins/obs-filters/CMakeLists.txt
Normal file
21
plugins/obs-filters/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
project(obs-filters)
|
||||
|
||||
set(obs-filters_SOURCES
|
||||
obs-filters.c
|
||||
color-filter.c
|
||||
async-delay-filter.c
|
||||
crop-filter.c
|
||||
scroll-filter.c
|
||||
chroma-key-filter.c
|
||||
color-key-filter.c
|
||||
sharpness-filter.c
|
||||
gain-filter.c
|
||||
noise-gate-filter.c
|
||||
mask-filter.c)
|
||||
|
||||
add_library(obs-filters MODULE
|
||||
${obs-filters_SOURCES})
|
||||
target_link_libraries(obs-filters
|
||||
libobs)
|
||||
|
||||
install_obs_plugin_with_data(obs-filters data)
|
||||
244
plugins/obs-filters/async-delay-filter.c
Normal file
244
plugins/obs-filters/async-delay-filter.c
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
#include <obs-module.h>
|
||||
#include <util/circlebuf.h>
|
||||
|
||||
#ifndef SEC_TO_NSEC
|
||||
#define SEC_TO_NSEC 1000000000ULL
|
||||
#endif
|
||||
|
||||
#ifndef MSEC_TO_NSEC
|
||||
#define MSEC_TO_NSEC 1000000ULL
|
||||
#endif
|
||||
|
||||
#define SETTING_DELAY_MS "delay_ms"
|
||||
|
||||
#define TEXT_DELAY_MS obs_module_text("DelayMs")
|
||||
|
||||
struct async_delay_data {
|
||||
obs_source_t *context;
|
||||
|
||||
/* contains struct obs_source_frame* */
|
||||
struct circlebuf video_frames;
|
||||
|
||||
/* stores the audio data */
|
||||
struct circlebuf audio_frames;
|
||||
struct obs_audio_data audio_output;
|
||||
|
||||
uint64_t last_video_ts;
|
||||
uint64_t last_audio_ts;
|
||||
uint64_t interval;
|
||||
uint64_t samplerate;
|
||||
bool video_delay_reached;
|
||||
bool audio_delay_reached;
|
||||
bool reset_video;
|
||||
bool reset_audio;
|
||||
};
|
||||
|
||||
static const char *async_delay_filter_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("AsyncDelayFilter");
|
||||
}
|
||||
|
||||
static void free_video_data(struct async_delay_data *filter,
|
||||
obs_source_t *parent)
|
||||
{
|
||||
while (filter->video_frames.size) {
|
||||
struct obs_source_frame *frame;
|
||||
|
||||
circlebuf_pop_front(&filter->video_frames, &frame,
|
||||
sizeof(struct obs_source_frame*));
|
||||
obs_source_release_frame(parent, frame);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void free_audio_packet(struct obs_audio_data *audio)
|
||||
{
|
||||
for (size_t i = 0; i < MAX_AV_PLANES; i++)
|
||||
bfree(audio->data[i]);
|
||||
memset(audio, 0, sizeof(*audio));
|
||||
}
|
||||
|
||||
static void free_audio_data(struct async_delay_data *filter)
|
||||
{
|
||||
while (filter->audio_frames.size) {
|
||||
struct obs_audio_data audio;
|
||||
|
||||
circlebuf_pop_front(&filter->audio_frames, &audio,
|
||||
sizeof(struct obs_audio_data));
|
||||
free_audio_packet(&audio);
|
||||
}
|
||||
}
|
||||
|
||||
static void async_delay_filter_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct async_delay_data *filter = data;
|
||||
uint64_t new_interval = (uint64_t)obs_data_get_int(settings,
|
||||
SETTING_DELAY_MS) * MSEC_TO_NSEC;
|
||||
|
||||
if (new_interval < filter->interval)
|
||||
free_video_data(filter, obs_filter_get_parent(filter->context));
|
||||
|
||||
filter->reset_audio = true;
|
||||
filter->reset_video = true;
|
||||
filter->interval = new_interval;
|
||||
filter->video_delay_reached = false;
|
||||
filter->audio_delay_reached = false;
|
||||
}
|
||||
|
||||
static void *async_delay_filter_create(obs_data_t *settings,
|
||||
obs_source_t *context)
|
||||
{
|
||||
struct async_delay_data *filter = bzalloc(sizeof(*filter));
|
||||
struct obs_audio_info oai;
|
||||
|
||||
filter->context = context;
|
||||
async_delay_filter_update(filter, settings);
|
||||
|
||||
obs_get_audio_info(&oai);
|
||||
filter->samplerate = oai.samples_per_sec;
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void async_delay_filter_destroy(void *data)
|
||||
{
|
||||
struct async_delay_data *filter = data;
|
||||
|
||||
free_audio_packet(&filter->audio_output);
|
||||
circlebuf_free(&filter->video_frames);
|
||||
circlebuf_free(&filter->audio_frames);
|
||||
bfree(data);
|
||||
}
|
||||
|
||||
static obs_properties_t *async_delay_filter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_properties_add_int(props, SETTING_DELAY_MS, TEXT_DELAY_MS,
|
||||
0, 6000, 1);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void async_delay_filter_remove(void *data, obs_source_t *parent)
|
||||
{
|
||||
struct async_delay_data *filter = data;
|
||||
|
||||
free_video_data(filter, parent);
|
||||
free_audio_data(filter);
|
||||
}
|
||||
|
||||
/* due to the fact that we need timing information to be consistent in order to
|
||||
* measure the current interval of data, if there is an unexpected hiccup or
|
||||
* jump with the timestamps, reset the cached delay data and start again to
|
||||
* ensure that the timing is consistent */
|
||||
static inline bool is_timestamp_jump(uint64_t ts, uint64_t prev_ts)
|
||||
{
|
||||
return ts < prev_ts || (ts - prev_ts) > SEC_TO_NSEC;
|
||||
}
|
||||
|
||||
static struct obs_source_frame *async_delay_filter_video(void *data,
|
||||
struct obs_source_frame *frame)
|
||||
{
|
||||
struct async_delay_data *filter = data;
|
||||
obs_source_t *parent = obs_filter_get_parent(filter->context);
|
||||
struct obs_source_frame *output;
|
||||
uint64_t cur_interval;
|
||||
|
||||
if (filter->reset_video ||
|
||||
is_timestamp_jump(frame->timestamp, filter->last_video_ts)) {
|
||||
free_video_data(filter, parent);
|
||||
filter->video_delay_reached = false;
|
||||
filter->reset_video = false;
|
||||
}
|
||||
|
||||
filter->last_video_ts = frame->timestamp;
|
||||
|
||||
circlebuf_push_back(&filter->video_frames, &frame,
|
||||
sizeof(struct obs_source_frame*));
|
||||
circlebuf_peek_front(&filter->video_frames, &output,
|
||||
sizeof(struct obs_source_frame*));
|
||||
|
||||
cur_interval = frame->timestamp - output->timestamp;
|
||||
if (!filter->video_delay_reached && cur_interval < filter->interval)
|
||||
return NULL;
|
||||
|
||||
circlebuf_pop_front(&filter->video_frames, NULL,
|
||||
sizeof(struct obs_source_frame*));
|
||||
|
||||
if (!filter->video_delay_reached)
|
||||
filter->video_delay_reached = true;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
/* NOTE: Delaying audio shouldn't be necessary because the audio subsystem will
|
||||
* automatically sync audio to video frames */
|
||||
|
||||
/* #define DELAY_AUDIO */
|
||||
|
||||
#ifdef DELAY_AUDIO
|
||||
static struct obs_audio_data *async_delay_filter_audio(void *data,
|
||||
struct obs_audio_data *audio)
|
||||
{
|
||||
struct async_delay_data *filter = data;
|
||||
struct obs_audio_data cached = *audio;
|
||||
uint64_t cur_interval;
|
||||
uint64_t duration;
|
||||
uint64_t end_ts;
|
||||
|
||||
if (filter->reset_audio ||
|
||||
is_timestamp_jump(audio->timestamp, filter->last_audio_ts)) {
|
||||
free_audio_data(filter);
|
||||
filter->audio_delay_reached = false;
|
||||
filter->reset_audio = false;
|
||||
}
|
||||
|
||||
filter->last_audio_ts = audio->timestamp;
|
||||
|
||||
duration = (uint64_t)audio->frames * SEC_TO_NSEC / filter->samplerate;
|
||||
end_ts = audio->timestamp + duration;
|
||||
|
||||
for (size_t i = 0; i < MAX_AV_PLANES; i++) {
|
||||
if (!audio->data[i])
|
||||
break;
|
||||
|
||||
cached.data[i] = bmemdup(audio->data[i],
|
||||
audio->frames * sizeof(float));
|
||||
}
|
||||
|
||||
free_audio_packet(&filter->audio_output);
|
||||
|
||||
circlebuf_push_back(&filter->audio_frames, &cached, sizeof(cached));
|
||||
circlebuf_peek_front(&filter->audio_frames, &cached, sizeof(cached));
|
||||
|
||||
cur_interval = end_ts - cached.timestamp;
|
||||
if (!filter->audio_delay_reached && cur_interval < filter->interval)
|
||||
return NULL;
|
||||
|
||||
circlebuf_pop_front(&filter->audio_frames, NULL, sizeof(cached));
|
||||
memcpy(&filter->audio_output, &cached, sizeof(cached));
|
||||
|
||||
if (!filter->audio_delay_reached)
|
||||
filter->audio_delay_reached = true;
|
||||
|
||||
return &filter->audio_output;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct obs_source_info async_delay_filter = {
|
||||
.id = "async_delay_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO | OBS_SOURCE_ASYNC,
|
||||
.get_name = async_delay_filter_name,
|
||||
.create = async_delay_filter_create,
|
||||
.destroy = async_delay_filter_destroy,
|
||||
.update = async_delay_filter_update,
|
||||
.get_properties = async_delay_filter_properties,
|
||||
.filter_video = async_delay_filter_video,
|
||||
#ifdef DELAY_AUDIO
|
||||
.filter_audio = async_delay_filter_audio,
|
||||
#endif
|
||||
.filter_remove = async_delay_filter_remove
|
||||
};
|
||||
289
plugins/obs-filters/chroma-key-filter.c
Normal file
289
plugins/obs-filters/chroma-key-filter.c
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
#include <obs-module.h>
|
||||
#include <graphics/matrix4.h>
|
||||
#include <graphics/vec2.h>
|
||||
#include <graphics/vec4.h>
|
||||
|
||||
#define SETTING_OPACITY "opacity"
|
||||
#define SETTING_CONTRAST "contrast"
|
||||
#define SETTING_BRIGHTNESS "brightness"
|
||||
#define SETTING_GAMMA "gamma"
|
||||
#define SETTING_COLOR_TYPE "key_color_type"
|
||||
#define SETTING_KEY_COLOR "key_color"
|
||||
#define SETTING_SIMILARITY "similarity"
|
||||
#define SETTING_SMOOTHNESS "smoothness"
|
||||
#define SETTING_SPILL "spill"
|
||||
|
||||
#define TEXT_OPACITY obs_module_text("Opacity")
|
||||
#define TEXT_CONTRAST obs_module_text("Contrast")
|
||||
#define TEXT_BRIGHTNESS obs_module_text("Brightness")
|
||||
#define TEXT_GAMMA obs_module_text("Gamma")
|
||||
#define TEXT_COLOR_TYPE obs_module_text("KeyColorType")
|
||||
#define TEXT_KEY_COLOR obs_module_text("KeyColor")
|
||||
#define TEXT_SIMILARITY obs_module_text("Similarity")
|
||||
#define TEXT_SMOOTHNESS obs_module_text("Smoothness")
|
||||
#define TEXT_SPILL obs_module_text("ColorSpillReduction")
|
||||
|
||||
struct chroma_key_filter_data {
|
||||
obs_source_t *context;
|
||||
|
||||
gs_effect_t *effect;
|
||||
|
||||
gs_eparam_t *color_param;
|
||||
gs_eparam_t *contrast_param;
|
||||
gs_eparam_t *brightness_param;
|
||||
gs_eparam_t *gamma_param;
|
||||
|
||||
gs_eparam_t *pixel_size_param;
|
||||
gs_eparam_t *chroma_param;
|
||||
gs_eparam_t *key_rgb_param;
|
||||
gs_eparam_t *similarity_param;
|
||||
gs_eparam_t *smoothness_param;
|
||||
gs_eparam_t *spill_param;
|
||||
|
||||
struct vec4 color;
|
||||
float contrast;
|
||||
float brightness;
|
||||
float gamma;
|
||||
|
||||
struct vec4 key_rgb;
|
||||
struct vec2 chroma;
|
||||
float similarity;
|
||||
float smoothness;
|
||||
float spill;
|
||||
};
|
||||
|
||||
static const char *chroma_key_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("ChromaKeyFilter");
|
||||
}
|
||||
|
||||
static const float yuv_mat[16] = {0.182586f, -0.100644f, 0.439216f, 0.0f,
|
||||
0.614231f, -0.338572f, -0.398942f, 0.0f,
|
||||
0.062007f, 0.439216f, -0.040274f, 0.0f,
|
||||
0.062745f, 0.501961f, 0.501961f, 1.0f};
|
||||
|
||||
static inline void color_settings_update(
|
||||
struct chroma_key_filter_data *filter, obs_data_t *settings)
|
||||
{
|
||||
uint32_t opacity = (uint32_t)obs_data_get_int(settings,
|
||||
SETTING_OPACITY);
|
||||
uint32_t color = 0xFFFFFF | (((opacity * 255) / 100) << 24);
|
||||
double contrast = obs_data_get_double(settings, SETTING_CONTRAST);
|
||||
double brightness = obs_data_get_double(settings, SETTING_BRIGHTNESS);
|
||||
double gamma = obs_data_get_double(settings, SETTING_GAMMA);
|
||||
|
||||
contrast = (contrast < 0.0) ?
|
||||
(1.0 / (-contrast + 1.0)) : (contrast + 1.0);
|
||||
|
||||
brightness *= 0.5;
|
||||
|
||||
gamma = (gamma < 0.0) ? (-gamma + 1.0) : (1.0 / (gamma + 1.0));
|
||||
|
||||
filter->contrast = (float)contrast;
|
||||
filter->brightness = (float)brightness;
|
||||
filter->gamma = (float)gamma;
|
||||
|
||||
vec4_from_rgba(&filter->color, color);
|
||||
}
|
||||
|
||||
static inline void chroma_settings_update(
|
||||
struct chroma_key_filter_data *filter, obs_data_t *settings)
|
||||
{
|
||||
int64_t similarity = obs_data_get_int(settings, SETTING_SIMILARITY);
|
||||
int64_t smoothness = obs_data_get_int(settings, SETTING_SMOOTHNESS);
|
||||
int64_t spill = obs_data_get_int(settings, SETTING_SPILL);
|
||||
uint32_t key_color = (uint32_t)obs_data_get_int(settings,
|
||||
SETTING_KEY_COLOR);
|
||||
const char *key_type = obs_data_get_string(settings,
|
||||
SETTING_COLOR_TYPE);
|
||||
struct vec4 key_color_v4;
|
||||
struct matrix4 yuv_mat_m4;
|
||||
|
||||
if (strcmp(key_type, "green") == 0)
|
||||
key_color = 0x00FF00;
|
||||
else if (strcmp(key_type, "blue") == 0)
|
||||
key_color = 0xFF9900;
|
||||
else if (strcmp(key_type, "magenta") == 0)
|
||||
key_color = 0xFF00FF;
|
||||
|
||||
vec4_from_rgba(&filter->key_rgb, key_color | 0xFF000000);
|
||||
|
||||
memcpy(&yuv_mat_m4, yuv_mat, sizeof(yuv_mat));
|
||||
vec4_transform(&key_color_v4, &filter->key_rgb, &yuv_mat_m4);
|
||||
vec2_set(&filter->chroma, key_color_v4.y, key_color_v4.z);
|
||||
|
||||
filter->similarity = (float)similarity / 1000.0f;
|
||||
filter->smoothness = (float)smoothness / 1000.0f;
|
||||
filter->spill = (float)spill / 1000.0f;
|
||||
}
|
||||
|
||||
static void chroma_key_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct chroma_key_filter_data *filter = data;
|
||||
|
||||
color_settings_update(filter, settings);
|
||||
chroma_settings_update(filter, settings);
|
||||
}
|
||||
|
||||
static void chroma_key_destroy(void *data)
|
||||
{
|
||||
struct chroma_key_filter_data *filter = data;
|
||||
|
||||
if (filter->effect) {
|
||||
obs_enter_graphics();
|
||||
gs_effect_destroy(filter->effect);
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
bfree(data);
|
||||
}
|
||||
|
||||
static void *chroma_key_create(obs_data_t *settings, obs_source_t *context)
|
||||
{
|
||||
struct chroma_key_filter_data *filter =
|
||||
bzalloc(sizeof(struct chroma_key_filter_data));
|
||||
char *effect_path = obs_module_file("chroma_key_filter.effect");
|
||||
|
||||
filter->context = context;
|
||||
|
||||
obs_enter_graphics();
|
||||
|
||||
filter->effect = gs_effect_create_from_file(effect_path, NULL);
|
||||
if (filter->effect) {
|
||||
filter->color_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "color");
|
||||
filter->contrast_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "contrast");
|
||||
filter->brightness_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "brightness");
|
||||
filter->gamma_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "gamma");
|
||||
filter->chroma_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "chroma_key");
|
||||
filter->key_rgb_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "key_rgb");
|
||||
filter->pixel_size_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "pixel_size");
|
||||
filter->similarity_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "similarity");
|
||||
filter->smoothness_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "smoothness");
|
||||
filter->spill_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "spill");
|
||||
}
|
||||
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(effect_path);
|
||||
|
||||
if (!filter->effect) {
|
||||
chroma_key_destroy(filter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
chroma_key_update(filter, settings);
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void chroma_key_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct chroma_key_filter_data *filter = data;
|
||||
obs_source_t *target = obs_filter_get_target(filter->context);
|
||||
uint32_t width = obs_source_get_base_width(target);
|
||||
uint32_t height = obs_source_get_base_height(target);
|
||||
struct vec2 pixel_size;
|
||||
|
||||
obs_source_process_filter_begin(filter->context, GS_RGBA,
|
||||
OBS_ALLOW_DIRECT_RENDERING);
|
||||
|
||||
vec2_set(&pixel_size, 1.0f / (float)width, 1.0f / (float)height);
|
||||
|
||||
gs_effect_set_vec4(filter->color_param, &filter->color);
|
||||
gs_effect_set_float(filter->contrast_param, filter->contrast);
|
||||
gs_effect_set_float(filter->brightness_param, filter->brightness);
|
||||
gs_effect_set_float(filter->gamma_param, filter->gamma);
|
||||
gs_effect_set_vec2(filter->chroma_param, &filter->chroma);
|
||||
gs_effect_set_vec4(filter->key_rgb_param, &filter->key_rgb);
|
||||
gs_effect_set_vec2(filter->pixel_size_param, &pixel_size);
|
||||
gs_effect_set_float(filter->similarity_param, filter->similarity);
|
||||
gs_effect_set_float(filter->smoothness_param, filter->smoothness);
|
||||
gs_effect_set_float(filter->spill_param, filter->spill);
|
||||
|
||||
obs_source_process_filter_end(filter->context, filter->effect, 0, 0);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
static bool key_type_changed(obs_properties_t *props, obs_property_t *p,
|
||||
obs_data_t *settings)
|
||||
{
|
||||
const char *type = obs_data_get_string(settings, SETTING_COLOR_TYPE);
|
||||
bool custom = strcmp(type, "custom") == 0;
|
||||
|
||||
obs_property_set_visible(obs_properties_get(props, SETTING_KEY_COLOR),
|
||||
custom);
|
||||
|
||||
UNUSED_PARAMETER(p);
|
||||
return true;
|
||||
}
|
||||
|
||||
static obs_properties_t *chroma_key_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_property_t *p = obs_properties_add_list(props,
|
||||
SETTING_COLOR_TYPE, TEXT_COLOR_TYPE,
|
||||
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
|
||||
obs_property_list_add_string(p, obs_module_text("Green"), "green");
|
||||
obs_property_list_add_string(p, obs_module_text("Blue"), "blue");
|
||||
obs_property_list_add_string(p, obs_module_text("Magenta"), "magenta");
|
||||
obs_property_list_add_string(p, obs_module_text("Custom"), "custom");
|
||||
|
||||
obs_property_set_modified_callback(p, key_type_changed);
|
||||
|
||||
obs_properties_add_color(props, SETTING_KEY_COLOR, TEXT_KEY_COLOR);
|
||||
obs_properties_add_int_slider(props, SETTING_SIMILARITY,
|
||||
TEXT_SIMILARITY, 1, 1000, 1);
|
||||
obs_properties_add_int_slider(props, SETTING_SMOOTHNESS,
|
||||
TEXT_SMOOTHNESS, 1, 1000, 1);
|
||||
obs_properties_add_int_slider(props, SETTING_SPILL,
|
||||
TEXT_SPILL, 1, 1000, 1);
|
||||
|
||||
obs_properties_add_int(props, SETTING_OPACITY, TEXT_OPACITY, 0, 100, 1);
|
||||
obs_properties_add_float_slider(props, SETTING_CONTRAST,
|
||||
TEXT_CONTRAST, -1.0, 1.0, 0.01);
|
||||
obs_properties_add_float_slider(props, SETTING_BRIGHTNESS,
|
||||
TEXT_BRIGHTNESS, -1.0, 1.0, 0.01);
|
||||
obs_properties_add_float_slider(props, SETTING_GAMMA,
|
||||
TEXT_GAMMA, -1.0, 1.0, 0.01);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void chroma_key_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_int(settings, SETTING_OPACITY, 100);
|
||||
obs_data_set_default_double(settings, SETTING_CONTRAST, 0.0);
|
||||
obs_data_set_default_double(settings, SETTING_BRIGHTNESS, 0.0);
|
||||
obs_data_set_default_double(settings, SETTING_GAMMA, 0.0);
|
||||
obs_data_set_default_int(settings, SETTING_KEY_COLOR, 0x00FF00);
|
||||
obs_data_set_default_string(settings, SETTING_COLOR_TYPE, "green");
|
||||
obs_data_set_default_int(settings, SETTING_SIMILARITY, 400);
|
||||
obs_data_set_default_int(settings, SETTING_SMOOTHNESS, 80);
|
||||
obs_data_set_default_int(settings, SETTING_SPILL, 100);
|
||||
}
|
||||
|
||||
struct obs_source_info chroma_key_filter = {
|
||||
.id = "chroma_key_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO,
|
||||
.get_name = chroma_key_name,
|
||||
.create = chroma_key_create,
|
||||
.destroy = chroma_key_destroy,
|
||||
.video_render = chroma_key_render,
|
||||
.update = chroma_key_update,
|
||||
.get_properties = chroma_key_properties,
|
||||
.get_defaults = chroma_key_defaults
|
||||
};
|
||||
173
plugins/obs-filters/color-filter.c
Normal file
173
plugins/obs-filters/color-filter.c
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
#include <obs-module.h>
|
||||
#include <graphics/vec4.h>
|
||||
|
||||
#define SETTING_COLOR "color"
|
||||
#define SETTING_OPACITY "opacity"
|
||||
#define SETTING_CONTRAST "contrast"
|
||||
#define SETTING_BRIGHTNESS "brightness"
|
||||
#define SETTING_GAMMA "gamma"
|
||||
|
||||
#define TEXT_COLOR obs_module_text("Color")
|
||||
#define TEXT_OPACITY obs_module_text("Opacity")
|
||||
#define TEXT_CONTRAST obs_module_text("Contrast")
|
||||
#define TEXT_BRIGHTNESS obs_module_text("Brightness")
|
||||
#define TEXT_GAMMA obs_module_text("Gamma")
|
||||
|
||||
#define MIN_CONTRAST 0.5f
|
||||
#define MAX_CONTRAST 2.0f
|
||||
#define MIN_BRIGHTNESS -1.0
|
||||
#define MAX_BRIGHTNESS 1.0
|
||||
|
||||
struct color_filter_data {
|
||||
obs_source_t *context;
|
||||
|
||||
gs_effect_t *effect;
|
||||
|
||||
gs_eparam_t *color_param;
|
||||
gs_eparam_t *contrast_param;
|
||||
gs_eparam_t *brightness_param;
|
||||
gs_eparam_t *gamma_param;
|
||||
|
||||
struct vec4 color;
|
||||
float contrast;
|
||||
float brightness;
|
||||
float gamma;
|
||||
};
|
||||
|
||||
static const char *color_filter_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("ColorFilter");
|
||||
}
|
||||
|
||||
static void color_filter_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct color_filter_data *filter = data;
|
||||
uint32_t color = (uint32_t)obs_data_get_int(settings, SETTING_COLOR);
|
||||
uint32_t opacity = (uint32_t)obs_data_get_int(settings,
|
||||
SETTING_OPACITY);
|
||||
double contrast = obs_data_get_double(settings, SETTING_CONTRAST);
|
||||
double brightness = obs_data_get_double(settings, SETTING_BRIGHTNESS);
|
||||
double gamma = obs_data_get_double(settings, SETTING_GAMMA);
|
||||
|
||||
color &= 0xFFFFFF;
|
||||
color |= ((opacity * 255) / 100) << 24;
|
||||
|
||||
vec4_from_rgba(&filter->color, color);
|
||||
|
||||
contrast = (contrast < 0.0) ?
|
||||
(1.0 / (-contrast + 1.0)) : (contrast + 1.0);
|
||||
|
||||
brightness *= 0.5;
|
||||
|
||||
gamma = (gamma < 0.0) ? (-gamma + 1.0) : (1.0 / (gamma + 1.0));
|
||||
|
||||
filter->contrast = (float)contrast;
|
||||
filter->brightness = (float)brightness;
|
||||
filter->gamma = (float)gamma;
|
||||
}
|
||||
|
||||
static void color_filter_destroy(void *data)
|
||||
{
|
||||
struct color_filter_data *filter = data;
|
||||
|
||||
if (filter->effect) {
|
||||
obs_enter_graphics();
|
||||
gs_effect_destroy(filter->effect);
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
bfree(data);
|
||||
}
|
||||
|
||||
static void *color_filter_create(obs_data_t *settings, obs_source_t *context)
|
||||
{
|
||||
struct color_filter_data *filter =
|
||||
bzalloc(sizeof(struct color_filter_data));
|
||||
char *effect_path = obs_module_file("color_filter.effect");
|
||||
|
||||
filter->context = context;
|
||||
|
||||
obs_enter_graphics();
|
||||
|
||||
filter->effect = gs_effect_create_from_file(effect_path, NULL);
|
||||
if (filter->effect) {
|
||||
filter->color_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "color");
|
||||
filter->contrast_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "contrast");
|
||||
filter->brightness_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "brightness");
|
||||
filter->gamma_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "gamma");
|
||||
}
|
||||
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(effect_path);
|
||||
|
||||
if (!filter->effect) {
|
||||
color_filter_destroy(filter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
color_filter_update(filter, settings);
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void color_filter_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct color_filter_data *filter = data;
|
||||
|
||||
obs_source_process_filter_begin(filter->context, GS_RGBA,
|
||||
OBS_ALLOW_DIRECT_RENDERING);
|
||||
|
||||
gs_effect_set_vec4(filter->color_param, &filter->color);
|
||||
gs_effect_set_float(filter->contrast_param, filter->contrast);
|
||||
gs_effect_set_float(filter->brightness_param, filter->brightness);
|
||||
gs_effect_set_float(filter->gamma_param, filter->gamma);
|
||||
|
||||
obs_source_process_filter_end(filter->context, filter->effect, 0, 0);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
static obs_properties_t *color_filter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_properties_add_color(props, SETTING_COLOR, TEXT_COLOR);
|
||||
obs_properties_add_int(props, SETTING_OPACITY, TEXT_OPACITY,
|
||||
0, 100, 1);
|
||||
obs_properties_add_float_slider(props, SETTING_CONTRAST,
|
||||
TEXT_CONTRAST, -1.0, 1.0, 0.01);
|
||||
obs_properties_add_float_slider(props, SETTING_BRIGHTNESS,
|
||||
TEXT_BRIGHTNESS, -1.0, 1.0, 0.01);
|
||||
obs_properties_add_float_slider(props, SETTING_GAMMA,
|
||||
TEXT_GAMMA, -1.0, 1.0, 0.01);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void color_filter_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_int(settings, SETTING_COLOR, 0xFFFFFF);
|
||||
obs_data_set_default_int(settings, SETTING_OPACITY, 100);
|
||||
obs_data_set_default_double(settings, SETTING_CONTRAST, 0.0);
|
||||
obs_data_set_default_double(settings, SETTING_BRIGHTNESS, 0.0);
|
||||
obs_data_set_default_double(settings, SETTING_GAMMA, 0.0);
|
||||
}
|
||||
|
||||
struct obs_source_info color_filter = {
|
||||
.id = "color_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO,
|
||||
.get_name = color_filter_name,
|
||||
.create = color_filter_create,
|
||||
.destroy = color_filter_destroy,
|
||||
.video_render = color_filter_render,
|
||||
.update = color_filter_update,
|
||||
.get_properties = color_filter_properties,
|
||||
.get_defaults = color_filter_defaults
|
||||
};
|
||||
255
plugins/obs-filters/color-key-filter.c
Normal file
255
plugins/obs-filters/color-key-filter.c
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
#include <obs-module.h>
|
||||
#include <graphics/matrix4.h>
|
||||
#include <graphics/vec2.h>
|
||||
#include <graphics/vec4.h>
|
||||
|
||||
#define SETTING_OPACITY "opacity"
|
||||
#define SETTING_CONTRAST "contrast"
|
||||
#define SETTING_BRIGHTNESS "brightness"
|
||||
#define SETTING_GAMMA "gamma"
|
||||
#define SETTING_COLOR_TYPE "key_color_type"
|
||||
#define SETTING_KEY_COLOR "key_color"
|
||||
#define SETTING_SIMILARITY "similarity"
|
||||
#define SETTING_SMOOTHNESS "smoothness"
|
||||
|
||||
#define TEXT_OPACITY obs_module_text("Opacity")
|
||||
#define TEXT_CONTRAST obs_module_text("Contrast")
|
||||
#define TEXT_BRIGHTNESS obs_module_text("Brightness")
|
||||
#define TEXT_GAMMA obs_module_text("Gamma")
|
||||
#define TEXT_COLOR_TYPE obs_module_text("KeyColorType")
|
||||
#define TEXT_KEY_COLOR obs_module_text("KeyColor")
|
||||
#define TEXT_SIMILARITY obs_module_text("Similarity")
|
||||
#define TEXT_SMOOTHNESS obs_module_text("Smoothness")
|
||||
|
||||
struct color_key_filter_data {
|
||||
obs_source_t *context;
|
||||
|
||||
gs_effect_t *effect;
|
||||
|
||||
gs_eparam_t *color_param;
|
||||
gs_eparam_t *contrast_param;
|
||||
gs_eparam_t *brightness_param;
|
||||
gs_eparam_t *gamma_param;
|
||||
|
||||
gs_eparam_t *key_color_param;
|
||||
gs_eparam_t *similarity_param;
|
||||
gs_eparam_t *smoothness_param;
|
||||
|
||||
struct vec4 color;
|
||||
float contrast;
|
||||
float brightness;
|
||||
float gamma;
|
||||
|
||||
struct vec4 key_color;
|
||||
float similarity;
|
||||
float smoothness;
|
||||
};
|
||||
|
||||
static const char *color_key_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("ColorKeyFilter");
|
||||
}
|
||||
|
||||
static inline void color_settings_update(
|
||||
struct color_key_filter_data *filter, obs_data_t *settings)
|
||||
{
|
||||
uint32_t opacity = (uint32_t)obs_data_get_int(settings,
|
||||
SETTING_OPACITY);
|
||||
uint32_t color = 0xFFFFFF | (((opacity * 255) / 100) << 24);
|
||||
double contrast = obs_data_get_double(settings, SETTING_CONTRAST);
|
||||
double brightness = obs_data_get_double(settings, SETTING_BRIGHTNESS);
|
||||
double gamma = obs_data_get_double(settings, SETTING_GAMMA);
|
||||
|
||||
contrast = (contrast < 0.0) ?
|
||||
(1.0 / (-contrast + 1.0)) : (contrast + 1.0);
|
||||
|
||||
brightness *= 0.5;
|
||||
|
||||
gamma = (gamma < 0.0) ? (-gamma + 1.0) : (1.0 / (gamma + 1.0));
|
||||
|
||||
filter->contrast = (float)contrast;
|
||||
filter->brightness = (float)brightness;
|
||||
filter->gamma = (float)gamma;
|
||||
|
||||
vec4_from_rgba(&filter->color, color);
|
||||
}
|
||||
|
||||
static inline void key_settings_update(
|
||||
struct color_key_filter_data *filter, obs_data_t *settings)
|
||||
{
|
||||
int64_t similarity = obs_data_get_int(settings, SETTING_SIMILARITY);
|
||||
int64_t smoothness = obs_data_get_int(settings, SETTING_SMOOTHNESS);
|
||||
uint32_t key_color = (uint32_t)obs_data_get_int(settings,
|
||||
SETTING_KEY_COLOR);
|
||||
const char *key_type = obs_data_get_string(settings,
|
||||
SETTING_COLOR_TYPE);
|
||||
|
||||
if (strcmp(key_type, "green") == 0)
|
||||
key_color = 0x00FF00;
|
||||
else if (strcmp(key_type, "blue") == 0)
|
||||
key_color = 0xFF0000;
|
||||
else if (strcmp(key_type, "red") == 0)
|
||||
key_color = 0x0000FF;
|
||||
else if (strcmp(key_type, "magenta") == 0)
|
||||
key_color = 0xFF00FF;
|
||||
|
||||
vec4_from_rgba(&filter->key_color, key_color | 0xFF000000);
|
||||
|
||||
filter->similarity = (float)similarity / 1000.0f;
|
||||
filter->smoothness = (float)smoothness / 1000.0f;
|
||||
}
|
||||
|
||||
static void color_key_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct color_key_filter_data *filter = data;
|
||||
|
||||
color_settings_update(filter, settings);
|
||||
key_settings_update(filter, settings);
|
||||
}
|
||||
|
||||
static void color_key_destroy(void *data)
|
||||
{
|
||||
struct color_key_filter_data *filter = data;
|
||||
|
||||
if (filter->effect) {
|
||||
obs_enter_graphics();
|
||||
gs_effect_destroy(filter->effect);
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
bfree(data);
|
||||
}
|
||||
|
||||
static void *color_key_create(obs_data_t *settings, obs_source_t *context)
|
||||
{
|
||||
struct color_key_filter_data *filter =
|
||||
bzalloc(sizeof(struct color_key_filter_data));
|
||||
char *effect_path = obs_module_file("color_key_filter.effect");
|
||||
|
||||
filter->context = context;
|
||||
|
||||
obs_enter_graphics();
|
||||
|
||||
filter->effect = gs_effect_create_from_file(effect_path, NULL);
|
||||
if (filter->effect) {
|
||||
filter->color_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "color");
|
||||
filter->contrast_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "contrast");
|
||||
filter->brightness_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "brightness");
|
||||
filter->gamma_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "gamma");
|
||||
filter->key_color_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "key_color");
|
||||
filter->similarity_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "similarity");
|
||||
filter->smoothness_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "smoothness");
|
||||
}
|
||||
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(effect_path);
|
||||
|
||||
if (!filter->effect) {
|
||||
color_key_destroy(filter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
color_key_update(filter, settings);
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void color_key_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct color_key_filter_data *filter = data;
|
||||
|
||||
obs_source_process_filter_begin(filter->context, GS_RGBA,
|
||||
OBS_ALLOW_DIRECT_RENDERING);
|
||||
|
||||
gs_effect_set_vec4(filter->color_param, &filter->color);
|
||||
gs_effect_set_float(filter->contrast_param, filter->contrast);
|
||||
gs_effect_set_float(filter->brightness_param, filter->brightness);
|
||||
gs_effect_set_float(filter->gamma_param, filter->gamma);
|
||||
gs_effect_set_vec4(filter->key_color_param, &filter->key_color);
|
||||
gs_effect_set_float(filter->similarity_param, filter->similarity);
|
||||
gs_effect_set_float(filter->smoothness_param, filter->smoothness);
|
||||
|
||||
obs_source_process_filter_end(filter->context, filter->effect, 0, 0);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
static bool key_type_changed(obs_properties_t *props, obs_property_t *p,
|
||||
obs_data_t *settings)
|
||||
{
|
||||
const char *type = obs_data_get_string(settings, SETTING_COLOR_TYPE);
|
||||
bool custom = strcmp(type, "custom") == 0;
|
||||
|
||||
obs_property_set_visible(obs_properties_get(props, SETTING_KEY_COLOR),
|
||||
custom);
|
||||
|
||||
UNUSED_PARAMETER(p);
|
||||
return true;
|
||||
}
|
||||
|
||||
static obs_properties_t *color_key_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_property_t *p = obs_properties_add_list(props,
|
||||
SETTING_COLOR_TYPE, TEXT_COLOR_TYPE,
|
||||
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
|
||||
obs_property_list_add_string(p, obs_module_text("Green"), "green");
|
||||
obs_property_list_add_string(p, obs_module_text("Blue"), "blue");
|
||||
obs_property_list_add_string(p, obs_module_text("Red"), "red");
|
||||
obs_property_list_add_string(p, obs_module_text("Magenta"), "magenta");
|
||||
obs_property_list_add_string(p, obs_module_text("CustomColor"),
|
||||
"custom");
|
||||
|
||||
obs_property_set_modified_callback(p, key_type_changed);
|
||||
|
||||
obs_properties_add_color(props, SETTING_KEY_COLOR, TEXT_KEY_COLOR);
|
||||
obs_properties_add_int_slider(props, SETTING_SIMILARITY,
|
||||
TEXT_SIMILARITY, 1, 1000, 1);
|
||||
obs_properties_add_int_slider(props, SETTING_SMOOTHNESS,
|
||||
TEXT_SMOOTHNESS, 1, 1000, 1);
|
||||
|
||||
obs_properties_add_int(props, SETTING_OPACITY, TEXT_OPACITY, 0, 100, 1);
|
||||
obs_properties_add_float_slider(props, SETTING_CONTRAST,
|
||||
TEXT_CONTRAST, -1.0, 1.0, 0.01);
|
||||
obs_properties_add_float_slider(props, SETTING_BRIGHTNESS,
|
||||
TEXT_BRIGHTNESS, -1.0, 1.0, 0.01);
|
||||
obs_properties_add_float_slider(props, SETTING_GAMMA,
|
||||
TEXT_GAMMA, -1.0, 1.0, 0.01);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void color_key_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_int(settings, SETTING_OPACITY, 100);
|
||||
obs_data_set_default_double(settings, SETTING_CONTRAST, 0.0);
|
||||
obs_data_set_default_double(settings, SETTING_BRIGHTNESS, 0.0);
|
||||
obs_data_set_default_double(settings, SETTING_GAMMA, 0.0);
|
||||
obs_data_set_default_int(settings, SETTING_KEY_COLOR, 0x00FF00);
|
||||
obs_data_set_default_string(settings, SETTING_COLOR_TYPE, "green");
|
||||
obs_data_set_default_int(settings, SETTING_SIMILARITY, 80);
|
||||
obs_data_set_default_int(settings, SETTING_SMOOTHNESS, 50);
|
||||
}
|
||||
|
||||
struct obs_source_info color_key_filter = {
|
||||
.id = "color_key_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO,
|
||||
.get_name = color_key_name,
|
||||
.create = color_key_create,
|
||||
.destroy = color_key_destroy,
|
||||
.video_render = color_key_render,
|
||||
.update = color_key_update,
|
||||
.get_properties = color_key_properties,
|
||||
.get_defaults = color_key_defaults
|
||||
};
|
||||
234
plugins/obs-filters/crop-filter.c
Normal file
234
plugins/obs-filters/crop-filter.c
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
#include <obs-module.h>
|
||||
#include <graphics/vec2.h>
|
||||
|
||||
struct crop_filter_data {
|
||||
obs_source_t *context;
|
||||
|
||||
gs_effect_t *effect;
|
||||
gs_eparam_t *param_mul;
|
||||
gs_eparam_t *param_add;
|
||||
|
||||
int left;
|
||||
int right;
|
||||
int top;
|
||||
int bottom;
|
||||
uint32_t abs_cx;
|
||||
uint32_t abs_cy;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
bool absolute;
|
||||
|
||||
struct vec2 mul_val;
|
||||
struct vec2 add_val;
|
||||
};
|
||||
|
||||
static const char *crop_filter_get_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("CropFilter");
|
||||
}
|
||||
|
||||
static void *crop_filter_create(obs_data_t *settings, obs_source_t *context)
|
||||
{
|
||||
struct crop_filter_data *filter = bzalloc(sizeof(*filter));
|
||||
char *effect_path = obs_module_file("crop_filter.effect");
|
||||
|
||||
filter->context = context;
|
||||
|
||||
obs_enter_graphics();
|
||||
filter->effect = gs_effect_create_from_file(effect_path, NULL);
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(effect_path);
|
||||
|
||||
if (!filter->effect) {
|
||||
bfree(filter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
filter->param_mul = gs_effect_get_param_by_name(filter->effect,
|
||||
"mul_val");
|
||||
filter->param_add = gs_effect_get_param_by_name(filter->effect,
|
||||
"add_val");
|
||||
|
||||
obs_source_update(context, settings);
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void crop_filter_destroy(void *data)
|
||||
{
|
||||
struct crop_filter_data *filter = data;
|
||||
|
||||
obs_enter_graphics();
|
||||
gs_effect_destroy(filter->effect);
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(filter);
|
||||
}
|
||||
|
||||
static void crop_filter_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct crop_filter_data *filter = data;
|
||||
|
||||
filter->absolute = !obs_data_get_bool(settings, "relative");
|
||||
filter->left = (int)obs_data_get_int(settings, "left");
|
||||
filter->top = (int)obs_data_get_int(settings, "top");
|
||||
filter->right = (int)obs_data_get_int(settings, "right");
|
||||
filter->bottom = (int)obs_data_get_int(settings, "bottom");
|
||||
filter->abs_cx = (int)obs_data_get_int(settings, "cx");
|
||||
filter->abs_cy = (int)obs_data_get_int(settings, "cy");
|
||||
}
|
||||
|
||||
static bool relative_clicked(obs_properties_t *props, obs_property_t *p,
|
||||
obs_data_t *settings)
|
||||
{
|
||||
bool relative = obs_data_get_bool(settings, "relative");
|
||||
|
||||
obs_property_set_description(obs_properties_get(props, "left"),
|
||||
relative ? obs_module_text("Crop.Left") : "X");
|
||||
obs_property_set_description(obs_properties_get(props, "top"),
|
||||
relative ? obs_module_text("Crop.Top") : "Y");
|
||||
|
||||
obs_property_set_visible(obs_properties_get(props, "right"), relative);
|
||||
obs_property_set_visible(obs_properties_get(props, "bottom"), relative);
|
||||
obs_property_set_visible(obs_properties_get(props, "cx"), !relative);
|
||||
obs_property_set_visible(obs_properties_get(props, "cy"), !relative);
|
||||
|
||||
UNUSED_PARAMETER(p);
|
||||
return true;
|
||||
}
|
||||
|
||||
static obs_properties_t *crop_filter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_property_t *p = obs_properties_add_bool(props, "relative",
|
||||
obs_module_text("Crop.Relative"));
|
||||
|
||||
obs_property_set_modified_callback(p, relative_clicked);
|
||||
|
||||
obs_properties_add_int(props, "left", obs_module_text("Crop.Left"),
|
||||
0, 8192, 1);
|
||||
obs_properties_add_int(props, "top", obs_module_text("Crop.Top"),
|
||||
0, 8192, 1);
|
||||
obs_properties_add_int(props, "right", obs_module_text("Crop.Right"),
|
||||
0, 8192, 1);
|
||||
obs_properties_add_int(props, "bottom", obs_module_text("Crop.Bottom"),
|
||||
0, 8192, 1);
|
||||
obs_properties_add_int(props, "cx", obs_module_text("Crop.Width"),
|
||||
0, 8192, 1);
|
||||
obs_properties_add_int(props, "cy", obs_module_text("Crop.Height"),
|
||||
0, 8192, 1);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void crop_filter_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_bool(settings, "relative", true);
|
||||
}
|
||||
|
||||
static void calc_crop_dimensions(struct crop_filter_data *filter,
|
||||
struct vec2 *mul_val, struct vec2 *add_val)
|
||||
{
|
||||
obs_source_t *target = obs_filter_get_target(filter->context);
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t total;
|
||||
|
||||
if (!target) {
|
||||
width = 0;
|
||||
height = 0;
|
||||
} else {
|
||||
width = obs_source_get_base_width(target);
|
||||
height = obs_source_get_base_height(target);
|
||||
}
|
||||
|
||||
if (filter->absolute) {
|
||||
uint32_t max_abs_cx = (filter->left + filter->abs_cx);
|
||||
if (max_abs_cx > width) max_abs_cx = width;
|
||||
max_abs_cx -= filter->left;
|
||||
|
||||
total = max_abs_cx < width ? (width - max_abs_cx) : 0;
|
||||
} else {
|
||||
total = filter->left + filter->right;
|
||||
}
|
||||
filter->width = total > width ? 0 : (width - total);
|
||||
|
||||
if (filter->absolute) {
|
||||
uint32_t max_abs_cy = (filter->top + filter->abs_cy);
|
||||
if (max_abs_cy > height) max_abs_cy = height;
|
||||
max_abs_cy -= filter->top;
|
||||
|
||||
total = max_abs_cy < height ? (height - max_abs_cy) : 0;
|
||||
} else {
|
||||
total = filter->top + filter->bottom;
|
||||
}
|
||||
filter->height = total > height ? 0 : (height - total);
|
||||
|
||||
if (width && filter->width) {
|
||||
mul_val->x = (float)filter->width / (float)width;
|
||||
add_val->x = (float)filter->left / (float)width;
|
||||
}
|
||||
|
||||
if (height && filter->height) {
|
||||
mul_val->y = (float)filter->height / (float)height;
|
||||
add_val->y = (float)filter->top / (float)height;
|
||||
}
|
||||
}
|
||||
|
||||
static void crop_filter_tick(void *data, float seconds)
|
||||
{
|
||||
struct crop_filter_data *filter = data;
|
||||
|
||||
vec2_zero(&filter->mul_val);
|
||||
vec2_zero(&filter->add_val);
|
||||
calc_crop_dimensions(filter, &filter->mul_val, &filter->add_val);
|
||||
|
||||
UNUSED_PARAMETER(seconds);
|
||||
}
|
||||
|
||||
static void crop_filter_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct crop_filter_data *filter = data;
|
||||
|
||||
obs_source_process_filter_begin(filter->context, GS_RGBA,
|
||||
OBS_NO_DIRECT_RENDERING);
|
||||
|
||||
gs_effect_set_vec2(filter->param_mul, &filter->mul_val);
|
||||
gs_effect_set_vec2(filter->param_add, &filter->add_val);
|
||||
|
||||
obs_source_process_filter_end(filter->context, filter->effect,
|
||||
filter->width, filter->height);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
static uint32_t crop_filter_width(void *data)
|
||||
{
|
||||
struct crop_filter_data *crop = data;
|
||||
return crop->width;
|
||||
}
|
||||
|
||||
static uint32_t crop_filter_height(void *data)
|
||||
{
|
||||
struct crop_filter_data *crop = data;
|
||||
return crop->height;
|
||||
}
|
||||
|
||||
struct obs_source_info crop_filter = {
|
||||
.id = "crop_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO,
|
||||
.get_name = crop_filter_get_name,
|
||||
.create = crop_filter_create,
|
||||
.destroy = crop_filter_destroy,
|
||||
.update = crop_filter_update,
|
||||
.get_properties = crop_filter_properties,
|
||||
.get_defaults = crop_filter_defaults,
|
||||
.video_tick = crop_filter_tick,
|
||||
.video_render = crop_filter_render,
|
||||
.get_width = crop_filter_width,
|
||||
.get_height = crop_filter_height
|
||||
};
|
||||
76
plugins/obs-filters/data/blend_add_filter.effect
Normal file
76
plugins/obs-filters/data/blend_add_filter.effect
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform texture2d target;
|
||||
uniform float4 color;
|
||||
uniform float2 mul_val;
|
||||
uniform float2 add_val;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertDataIn {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertDataOut {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float2 uv2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
VertDataOut VSDefault(VertDataIn v_in)
|
||||
{
|
||||
VertDataOut vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
vert_out.uv2 = v_in.uv * mul_val + add_val;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSAddImageRGBA(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.rgb = saturate(rgba.rgb + targetRGB.rgb);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSAddImageMatrix(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, v_in.uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
|
||||
float4 rgba = saturate(mul(float4(yuv.xyz, 1.0), color_matrix)) *
|
||||
color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.rgb = saturate(rgba.rgb + targetRGB.rgb);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSAddImageRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSAddImageMatrix(v_in);
|
||||
}
|
||||
}
|
||||
76
plugins/obs-filters/data/blend_mul_filter.effect
Normal file
76
plugins/obs-filters/data/blend_mul_filter.effect
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform texture2d target;
|
||||
uniform float4 color;
|
||||
uniform float2 mul_val;
|
||||
uniform float2 add_val;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertDataIn {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertDataOut {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float2 uv2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
VertDataOut VSDefault(VertDataIn v_in)
|
||||
{
|
||||
VertDataOut vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
vert_out.uv2 = v_in.uv * mul_val + add_val;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSMuliplyImageRGBA(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.rgb = saturate(rgba.rgb * targetRGB.rgb);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSMuliplyImageMatrix(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, v_in.uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
|
||||
float4 rgba = saturate(mul(float4(yuv.xyz, 1.0), color_matrix)) *
|
||||
color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.rgb = saturate(rgba.rgb * targetRGB.rgb);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSMuliplyImageRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSMuliplyImageMatrix(v_in);
|
||||
}
|
||||
}
|
||||
76
plugins/obs-filters/data/blend_sub_filter.effect
Normal file
76
plugins/obs-filters/data/blend_sub_filter.effect
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform texture2d target;
|
||||
uniform float4 color;
|
||||
uniform float2 mul_val;
|
||||
uniform float2 add_val;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertDataIn {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertDataOut {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float2 uv2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
VertDataOut VSDefault(VertDataIn v_in)
|
||||
{
|
||||
VertDataOut vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
vert_out.uv2 = v_in.uv * mul_val + add_val;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSSubtractImageRGBA(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.rgb = saturate(rgba.rgb - targetRGB.rgb);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSSubtractImageMatrix(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, v_in.uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
|
||||
float4 rgba = saturate(mul(float4(yuv.xyz, 1.0), color_matrix)) *
|
||||
color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.rgb = saturate(rgba.rgb - targetRGB.rgb);
|
||||
return rgba;
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSSubtractImageRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSSubtractImageMatrix(v_in);
|
||||
}
|
||||
}
|
||||
132
plugins/obs-filters/data/chroma_key_filter.effect
Normal file
132
plugins/obs-filters/data/chroma_key_filter.effect
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix = {1.0, 0.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0, 0.0,
|
||||
0.0, 0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0};
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform float4x4 yuv_mat = { 0.182586, 0.614231, 0.062007, 0.062745,
|
||||
-0.100644, -0.338572, 0.439216, 0.501961,
|
||||
0.439216, -0.398942, -0.040274, 0.501961,
|
||||
0.000000, 0.000000, 0.000000, 1.000000};
|
||||
|
||||
uniform float4 color;
|
||||
uniform float contrast;
|
||||
uniform float brightness;
|
||||
uniform float gamma;
|
||||
|
||||
uniform float2 chroma_key;
|
||||
uniform float4 key_rgb;
|
||||
uniform float2 pixel_size;
|
||||
uniform float similarity;
|
||||
uniform float smoothness;
|
||||
uniform float spill;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertData {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertData VSDefault(VertData v_in)
|
||||
{
|
||||
VertData vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 CalcColor(float4 rgba)
|
||||
{
|
||||
return float4(pow(rgba.rgb, float3(gamma, gamma, gamma)) * contrast + brightness, rgba.a);
|
||||
}
|
||||
|
||||
float GetChromaDist(float3 rgb)
|
||||
{
|
||||
float4 yuvx = mul(float4(rgb.rgb, 1.0), yuv_mat);
|
||||
return distance(chroma_key, yuvx.yz);
|
||||
}
|
||||
|
||||
float4 SampleYUVToRGB(float2 uv)
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
return saturate(mul(float4(yuv.xyz, 1.0), color_matrix));
|
||||
}
|
||||
|
||||
float4 SampleTexture(float2 uv, bool use_matrix)
|
||||
{
|
||||
if (use_matrix) {
|
||||
return SampleYUVToRGB(uv);
|
||||
} else {
|
||||
return image.Sample(textureSampler, uv);
|
||||
}
|
||||
}
|
||||
|
||||
float GetBoxFilteredChromaDist(float3 rgb, float2 texCoord, bool use_matrix)
|
||||
{
|
||||
float distVal = GetChromaDist(rgb);
|
||||
distVal += GetChromaDist(SampleTexture(texCoord-pixel_size, use_matrix).rgb);
|
||||
distVal += GetChromaDist(SampleTexture(texCoord-float2(pixel_size.x, 0.0), use_matrix).rgb);
|
||||
distVal += GetChromaDist(SampleTexture(texCoord-float2(pixel_size.x, -pixel_size.y), use_matrix).rgb);
|
||||
|
||||
distVal += GetChromaDist(SampleTexture(texCoord-float2(0.0, pixel_size.y), use_matrix).rgb);
|
||||
distVal += GetChromaDist(SampleTexture(texCoord+float2(0.0, pixel_size.y), use_matrix).rgb);
|
||||
|
||||
distVal += GetChromaDist(SampleTexture(texCoord+float2(pixel_size.x, -pixel_size.y), use_matrix).rgb);
|
||||
distVal += GetChromaDist(SampleTexture(texCoord+float2(pixel_size.x, 0.0), use_matrix).rgb);
|
||||
distVal += GetChromaDist(SampleTexture(texCoord+pixel_size, use_matrix).rgb);
|
||||
return distVal / 9.0;
|
||||
}
|
||||
|
||||
float4 ProcessChromaKey(float4 rgba, VertData v_in, bool use_matrix)
|
||||
{
|
||||
float chromaDist = GetBoxFilteredChromaDist(rgba.rgb, v_in.uv, use_matrix);
|
||||
float baseMask = chromaDist - similarity;
|
||||
float fullMask = pow(saturate(baseMask / smoothness), 1.5);
|
||||
float spillVal = pow(saturate(baseMask / spill), 1.5);
|
||||
|
||||
rgba.a *= fullMask;
|
||||
|
||||
float desat = (rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722);
|
||||
rgba.rgb = saturate(float3(desat, desat, desat)) * (1.0 - spillVal) + rgba.rgb * spillVal;
|
||||
|
||||
return CalcColor(rgba);
|
||||
}
|
||||
|
||||
float4 PSChromaKeyRGBA(VertData v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
return ProcessChromaKey(rgba, v_in, false);
|
||||
}
|
||||
|
||||
float4 PSChromaKeyMatrix(VertData v_in) : TARGET
|
||||
{
|
||||
float4 rgba = SampleYUVToRGB(v_in.uv) * color;
|
||||
return ProcessChromaKey(rgba, v_in, true);
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSChromaKeyRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSChromaKeyMatrix(v_in);
|
||||
}
|
||||
}
|
||||
67
plugins/obs-filters/data/color_filter.effect
Normal file
67
plugins/obs-filters/data/color_filter.effect
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform float4 color;
|
||||
uniform float contrast;
|
||||
uniform float brightness;
|
||||
uniform float gamma;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertData {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertData VSDefault(VertData v_in)
|
||||
{
|
||||
VertData vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 CalcColor(float4 rgba)
|
||||
{
|
||||
return float4(pow(rgba.rgb, float3(gamma, gamma, gamma)) * contrast + brightness, rgba.a);
|
||||
}
|
||||
|
||||
float4 PSColorFilterRGBA(VertData v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
return CalcColor(rgba);
|
||||
}
|
||||
|
||||
float4 PSColorFilterMatrix(VertData v_in) : TARGET
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, v_in.uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
float4 rgba = saturate(mul(float4(yuv.xyz, 1.0), color_matrix)) * color;
|
||||
|
||||
return CalcColor(rgba);
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSColorFilterRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSColorFilterMatrix(v_in);
|
||||
}
|
||||
}
|
||||
92
plugins/obs-filters/data/color_key_filter.effect
Normal file
92
plugins/obs-filters/data/color_key_filter.effect
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix = {1.0, 0.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0, 0.0,
|
||||
0.0, 0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0};
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform float4 color;
|
||||
uniform float contrast;
|
||||
uniform float brightness;
|
||||
uniform float gamma;
|
||||
|
||||
uniform float4 key_color;
|
||||
uniform float similarity;
|
||||
uniform float smoothness;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertData {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertData VSDefault(VertData v_in)
|
||||
{
|
||||
VertData vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 CalcColor(float4 rgba)
|
||||
{
|
||||
return float4(pow(rgba.rgb, float3(gamma, gamma, gamma)) * contrast + brightness, rgba.a);
|
||||
}
|
||||
|
||||
float GetColorDist(float3 rgb)
|
||||
{
|
||||
return distance(key_color.rgb, rgb);
|
||||
}
|
||||
|
||||
float4 SampleYUVToRGB(float2 uv)
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
return saturate(mul(float4(yuv.xyz, 1.0), color_matrix));
|
||||
}
|
||||
|
||||
float4 ProcessColorKey(float4 rgba, VertData v_in)
|
||||
{
|
||||
float colorDist = GetColorDist(rgba.rgb);
|
||||
float baseMask = colorDist - similarity;
|
||||
rgba.a *= saturate(max(colorDist - similarity, 0.0) / smoothness);
|
||||
|
||||
return CalcColor(rgba);
|
||||
}
|
||||
|
||||
float4 PSColorKeyRGBA(VertData v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
return ProcessColorKey(rgba, v_in);
|
||||
}
|
||||
|
||||
float4 PSColorKeyMatrix(VertData v_in) : TARGET
|
||||
{
|
||||
float4 rgba = SampleYUVToRGB(v_in.uv) * color;
|
||||
return ProcessColorKey(rgba, v_in);
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSColorKeyRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSColorKeyMatrix(v_in);
|
||||
}
|
||||
}
|
||||
38
plugins/obs-filters/data/crop_filter.effect
Normal file
38
plugins/obs-filters/data/crop_filter.effect
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
|
||||
uniform float2 mul_val;
|
||||
uniform float2 add_val;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Wrap;
|
||||
AddressV = Wrap;
|
||||
};
|
||||
|
||||
struct VertData {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertData VSCrop(VertData v_in)
|
||||
{
|
||||
VertData vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv * mul_val + add_val;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSCrop(VertData v_in) : TARGET
|
||||
{
|
||||
return image.Sample(textureSampler, v_in.uv);
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSCrop(v_in);
|
||||
pixel_shader = PSCrop(v_in);
|
||||
}
|
||||
}
|
||||
53
plugins/obs-filters/data/locale/ca-ES.ini
Normal file
53
plugins/obs-filters/data/locale/ca-ES.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Correcció de color"
|
||||
MaskFilter="Màscara d'imatge o barreja"
|
||||
AsyncDelayFilter="Retard del vídeo (asíncron)"
|
||||
CropFilter="Escapça"
|
||||
ScrollFilter="Desplaçament"
|
||||
ChromaKeyFilter="Clau croma"
|
||||
ColorKeyFilter="Clau de color"
|
||||
SharpnessFilter="Agudesa"
|
||||
NoiseGate="Porta de soroll"
|
||||
Gain="Guany"
|
||||
DelayMs="Retard (en mil·lisegons)"
|
||||
Type="Tipus"
|
||||
MaskBlendType.MaskColor="Màscara alfa (canal de color)"
|
||||
MaskBlendType.MaskAlpha="Màscara alfa (canal alfa)"
|
||||
MaskBlendType.BlendMultiply="Barreja (multiplica)"
|
||||
MaskBlendType.BlendAddition="Barreja (suma)"
|
||||
MaskBlendType.BlendSubtraction="Barreja (resta)"
|
||||
Path="Camí"
|
||||
Color="Color"
|
||||
Opacity="Opacitat"
|
||||
Contrast="Contrast"
|
||||
Brightness="Brillantor"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Tots els fitxers d'imatge"
|
||||
BrowsePath.AllFiles="Tots els fitxers"
|
||||
KeyColorType="Tipus de clau de color"
|
||||
KeyColor="Color clau"
|
||||
Similarity="Similitud (1-1000)"
|
||||
Smoothness="Suavitat (1-1000)"
|
||||
ColorSpillReduction="Reducció de vessament de color clau (1-1000)"
|
||||
Crop.Left="Esquerra"
|
||||
Crop.Right="Dreta"
|
||||
Crop.Top="Part superior"
|
||||
Crop.Bottom="Part inferior"
|
||||
Crop.Width="Amplada"
|
||||
Crop.Height="Alçada"
|
||||
Crop.Relative="Relatiu"
|
||||
ScrollFilter.SpeedX="Velocitat horitzontal"
|
||||
ScrollFilter.SpeedY="Velocitat vertical"
|
||||
ScrollFilter.LimitWidth="Limita l'amplada"
|
||||
ScrollFilter.LimitHeight="Límit d'alçada"
|
||||
CustomColor="Color personalitzat"
|
||||
Red="Vermell"
|
||||
Green="Verd"
|
||||
Blue="Blau"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Llindar obert (dB)"
|
||||
NoiseGate.CloseThreshold="Llindar tancat (dB)"
|
||||
NoiseGate.AttackTime="Temps d'atac (mil·lisegons)"
|
||||
NoiseGate.HoldTime="Temps de mantenir (mil·lisegons)"
|
||||
NoiseGate.ReleaseTime="Temps d'alliberar (mil·lisegons)"
|
||||
Gain.GainDB="Guany (dB)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/cs-CZ.ini
Normal file
54
plugins/obs-filters/data/locale/cs-CZ.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Korekce barev"
|
||||
MaskFilter="Maska obrazu/prolnutí"
|
||||
AsyncDelayFilter="Zpoždění obrazu"
|
||||
CropFilter="Oříznutí"
|
||||
ScrollFilter="Rolování"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Klíč barvy"
|
||||
SharpnessFilter="Ostření"
|
||||
NoiseGate="Šumová brána"
|
||||
Gain="Zisk"
|
||||
DelayMs="Zpoždění (ms)"
|
||||
Type="Typ"
|
||||
MaskBlendType.MaskColor="Alpha maska (kanál barvy)"
|
||||
MaskBlendType.MaskAlpha="Alpha maska (alpha kanál)"
|
||||
MaskBlendType.BlendMultiply="Míchání (násobení)"
|
||||
MaskBlendType.BlendAddition="Míchání (přimísení)"
|
||||
MaskBlendType.BlendSubtraction="Míchání (odstranění)"
|
||||
Path="Cesta"
|
||||
Color="Barva"
|
||||
Opacity="Krytí"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Jas"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Všechny soubory obrázků"
|
||||
BrowsePath.AllFiles="Všechny soubory"
|
||||
KeyColorType="Typ klíče barvy"
|
||||
KeyColor="Klíčová barva"
|
||||
Similarity="Podobnost (1-1000)"
|
||||
Smoothness="Hladkost(1-1000)"
|
||||
ColorSpillReduction="Redukce slití klíčové barvy (1-1000)"
|
||||
Crop.Left="Vlevo"
|
||||
Crop.Right="Vpravo"
|
||||
Crop.Top="Nahoře"
|
||||
Crop.Bottom="Dole"
|
||||
Crop.Width="Šířka"
|
||||
Crop.Height="Výška"
|
||||
Crop.Relative="Relativní"
|
||||
ScrollFilter.SpeedX="Rychlost - vodorovně"
|
||||
ScrollFilter.SpeedY="Rychlost - svisle"
|
||||
ScrollFilter.LimitWidth="Omezit šířku"
|
||||
ScrollFilter.LimitHeight="Omezit výšku"
|
||||
CustomColor="Vlastní barva"
|
||||
Red="Červená"
|
||||
Green="Zelená"
|
||||
Blue="Modrá"
|
||||
Magenta="Fialová"
|
||||
NoiseGate.OpenThreshold="Hladina otevření (dB)"
|
||||
NoiseGate.CloseThreshold="Hladina uzavření (dB)"
|
||||
NoiseGate.AttackTime="Čas přepnutí (ms)"
|
||||
NoiseGate.HoldTime="Čas držení (ms)"
|
||||
NoiseGate.ReleaseTime="Čas uvolnění (ms)"
|
||||
Gain.GainDB="Zisk (dB)"
|
||||
StretchImage="Roztáhnout obrázek (ignorovat poměr stran)"
|
||||
|
||||
37
plugins/obs-filters/data/locale/da-DK.ini
Normal file
37
plugins/obs-filters/data/locale/da-DK.ini
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
ColorFilter="Farvekorrektion"
|
||||
MaskFilter="Billede maske/blanding"
|
||||
AsyncDelayFilter="Video forsinkelse (asynkron)"
|
||||
CropFilter="Beskær"
|
||||
ChromaKeyFilter="Chroma nøgle"
|
||||
ColorKeyFilter="Farvenøgle"
|
||||
DelayMs="Forsinkelse (millisekunder)"
|
||||
Type="Type"
|
||||
MaskBlendType.MaskColor="Alpha maske (farvekanal)"
|
||||
MaskBlendType.MaskAlpha="Alpha maske (Alpha kanal)"
|
||||
MaskBlendType.BlendMultiply="Blend (formere)"
|
||||
MaskBlendType.BlendAddition="Blanding (tilføjelse)"
|
||||
MaskBlendType.BlendSubtraction="Blanding (subtraktion)"
|
||||
Path="Sti"
|
||||
Color="Farve"
|
||||
Opacity="Gennemsigtighed"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Lysstyrke"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Alle billedfiler"
|
||||
BrowsePath.AllFiles="Alle filer"
|
||||
KeyColorType="Nøglefarve type"
|
||||
KeyColor="Nøglefarven"
|
||||
Similarity="Lighed (1-1000)"
|
||||
Smoothness="Glathed (1-1000)"
|
||||
ColorSpillReduction="Nøglefarve udslipsreduktion (1-1000)"
|
||||
Crop.Left="Venstre"
|
||||
Crop.Right="Højre"
|
||||
Crop.Top="Top"
|
||||
Crop.Height="Højde"
|
||||
Crop.Relative="Relativ"
|
||||
CustomColor="Brugerdefineret farve"
|
||||
Red="Rød"
|
||||
Green="Grøn"
|
||||
Blue="Blå"
|
||||
Magenta="Magenta"
|
||||
|
||||
54
plugins/obs-filters/data/locale/de-DE.ini
Normal file
54
plugins/obs-filters/data/locale/de-DE.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Farbkorrektur"
|
||||
MaskFilter="Bild Maske/Blend"
|
||||
AsyncDelayFilter="Videoverzögerung (Asynchron)"
|
||||
CropFilter="Zuschneiden"
|
||||
ScrollFilter="Bewegung"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Color Key"
|
||||
SharpnessFilter="Schärfen"
|
||||
NoiseGate="Noise Gate"
|
||||
Gain="Gain"
|
||||
DelayMs="Verzögerung (Millisekunden)"
|
||||
Type="Art"
|
||||
MaskBlendType.MaskColor="Alphamaske (Farbkanal)"
|
||||
MaskBlendType.MaskAlpha="Alphamaske (Alphakanal)"
|
||||
MaskBlendType.BlendMultiply="Blend (Multiplizieren)"
|
||||
MaskBlendType.BlendAddition="Blend (Addition)"
|
||||
MaskBlendType.BlendSubtraction="Blend (Subtraktion)"
|
||||
Path="Pfad"
|
||||
Color="Farbe"
|
||||
Opacity="Deckkraft"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Helligkeit"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Alle Bilddateien"
|
||||
BrowsePath.AllFiles="Alle Dateien"
|
||||
KeyColorType="Key-Farbe-Typ"
|
||||
KeyColor="Key-Farbe"
|
||||
Similarity="Ähnlichkeit (1-1000)"
|
||||
Smoothness="Glätte (1-1000)"
|
||||
ColorSpillReduction="Key-Farbe Spill Reduktion (1-1000)"
|
||||
Crop.Left="Links"
|
||||
Crop.Right="Rechts"
|
||||
Crop.Top="Oben"
|
||||
Crop.Bottom="Unten"
|
||||
Crop.Width="Breite"
|
||||
Crop.Height="Höhe"
|
||||
Crop.Relative="Relativ"
|
||||
ScrollFilter.SpeedX="Horizontale Geschwindigkeit"
|
||||
ScrollFilter.SpeedY="Vertikale Geschwindigkeit"
|
||||
ScrollFilter.LimitWidth="Breite begrenzen"
|
||||
ScrollFilter.LimitHeight="Höhe begrenzen"
|
||||
CustomColor="Benutzerdefinierte Farbe"
|
||||
Red="Rot"
|
||||
Green="Grün"
|
||||
Blue="Blau"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Öffnen-Schwellenwert (dB)"
|
||||
NoiseGate.CloseThreshold="Schließen-Schwellenwert (dB)"
|
||||
NoiseGate.AttackTime="Attack-Zeit (Millisekunden)"
|
||||
NoiseGate.HoldTime="Hold-Zeit (Millisekunden)"
|
||||
NoiseGate.ReleaseTime="Release-Zeit (Millisekunden)"
|
||||
Gain.GainDB="Gain (dB)"
|
||||
StretchImage="Bild strecken (Bildseitenverhältnis verwerfen)"
|
||||
|
||||
40
plugins/obs-filters/data/locale/el-GR.ini
Normal file
40
plugins/obs-filters/data/locale/el-GR.ini
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
ColorFilter="Διόρθωση Χρώματος"
|
||||
AsyncDelayFilter="Καθυστέρηση Βίντεο (Ασύγχρονη)"
|
||||
CropFilter="Περικοπή"
|
||||
ScrollFilter="Κύλιση"
|
||||
ChromaKeyFilter="Κλειδί Chroma"
|
||||
ColorKeyFilter="Κλειδί Χρώματος"
|
||||
SharpnessFilter="Όξυνση"
|
||||
Gain="Απολαβή"
|
||||
DelayMs="Καθυστέρηση (χιλιοστά του δευτερολέπτου)"
|
||||
Type="Τύπος"
|
||||
MaskBlendType.MaskColor="Μάσκα Άλφα (Κανάλι Χρώματος)"
|
||||
MaskBlendType.MaskAlpha="Μάσκα Άλφα (Κανάλι Άλφα)"
|
||||
Path="Διαδρομή"
|
||||
Color="Χρώμα"
|
||||
Opacity="Αδιαφάνεια"
|
||||
Contrast="Αντίθεση"
|
||||
Brightness="Φωτεινότητα"
|
||||
Gamma="Γάμμα"
|
||||
BrowsePath.Images="Όλα τα αρχεία εικόνας"
|
||||
BrowsePath.AllFiles="Όλα τα αρχεία"
|
||||
Similarity="Ομοιότητα (1-1000)"
|
||||
Smoothness="Ομαλότητα (1-1000)"
|
||||
Crop.Left="Αριστερά"
|
||||
Crop.Right="Δεξιά"
|
||||
Crop.Top="Πάνω"
|
||||
Crop.Bottom="Κάτω"
|
||||
Crop.Width="Πλάτος"
|
||||
Crop.Height="Ύψος"
|
||||
Crop.Relative="Σχετική"
|
||||
ScrollFilter.SpeedX="Οριζόντια Ταχύτητα"
|
||||
ScrollFilter.SpeedY="Κατακόρυφη Ταχύτητα"
|
||||
ScrollFilter.LimitWidth="Περιορισμός Πλάτους"
|
||||
ScrollFilter.LimitHeight="Περιορισμός Ύψους"
|
||||
CustomColor="Προσαρμοσμένο χρώμα"
|
||||
Red="Κόκκινο"
|
||||
Green="Πράσινο"
|
||||
Blue="Μπλε"
|
||||
Magenta="Ματζέντα"
|
||||
Gain.GainDB="Απολαβή (dB)"
|
||||
|
||||
53
plugins/obs-filters/data/locale/en-US.ini
Normal file
53
plugins/obs-filters/data/locale/en-US.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Color Correction"
|
||||
MaskFilter="Image Mask/Blend"
|
||||
AsyncDelayFilter="Video Delay (Async)"
|
||||
CropFilter="Crop"
|
||||
ScrollFilter="Scroll"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Color Key"
|
||||
SharpnessFilter="Sharpen"
|
||||
NoiseGate="Noise Gate"
|
||||
Gain="Gain"
|
||||
DelayMs="Delay (milliseconds)"
|
||||
Type="Type"
|
||||
MaskBlendType.MaskColor="Alpha Mask (Color Channel)"
|
||||
MaskBlendType.MaskAlpha="Alpha Mask (Alpha Channel)"
|
||||
MaskBlendType.BlendMultiply="Blend (Multiply)"
|
||||
MaskBlendType.BlendAddition="Blend (Addition)"
|
||||
MaskBlendType.BlendSubtraction="Blend (Subtraction)"
|
||||
Path="Path"
|
||||
Color="Color"
|
||||
Opacity="Opacity"
|
||||
Contrast="Contrast"
|
||||
Brightness="Brightness"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="All Image Files"
|
||||
BrowsePath.AllFiles="All Files"
|
||||
KeyColorType="Key Color Type"
|
||||
KeyColor="Key Color"
|
||||
Similarity="Similarity (1-1000)"
|
||||
Smoothness="Smoothness (1-1000)"
|
||||
ColorSpillReduction="Key Color Spill Reduction (1-1000)"
|
||||
Crop.Left="Left"
|
||||
Crop.Right="Right"
|
||||
Crop.Top="Top"
|
||||
Crop.Bottom="Bottom"
|
||||
Crop.Width="Width"
|
||||
Crop.Height="Height"
|
||||
Crop.Relative="Relative"
|
||||
ScrollFilter.SpeedX="Horizontal Speed"
|
||||
ScrollFilter.SpeedY="Vertical Speed"
|
||||
ScrollFilter.LimitWidth="Limit Width"
|
||||
ScrollFilter.LimitHeight="Limit Height"
|
||||
CustomColor="Custom Color"
|
||||
Red="Red"
|
||||
Green="Green"
|
||||
Blue="Blue"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Open Threshold (dB)"
|
||||
NoiseGate.CloseThreshold="Close Threshold (dB)"
|
||||
NoiseGate.AttackTime="Attack Time (milliseconds)"
|
||||
NoiseGate.HoldTime="Hold Time (milliseconds)"
|
||||
NoiseGate.ReleaseTime="Release Time (milliseconds)"
|
||||
Gain.GainDB="Gain (dB)"
|
||||
StretchImage="Stretch Image (discard image aspect ratio)"
|
||||
54
plugins/obs-filters/data/locale/es-ES.ini
Normal file
54
plugins/obs-filters/data/locale/es-ES.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Corrección de color"
|
||||
MaskFilter="Imagen máscara/mezcla"
|
||||
AsyncDelayFilter="Demora de Video (asincróno)"
|
||||
CropFilter="Filtro de Recorte"
|
||||
ScrollFilter="desplazamiento"
|
||||
ChromaKeyFilter="Fondro croma"
|
||||
ColorKeyFilter="Filtro de color"
|
||||
SharpnessFilter="Filtro de enfoque"
|
||||
NoiseGate="Puerta anti-ruidos"
|
||||
Gain="Ganancia"
|
||||
DelayMs="Retardo (milisegundos)"
|
||||
Type="Tipo"
|
||||
MaskBlendType.MaskColor="Máscara alfa (canal de Color)"
|
||||
MaskBlendType.MaskAlpha="Máscara alfa (canal Alpha)"
|
||||
MaskBlendType.BlendMultiply="Mezcla (multiplicar)"
|
||||
MaskBlendType.BlendAddition="Mezcla (agregado)"
|
||||
MaskBlendType.BlendSubtraction="Mezcla (resta)"
|
||||
Path="Ruta"
|
||||
Color="Color"
|
||||
Opacity="Opacidad"
|
||||
Contrast="Contraste"
|
||||
Brightness="Luminosidad"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Todos los archivos de imagen"
|
||||
BrowsePath.AllFiles="Todos los Archivos"
|
||||
KeyColorType="Tipo de clave de Color"
|
||||
KeyColor="Color"
|
||||
Similarity="Similitud (1-1000)"
|
||||
Smoothness="Suavidad (1-1000)"
|
||||
ColorSpillReduction="Reducción del vertido de Color clave (1-1000)"
|
||||
Crop.Left="Izquierda"
|
||||
Crop.Right="Derecha"
|
||||
Crop.Top="Top"
|
||||
Crop.Bottom="Abajo"
|
||||
Crop.Width="Ancho"
|
||||
Crop.Height="Alto"
|
||||
Crop.Relative="Relativo"
|
||||
ScrollFilter.SpeedX="Velocidad Horizontal"
|
||||
ScrollFilter.SpeedY="VElocidad Vertical"
|
||||
ScrollFilter.LimitWidth="Limitar el ancho"
|
||||
ScrollFilter.LimitHeight="Limitar la altura"
|
||||
CustomColor="Color Personalizado"
|
||||
Red="Rojo"
|
||||
Green="Verde"
|
||||
Blue="Azúl"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Umbral de abierta (dB)"
|
||||
NoiseGate.CloseThreshold="Umbral de clausura(dB)"
|
||||
NoiseGate.AttackTime="Tiempo de Ataque(Millisegundos)"
|
||||
NoiseGate.HoldTime="Tiempo (en milisegundos) de espera"
|
||||
NoiseGate.ReleaseTime="Tiempo (en milisegundos) de liberacion"
|
||||
Gain.GainDB="Ganancia (dB)"
|
||||
StretchImage="Expandir imagen (descartar relación de aspecto de imagen)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/eu-ES.ini
Normal file
54
plugins/obs-filters/data/locale/eu-ES.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Margo Zuzenketa"
|
||||
MaskFilter="Irudi Mozorro/Nahasketa"
|
||||
AsyncDelayFilter="Bideo Atzerapena (Async)"
|
||||
CropFilter="Moztu"
|
||||
ScrollFilter="Irristatu"
|
||||
ChromaKeyFilter="Margo Giltza"
|
||||
ColorKeyFilter="Margo Giltza"
|
||||
SharpnessFilter="Zorrotza"
|
||||
NoiseGate="Zarata Atartea"
|
||||
Gain="Irabazia"
|
||||
DelayMs="Atzerapen (segundumilaen)"
|
||||
Type="Mota"
|
||||
MaskBlendType.MaskColor="Alfa Mozorroa (Margo Bidea)"
|
||||
MaskBlendType.MaskAlpha="Alfa Mozorroa (Alfa Bidea)"
|
||||
MaskBlendType.BlendMultiply="Nahasketa (Biderketa)"
|
||||
MaskBlendType.BlendAddition="Nahasketa (Gehiketa)"
|
||||
MaskBlendType.BlendSubtraction="Nahasketa (Kenketa)"
|
||||
Path="Helburua"
|
||||
Color="Margoa"
|
||||
Opacity="Argikaiztasuna"
|
||||
Contrast="Zuribeltztasuna"
|
||||
Brightness="Dizdira"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Irudi Agiri Guztiak"
|
||||
BrowsePath.AllFiles="Agiri Guztiak"
|
||||
KeyColorType="Giltza Margo Mota"
|
||||
KeyColor="Giltza Margoa"
|
||||
Similarity="Antzekotasuna (1-1000)"
|
||||
Smoothness="Lehuntasuna (1-1000)"
|
||||
ColorSpillReduction="Giltza Margo Isuri Murrizpena (1-1000)"
|
||||
Crop.Left="Ezker"
|
||||
Crop.Right="Eskuin"
|
||||
Crop.Top="Goi"
|
||||
Crop.Bottom="Behe"
|
||||
Crop.Width="Zabalera"
|
||||
Crop.Height="Garaiera"
|
||||
Crop.Relative="Erlatiboa"
|
||||
ScrollFilter.SpeedX="Etzaneko Abiadura"
|
||||
ScrollFilter.SpeedY="Zutikako Abiadura"
|
||||
ScrollFilter.LimitWidth="Mugatu Zabalera"
|
||||
ScrollFilter.LimitHeight="Mugatu Garaiera"
|
||||
CustomColor="Norbere Margoa"
|
||||
Red="Gorria"
|
||||
Green="Orlegia"
|
||||
Blue="Urdina"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Irekiera Muga (dB)"
|
||||
NoiseGate.CloseThreshold="Itxiera Muga (dB)"
|
||||
NoiseGate.AttackTime="Eraso denbora (segundumilaen)"
|
||||
NoiseGate.HoldTime="Heuste denbora (segundumilaen)"
|
||||
NoiseGate.ReleaseTime="Askapen denbora (segundumilaen)"
|
||||
Gain.GainDB="Irabazia (dB)"
|
||||
StretchImage="Luzatu Irudia (baztertu irudiaren ikuspegi maila)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/fi-FI.ini
Normal file
54
plugins/obs-filters/data/locale/fi-FI.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Värinkorjaus"
|
||||
MaskFilter="Kuvamaski/Sekoitus"
|
||||
AsyncDelayFilter="Kuvan viide (Async)"
|
||||
CropFilter="Rajaa"
|
||||
ScrollFilter="Vieritä"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Väriavain"
|
||||
SharpnessFilter="Terävöitä"
|
||||
NoiseGate="Noise Gate"
|
||||
Gain="Vahvistus"
|
||||
DelayMs="Viive (MS)"
|
||||
Type="Tyyppi"
|
||||
MaskBlendType.MaskColor="Alpha-maski (värikanava)"
|
||||
MaskBlendType.MaskAlpha="Alpha-maski (alfa-kanava)"
|
||||
MaskBlendType.BlendMultiply="Sekoitus (Kertova)"
|
||||
MaskBlendType.BlendAddition="Sekoitus (Lisäävä)"
|
||||
MaskBlendType.BlendSubtraction="Sekoitus (Vähentävä)"
|
||||
Path="Polku"
|
||||
Color="Väri"
|
||||
Opacity="Läpinäkyvyys"
|
||||
Contrast="Kontrasti"
|
||||
Brightness="Kirkkaus"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Kaikki kuvatiedostot"
|
||||
BrowsePath.AllFiles="Kaikki tiedostot"
|
||||
KeyColorType="Avainvärityyppi"
|
||||
KeyColor="Avainväri"
|
||||
Similarity="Samanlaisuus (1-1000)"
|
||||
Smoothness="Tasaisuus (1-1000)"
|
||||
ColorSpillReduction="Avainvärin vuodon vähennys (1-1000)"
|
||||
Crop.Left="Vasemmalta"
|
||||
Crop.Right="Oikealta"
|
||||
Crop.Top="Ylhäältä"
|
||||
Crop.Bottom="Alhaalta"
|
||||
Crop.Width="Leveys"
|
||||
Crop.Height="Korkeus"
|
||||
Crop.Relative="Suhteellinen"
|
||||
ScrollFilter.SpeedX="Vaakanopeus"
|
||||
ScrollFilter.SpeedY="Pystynopeus"
|
||||
ScrollFilter.LimitWidth="Rajoita leveyttä"
|
||||
ScrollFilter.LimitHeight="Rajoita korkeutta"
|
||||
CustomColor="Mukautettu väri"
|
||||
Red="Red"
|
||||
Green="Green"
|
||||
Blue="Blue"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Avautumiskynnys (dB)"
|
||||
NoiseGate.CloseThreshold="Sulkeutumiskynnys (dB)"
|
||||
NoiseGate.AttackTime="Reagointiviive (millisekuntia)"
|
||||
NoiseGate.HoldTime="Pitoaika (millisekuntia)"
|
||||
NoiseGate.ReleaseTime="Vapautumisaika (millisekuntia)"
|
||||
Gain.GainDB="Vahvistus (dB)"
|
||||
StretchImage="Venytä kuvaa (hylkää kuvasuhde)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/fr-FR.ini
Normal file
54
plugins/obs-filters/data/locale/fr-FR.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Correction des couleurs"
|
||||
MaskFilter="Masque d'image/mélange"
|
||||
AsyncDelayFilter="Délai vidéo (async.)"
|
||||
CropFilter="Rogner"
|
||||
ScrollFilter="Défilement"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Couleur d'incrustation"
|
||||
SharpnessFilter="Accentuer"
|
||||
NoiseGate="Noise Gate"
|
||||
Gain="Gain"
|
||||
DelayMs="Délai (en millisecondes)"
|
||||
Type="Type "
|
||||
MaskBlendType.MaskColor="Masque alpha (canal de couleur)"
|
||||
MaskBlendType.MaskAlpha="Masque alpha (canal alpha)"
|
||||
MaskBlendType.BlendMultiply="Mélanger (multiplication)"
|
||||
MaskBlendType.BlendAddition="Mélanger (addition)"
|
||||
MaskBlendType.BlendSubtraction="Mélanger (soustraction)"
|
||||
Path="Chemin d'accès"
|
||||
Color="Couleur"
|
||||
Opacity="Opacité"
|
||||
Contrast="Contraste"
|
||||
Brightness="Luminosité"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Tous les fichiers images"
|
||||
BrowsePath.AllFiles="Tous les fichiers"
|
||||
KeyColorType="Type de couleur-clé"
|
||||
KeyColor="Couleur-clé"
|
||||
Similarity="Similitude (1-1000)"
|
||||
Smoothness="Finesse (1-1000)"
|
||||
ColorSpillReduction="Réduction de déversement de couleur-clé (1-1000)"
|
||||
Crop.Left="À gauche"
|
||||
Crop.Right="À droite"
|
||||
Crop.Top="En haut"
|
||||
Crop.Bottom="En bas"
|
||||
Crop.Width="Largeur"
|
||||
Crop.Height="Hauteur"
|
||||
Crop.Relative="Relatif"
|
||||
ScrollFilter.SpeedX="Vitesse horizontale"
|
||||
ScrollFilter.SpeedY="Vitesse verticale"
|
||||
ScrollFilter.LimitWidth="Limiter la largeur"
|
||||
ScrollFilter.LimitHeight="Limiter la hauteur"
|
||||
CustomColor="Couleur personnalisée"
|
||||
Red="Rouge"
|
||||
Green="Vert"
|
||||
Blue="Bleu"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Seuil d'ouverture (dB)"
|
||||
NoiseGate.CloseThreshold="Seuil de fermeture (dB)"
|
||||
NoiseGate.AttackTime="Temps d'attaque (millisecondes)"
|
||||
NoiseGate.HoldTime="Temps de maintien (millisecondes)"
|
||||
NoiseGate.ReleaseTime="Temps d'arrêt (millisecondes)"
|
||||
Gain.GainDB="Gain (dB)"
|
||||
StretchImage="Étirer l'Image (ignorer ses proportions)"
|
||||
|
||||
31
plugins/obs-filters/data/locale/gl-ES.ini
Normal file
31
plugins/obs-filters/data/locale/gl-ES.ini
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
ColorFilter="Corrección da cor"
|
||||
MaskFilter="Máscara/mestura de imaxes"
|
||||
AsyncDelayFilter="Atraso do vídeo (asíncrono)"
|
||||
CropFilter="Recortar"
|
||||
ScrollFilter="Desprazamento"
|
||||
DelayMs="Atraso (milisegundos)"
|
||||
Type="Tipo"
|
||||
MaskBlendType.MaskColor="Máscara alfa (canle de cor)"
|
||||
MaskBlendType.MaskAlpha="Máscara alfa (canle alfa)"
|
||||
Path="Camiño"
|
||||
Color="Cor"
|
||||
Opacity="Opacidade"
|
||||
Contrast="Contraste"
|
||||
Brightness="Brillo"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Todo os ficheiros de imaxe"
|
||||
BrowsePath.AllFiles="Todos os ficheiros"
|
||||
Similarity="Similitude (1-1000)"
|
||||
Crop.Left="Á esquerda"
|
||||
Crop.Right="Á dereita"
|
||||
Crop.Top="Arriba"
|
||||
Crop.Bottom="Abaixo"
|
||||
Crop.Width="Largura"
|
||||
Crop.Height="Altura"
|
||||
Crop.Relative="Relativo"
|
||||
CustomColor="Personalizar cor"
|
||||
Red="Vermello"
|
||||
Green="Verde"
|
||||
Blue="Azul"
|
||||
Magenta="Maxenta"
|
||||
|
||||
54
plugins/obs-filters/data/locale/hr-HR.ini
Normal file
54
plugins/obs-filters/data/locale/hr-HR.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Promena boja"
|
||||
MaskFilter="Slika maske i stapanja"
|
||||
AsyncDelayFilter="Video pauza (asinhrono)"
|
||||
CropFilter="Odsecanje"
|
||||
ScrollFilter="Pomeranje"
|
||||
ChromaKeyFilter="Ključ providnosti"
|
||||
ColorKeyFilter="Ključ boje"
|
||||
SharpnessFilter="Izoštravanje"
|
||||
NoiseGate="Kapija šuma"
|
||||
Gain="Pojačanje"
|
||||
DelayMs="Pauza (milisekunde)"
|
||||
Type="Vrsta"
|
||||
MaskBlendType.MaskColor="Maska prozirnosti (kanal boje)"
|
||||
MaskBlendType.MaskAlpha="Maska prozirnosti (prozirni kanal)"
|
||||
MaskBlendType.BlendMultiply="Stapanje (umnožavanjem)"
|
||||
MaskBlendType.BlendAddition="Stapanje (dodavanjem)"
|
||||
MaskBlendType.BlendSubtraction="Stapanje (oduzimanjem)"
|
||||
Path="Putanja"
|
||||
Color="Boja"
|
||||
Opacity="Prozirnost"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Osvetljenje"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Sve slikovne datoteke"
|
||||
BrowsePath.AllFiles="Sve datoteke"
|
||||
KeyColorType="Vrsta ključne boje"
|
||||
KeyColor="Ključna boja"
|
||||
Similarity="Sličnost (1-1000)"
|
||||
Smoothness="Uglađenost (1-1000)"
|
||||
ColorSpillReduction="Smanjivanje prosipanja ključne boje (1-1000)"
|
||||
Crop.Left="S leva"
|
||||
Crop.Right="S desna"
|
||||
Crop.Top="Odozgo"
|
||||
Crop.Bottom="Odozdo"
|
||||
Crop.Width="Širina"
|
||||
Crop.Height="Visina"
|
||||
Crop.Relative="Relativno"
|
||||
ScrollFilter.SpeedX="Vodoravna brzina"
|
||||
ScrollFilter.SpeedY="Uspravna brzina"
|
||||
ScrollFilter.LimitWidth="Ograničenje širine"
|
||||
ScrollFilter.LimitHeight="Ograničenje visine"
|
||||
CustomColor="Posebna boja"
|
||||
Red="Crvena"
|
||||
Green="Zelena"
|
||||
Blue="Plava"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Prag otvaranja (dB)"
|
||||
NoiseGate.CloseThreshold="Prag zatvaranja (dB)"
|
||||
NoiseGate.AttackTime="Vreme napada (milisekunde)"
|
||||
NoiseGate.HoldTime="Vreme zadržavanja (milisekunde)"
|
||||
NoiseGate.ReleaseTime="Vreme otpuštanja (milisekunde)"
|
||||
Gain.GainDB="Pojačanje (dB)"
|
||||
StretchImage="Istegni sliku (zanemari odnos visine i širine slike)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/hu-HU.ini
Normal file
54
plugins/obs-filters/data/locale/hu-HU.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Színkorrekció"
|
||||
MaskFilter="Képmaszk/Keverés"
|
||||
AsyncDelayFilter="Videó Késleltetés (Async)"
|
||||
CropFilter="Vágás"
|
||||
ScrollFilter="Görgetés"
|
||||
ChromaKeyFilter="Chroma Kulcs"
|
||||
ColorKeyFilter="Színkulcs"
|
||||
SharpnessFilter="Élesítés"
|
||||
NoiseGate="Zajgát"
|
||||
Gain="Erősítés"
|
||||
DelayMs="Késleltetés (ezredmásodperc)"
|
||||
Type="Típus"
|
||||
MaskBlendType.MaskColor="Alfa Maszk (Színcsatorna)"
|
||||
MaskBlendType.MaskAlpha="Alfa Maszk (Alfacsatorna)"
|
||||
MaskBlendType.BlendMultiply="Keverés (Szorzás)"
|
||||
MaskBlendType.BlendAddition="Keverés (Kiegészítés)"
|
||||
MaskBlendType.BlendSubtraction="Keverés (Kivonás)"
|
||||
Path="Elérési Út"
|
||||
Color="Szín"
|
||||
Opacity="Áttetszőség"
|
||||
Contrast="Kontraszt"
|
||||
Brightness="Fényerő"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Összes képfájl"
|
||||
BrowsePath.AllFiles="Minden fájl"
|
||||
KeyColorType="Kulcsszín Típus"
|
||||
KeyColor="Kulcsszín"
|
||||
Similarity="Hasonlóság (1-1000)"
|
||||
Smoothness="Simaság (1-1000)"
|
||||
ColorSpillReduction="Kulcsszín Szennyezés Csökkentés (1-1000)"
|
||||
Crop.Left="Bal"
|
||||
Crop.Right="Jobb"
|
||||
Crop.Top="Fent"
|
||||
Crop.Bottom="Lent"
|
||||
Crop.Width="Szélesség"
|
||||
Crop.Height="Magasság"
|
||||
Crop.Relative="Relatív"
|
||||
ScrollFilter.SpeedX="Vízszintes sebesség"
|
||||
ScrollFilter.SpeedY="Függőleges sebesség"
|
||||
ScrollFilter.LimitWidth="Szélesség Limit"
|
||||
ScrollFilter.LimitHeight="Magasság Limit"
|
||||
CustomColor="Egyéni Szín"
|
||||
Red="Piros"
|
||||
Green="Zöld"
|
||||
Blue="Kék"
|
||||
Magenta="Bíbor"
|
||||
NoiseGate.OpenThreshold="Nyitó küszöb (dB)"
|
||||
NoiseGate.CloseThreshold="Záró küszöb (dB)"
|
||||
NoiseGate.AttackTime="Aktiválási idő (ezredmásodperc)"
|
||||
NoiseGate.HoldTime="Kitartás ideje (ezredmásodperc)"
|
||||
NoiseGate.ReleaseTime="Felengedés ideje (ezredmásodperc)"
|
||||
Gain.GainDB="Erősítés (dB)"
|
||||
StretchImage="Kép Nyújtása (képarány elvetésével)"
|
||||
|
||||
53
plugins/obs-filters/data/locale/it-IT.ini
Normal file
53
plugins/obs-filters/data/locale/it-IT.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Correzione del colore"
|
||||
MaskFilter="Immagine maschera/miscela"
|
||||
AsyncDelayFilter="Ritardo video (Asincrono)"
|
||||
CropFilter="Ritaglia"
|
||||
ScrollFilter="Scorrimento"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Color Key"
|
||||
SharpnessFilter="Nitidizza"
|
||||
NoiseGate="Noise Gate"
|
||||
Gain="Incremento"
|
||||
DelayMs="Ritardo (in millisecondi)"
|
||||
Type="Tipo"
|
||||
MaskBlendType.MaskColor="Maschera alfa (canale di colore)"
|
||||
MaskBlendType.MaskAlpha="Maschera alfa (Alpha Channel)"
|
||||
MaskBlendType.BlendMultiply="Miscela (moltiplica)"
|
||||
MaskBlendType.BlendAddition="Miscela (aggiunta)"
|
||||
MaskBlendType.BlendSubtraction="Miscela (sottrazione)"
|
||||
Path="Percorso"
|
||||
Color="Colore"
|
||||
Opacity="Opacità"
|
||||
Contrast="Contrasto"
|
||||
Brightness="Luminosità"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Tutti i file di immagine"
|
||||
BrowsePath.AllFiles="Tutti i file"
|
||||
KeyColorType="Tipo di Color Key"
|
||||
KeyColor="Key Color"
|
||||
Similarity="Somiglianza (1-1000)"
|
||||
Smoothness="Scorrevolezza (1-1000)"
|
||||
ColorSpillReduction="Key Color Spill Reduction (1-1000)"
|
||||
Crop.Left="A sinistra"
|
||||
Crop.Right="A destra"
|
||||
Crop.Top="In alto"
|
||||
Crop.Bottom="In Basso"
|
||||
Crop.Width="Larghezza"
|
||||
Crop.Height="Altezza"
|
||||
Crop.Relative="Relativo"
|
||||
ScrollFilter.SpeedX="Velocità orizzontale"
|
||||
ScrollFilter.SpeedY="Velocità verticale"
|
||||
ScrollFilter.LimitWidth="Limite larghezza"
|
||||
ScrollFilter.LimitHeight="Limite altezza"
|
||||
CustomColor="Personalizza colore"
|
||||
Red="Rosso"
|
||||
Green="Verde"
|
||||
Blue="Blu"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Apri soglia (dB)"
|
||||
NoiseGate.CloseThreshold="Chiudo soglia (dB)"
|
||||
NoiseGate.AttackTime="Tempo d'inizio (millisecondi)"
|
||||
NoiseGate.HoldTime="Tempo d'attesa (millisecondi)"
|
||||
NoiseGate.ReleaseTime="Tempo di rilascio (millisecondi)"
|
||||
Gain.GainDB="Incremento (dB)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/ja-JP.ini
Normal file
54
plugins/obs-filters/data/locale/ja-JP.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="色補正"
|
||||
MaskFilter="イメージ マスク/ブレンド"
|
||||
AsyncDelayFilter="映像の遅延 (非同期)"
|
||||
CropFilter="クロップ"
|
||||
ScrollFilter="スクロール"
|
||||
ChromaKeyFilter="クロマキー"
|
||||
ColorKeyFilter="カラーキー"
|
||||
SharpnessFilter="シャープ"
|
||||
NoiseGate="ノイズゲート"
|
||||
Gain="ゲイン"
|
||||
DelayMs="遅延時間 (ミリ秒)"
|
||||
Type="種別"
|
||||
MaskBlendType.MaskColor="アルファ マスク(カラー チャンネル)"
|
||||
MaskBlendType.MaskAlpha="アルファ マスク (アルファ チャネル)"
|
||||
MaskBlendType.BlendMultiply="合成(乗算)"
|
||||
MaskBlendType.BlendAddition="合成 (加算)"
|
||||
MaskBlendType.BlendSubtraction="合成 (減算)"
|
||||
Path="パス"
|
||||
Color="色"
|
||||
Opacity="不透明度"
|
||||
Contrast="コントラスト"
|
||||
Brightness="輝度"
|
||||
Gamma="ガンマ"
|
||||
BrowsePath.Images="すべての画像ファイル"
|
||||
BrowsePath.AllFiles="すべてのファイル"
|
||||
KeyColorType="色キーの種類"
|
||||
KeyColor="キーの色"
|
||||
Similarity="類似性(1-1000)"
|
||||
Smoothness="滑らかさ (1-1000)"
|
||||
ColorSpillReduction="キーカラー流出低減 (1-1000)"
|
||||
Crop.Left="左"
|
||||
Crop.Right="右"
|
||||
Crop.Top="上"
|
||||
Crop.Bottom="下"
|
||||
Crop.Width="幅"
|
||||
Crop.Height="高さ"
|
||||
Crop.Relative="相対的"
|
||||
ScrollFilter.SpeedX="水平速度"
|
||||
ScrollFilter.SpeedY="垂直速度"
|
||||
ScrollFilter.LimitWidth="幅を制限する"
|
||||
ScrollFilter.LimitHeight="高さを制限する"
|
||||
CustomColor="カスタム色"
|
||||
Red="赤"
|
||||
Green="緑"
|
||||
Blue="青"
|
||||
Magenta="マゼンタ"
|
||||
NoiseGate.OpenThreshold="開放閾値 (dB)"
|
||||
NoiseGate.CloseThreshold="閉鎖閾値 (dB)"
|
||||
NoiseGate.AttackTime="動作開始時間 (ミリ秒)"
|
||||
NoiseGate.HoldTime="保持時間 (ミリ秒)"
|
||||
NoiseGate.ReleaseTime="解除時間 (ミリ秒)"
|
||||
Gain.GainDB="ゲイン (dB)"
|
||||
StretchImage="画像を拡大(アスペクト比を破棄)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/ko-KR.ini
Normal file
54
plugins/obs-filters/data/locale/ko-KR.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="색상 보정"
|
||||
MaskFilter="이미지 마스크/혼합"
|
||||
AsyncDelayFilter="비디오 지연 (비동기)"
|
||||
CropFilter="자르기"
|
||||
ScrollFilter="스크롤"
|
||||
ChromaKeyFilter="크로마 키"
|
||||
ColorKeyFilter="색상 키"
|
||||
SharpnessFilter="선명하게"
|
||||
NoiseGate="노이즈 게이트"
|
||||
Gain="증폭"
|
||||
DelayMs="지연 (밀리초)"
|
||||
Type="형식"
|
||||
MaskBlendType.MaskColor="알파 마스크 (색채 채널)"
|
||||
MaskBlendType.MaskAlpha="알파 마스크 (알파 채널)"
|
||||
MaskBlendType.BlendMultiply="혼합 (승산)"
|
||||
MaskBlendType.BlendAddition="혼합 (가산)"
|
||||
MaskBlendType.BlendSubtraction="혼합 (감산)"
|
||||
Path="경로"
|
||||
Color="색"
|
||||
Opacity="투명도"
|
||||
Contrast="대비"
|
||||
Brightness="명암"
|
||||
Gamma="감마"
|
||||
BrowsePath.Images="모든 이미지 파일"
|
||||
BrowsePath.AllFiles="모든 파일"
|
||||
KeyColorType="키 색상 형식"
|
||||
KeyColor="키 색상"
|
||||
Similarity="유사성 (1-1000)"
|
||||
Smoothness="매끄러움 (1-1000)"
|
||||
ColorSpillReduction="키 색상 유출 감소 (1-1000)"
|
||||
Crop.Left="좌측"
|
||||
Crop.Right="우측"
|
||||
Crop.Top="상단"
|
||||
Crop.Bottom="하단"
|
||||
Crop.Width="너비"
|
||||
Crop.Height="높이"
|
||||
Crop.Relative="상대"
|
||||
ScrollFilter.SpeedX="수평 속도"
|
||||
ScrollFilter.SpeedY="수직 속도"
|
||||
ScrollFilter.LimitWidth="폭 제한"
|
||||
ScrollFilter.LimitHeight="높이 제한"
|
||||
CustomColor="사용자 색상"
|
||||
Red="적색"
|
||||
Green="녹색"
|
||||
Blue="청색"
|
||||
Magenta="심홍색"
|
||||
NoiseGate.OpenThreshold="개방 역치값 (dB)"
|
||||
NoiseGate.CloseThreshold="폐쇄 역치값 (dB)"
|
||||
NoiseGate.AttackTime="개방 준비 시간 (밀리세컨드)"
|
||||
NoiseGate.HoldTime="개방 유지 시간 (밀리세컨드)"
|
||||
NoiseGate.ReleaseTime="폐쇄 준비 시간 (밀리세컨드)"
|
||||
Gain.GainDB="증폭 (dB)"
|
||||
StretchImage="이미지 늘리기 (이미지 가로 세로 비율 포기)"
|
||||
|
||||
53
plugins/obs-filters/data/locale/nb-NO.ini
Normal file
53
plugins/obs-filters/data/locale/nb-NO.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Fargekorrigering"
|
||||
MaskFilter="Bildemaske/-blanding"
|
||||
AsyncDelayFilter="Videoforsinkelse (asynkron)"
|
||||
CropFilter="Beskjæring"
|
||||
ScrollFilter="Rull"
|
||||
ChromaKeyFilter="Chromafilter"
|
||||
ColorKeyFilter="Fargefilter"
|
||||
SharpnessFilter="Skjerpe"
|
||||
NoiseGate="Støyterskel"
|
||||
Gain="Forsterkning"
|
||||
DelayMs="Forsinkelse (millisekunder)"
|
||||
Type="Type"
|
||||
MaskBlendType.MaskColor="Alphamaske (fargekanal)"
|
||||
MaskBlendType.MaskAlpha="Alphamaske (alphakanal)"
|
||||
MaskBlendType.BlendMultiply="Bland (multipliser)"
|
||||
MaskBlendType.BlendAddition="Bland (adder)"
|
||||
MaskBlendType.BlendSubtraction="Bland (subtraher)"
|
||||
Path="Bane"
|
||||
Color="Farge"
|
||||
Opacity="Opasitet (ugjennomsiktighet)"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Lysstyrke"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Alle bildefiler"
|
||||
BrowsePath.AllFiles="Alle filer"
|
||||
KeyColorType="Nøkkelfargetype"
|
||||
KeyColor="Nøkkelfarge"
|
||||
Similarity="Likhet (1-1000)"
|
||||
Smoothness="Glatthet (1-1000)"
|
||||
ColorSpillReduction="Reduser nøkkelfargespill (1-1000)"
|
||||
Crop.Left="Venstre"
|
||||
Crop.Right="Høyre"
|
||||
Crop.Top="Topp"
|
||||
Crop.Bottom="Bunn"
|
||||
Crop.Width="Bredde"
|
||||
Crop.Height="Høyde"
|
||||
Crop.Relative="Relativ"
|
||||
ScrollFilter.SpeedX="Vannrett hastighet"
|
||||
ScrollFilter.SpeedY="Loddrett hastighet"
|
||||
ScrollFilter.LimitWidth="Begrens bredde"
|
||||
ScrollFilter.LimitHeight="Begrens høyde"
|
||||
CustomColor="Egendefinert farge"
|
||||
Red="Rød"
|
||||
Green="Grønn"
|
||||
Blue="Blå"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Åpneterskel (dB)"
|
||||
NoiseGate.CloseThreshold="Stengeterskel (dB)"
|
||||
NoiseGate.AttackTime="Angrepstid (millisekunder)"
|
||||
NoiseGate.HoldTime="Holdetid (millisekunder)"
|
||||
NoiseGate.ReleaseTime="Løslatelsestid (millisekunder)"
|
||||
Gain.GainDB="Forsterkning (dB)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/nl-NL.ini
Normal file
54
plugins/obs-filters/data/locale/nl-NL.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Kleurcorrectie"
|
||||
MaskFilter="Afbeeldingsmasker/Mengen"
|
||||
AsyncDelayFilter="Videovertraging (Async)"
|
||||
CropFilter="Bijsnijden"
|
||||
ScrollFilter="Scrollen"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Color Key"
|
||||
SharpnessFilter="Verscherpen"
|
||||
NoiseGate="Noise Gate"
|
||||
Gain="Gain"
|
||||
DelayMs="Vertraging (milliseconden)"
|
||||
Type="Type"
|
||||
MaskBlendType.MaskColor="Alphamasker (Kleurkanaal)"
|
||||
MaskBlendType.MaskAlpha="Alphamasker (Alphakanaal)"
|
||||
MaskBlendType.BlendMultiply="Mengen (Vermenigvuldigen)"
|
||||
MaskBlendType.BlendAddition="Mengen (Toevoegen)"
|
||||
MaskBlendType.BlendSubtraction="Mengen (Verschil)"
|
||||
Path="Pad"
|
||||
Color="Kleur"
|
||||
Opacity="Dekking"
|
||||
Contrast="Contrast"
|
||||
Brightness="Helderheid"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Alle Afbeeldingbestanden"
|
||||
BrowsePath.AllFiles="Alle Bestanden"
|
||||
KeyColorType="Key Kleurtype"
|
||||
KeyColor="Key Kleur"
|
||||
Similarity="Tolerantie (1-1000)"
|
||||
Smoothness="Overvloeien (1-1000)"
|
||||
ColorSpillReduction="Key-kleur Spillvermindering (1-1000)"
|
||||
Crop.Left="Links"
|
||||
Crop.Right="Rechts"
|
||||
Crop.Top="Boven"
|
||||
Crop.Bottom="Onder"
|
||||
Crop.Width="Breedte"
|
||||
Crop.Height="Hoogte"
|
||||
Crop.Relative="Relatief"
|
||||
ScrollFilter.SpeedX="Horizontale snelheid"
|
||||
ScrollFilter.SpeedY="Verticale snelheid"
|
||||
ScrollFilter.LimitWidth="Beperk Breedte"
|
||||
ScrollFilter.LimitHeight="Beperk Hoogte"
|
||||
CustomColor="Aangepaste kleur"
|
||||
Red="Rood"
|
||||
Green="Groen"
|
||||
Blue="Blauw"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Open-drempel (dB)"
|
||||
NoiseGate.CloseThreshold="Sluit-drempel (dB)"
|
||||
NoiseGate.AttackTime="Attack-tijd (milliseconden)"
|
||||
NoiseGate.HoldTime="Hold-tijd (milliseconden)"
|
||||
NoiseGate.ReleaseTime="Release-tijd (milliseconden)"
|
||||
Gain.GainDB="Gain (dB)"
|
||||
StretchImage="Afbeelding uitrekken (negeer beeldverhouding van de afbeelding)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/pl-PL.ini
Normal file
54
plugins/obs-filters/data/locale/pl-PL.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Korekcja Kolorów"
|
||||
MaskFilter="Maskowanie/nakładanie obrazu"
|
||||
AsyncDelayFilter="Opóźnienie wideo (asynchronicznie)"
|
||||
CropFilter="Kadrowanie"
|
||||
ScrollFilter="Przewijanie"
|
||||
ChromaKeyFilter="Kluczowanie koloru (chroma key)"
|
||||
ColorKeyFilter="Kluczowanie koloru (kolor)"
|
||||
SharpnessFilter="Wyostrzanie"
|
||||
NoiseGate="Bramka szumów"
|
||||
Gain="Poziom"
|
||||
DelayMs="Opóźnienie (milisekundy)"
|
||||
Type="Typ"
|
||||
MaskBlendType.MaskColor="Maska alfa (kanał koloru)"
|
||||
MaskBlendType.MaskAlpha="Maska alfa (kanał alfa)"
|
||||
MaskBlendType.BlendMultiply="Łączenie obrazów (iloczyn)"
|
||||
MaskBlendType.BlendAddition="Łączenie obrazów (suma)"
|
||||
MaskBlendType.BlendSubtraction="Łączenie obrazów (różnica)"
|
||||
Path="Ścieżka"
|
||||
Color="Kolor"
|
||||
Opacity="Przezroczystość"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Jasność"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Wszystkie pliki obrazów"
|
||||
BrowsePath.AllFiles="Wszystkie Pliki"
|
||||
KeyColorType="Typ klucza kolorów"
|
||||
KeyColor="Kolor kluczowy"
|
||||
Similarity="Podobieństwo (1-1000)"
|
||||
Smoothness="Gładkość (1-1000)"
|
||||
ColorSpillReduction="Tolerancja koloru kluczowego (1-1000)"
|
||||
Crop.Left="Do lewej"
|
||||
Crop.Right="Do prawej"
|
||||
Crop.Top="Do góry"
|
||||
Crop.Bottom="Do dołu"
|
||||
Crop.Width="Szerokość"
|
||||
Crop.Height="Wysokość"
|
||||
Crop.Relative="Względne"
|
||||
ScrollFilter.SpeedX="Prędkość pozioma"
|
||||
ScrollFilter.SpeedY="Prędkość pionowa"
|
||||
ScrollFilter.LimitWidth="Limit szerokości"
|
||||
ScrollFilter.LimitHeight="Limit wysokości"
|
||||
CustomColor="Własny kolor"
|
||||
Red="Czerwony"
|
||||
Green="Zielony"
|
||||
Blue="Niebieski"
|
||||
Magenta="Purpurowy"
|
||||
NoiseGate.OpenThreshold="Próg otwarcia (dB)"
|
||||
NoiseGate.CloseThreshold="Próg odcięcia (dB)"
|
||||
NoiseGate.AttackTime="Czas ataku (milisekundy)"
|
||||
NoiseGate.HoldTime="Czas wstrzymania (milisekundy)"
|
||||
NoiseGate.ReleaseTime="Czas zwolnienia (milisekundy)"
|
||||
Gain.GainDB="Poziom (dB)"
|
||||
StretchImage="Rozciągnięcie obrazu (ignoruj proporcje)"
|
||||
|
||||
53
plugins/obs-filters/data/locale/pt-BR.ini
Normal file
53
plugins/obs-filters/data/locale/pt-BR.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Correção de cor"
|
||||
MaskFilter="Máscara/mistura de imagem"
|
||||
AsyncDelayFilter="Atraso de vídeo (Async)"
|
||||
CropFilter="Cortar"
|
||||
ScrollFilter="Percorre"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Color Key"
|
||||
SharpnessFilter="Nitidez"
|
||||
NoiseGate="Filtro de ruído"
|
||||
Gain="Ganho"
|
||||
DelayMs="Atraso (milissegundos)"
|
||||
Type="Topo"
|
||||
MaskBlendType.MaskColor="Alpha Mask (Color Channel)"
|
||||
MaskBlendType.MaskAlpha="Alpha Mask (Alpha Channel)"
|
||||
MaskBlendType.BlendMultiply="Misturar (multiplicação)"
|
||||
MaskBlendType.BlendAddition="Misturar (adição)"
|
||||
MaskBlendType.BlendSubtraction="Misturar (subtração)"
|
||||
Path="Caminho"
|
||||
Color="Cor"
|
||||
Opacity="Transparência"
|
||||
Contrast="Contraste"
|
||||
Brightness="Brilho"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Todos os ficheiros de imagem"
|
||||
BrowsePath.AllFiles="Todos os ficheiros"
|
||||
KeyColorType="Tipo de cor-chave"
|
||||
KeyColor="Cor-chave"
|
||||
Similarity="Semelhança (1-1000)"
|
||||
Smoothness="Suavidade (1-1000)"
|
||||
ColorSpillReduction="Redução de excesso da cor-chave (1-1000)"
|
||||
Crop.Left="Esquerda"
|
||||
Crop.Right="Direita"
|
||||
Crop.Top="Cima"
|
||||
Crop.Bottom="Baixo"
|
||||
Crop.Width="Largura"
|
||||
Crop.Height="Altura"
|
||||
Crop.Relative="Relativo"
|
||||
ScrollFilter.SpeedX="Velocidade horizontal"
|
||||
ScrollFilter.SpeedY="Velocidade vertical"
|
||||
ScrollFilter.LimitWidth="Limitar largura"
|
||||
ScrollFilter.LimitHeight="Limitar altura"
|
||||
CustomColor="Cor personalizada"
|
||||
Red="Vermelho"
|
||||
Green="Verde"
|
||||
Blue="Azul"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Limite de abertura (dB)"
|
||||
NoiseGate.CloseThreshold="Limite de fecho (dB)"
|
||||
NoiseGate.AttackTime="Tempo de ataque (milissegundos)"
|
||||
NoiseGate.HoldTime="Tempo de bloqueio (milissegundos)"
|
||||
NoiseGate.ReleaseTime="Tempo de libertação (milissegundos)"
|
||||
Gain.GainDB="Ganho (dB)"
|
||||
|
||||
53
plugins/obs-filters/data/locale/pt-PT.ini
Normal file
53
plugins/obs-filters/data/locale/pt-PT.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Correção de cor"
|
||||
MaskFilter="Máscara/mistura de imagem"
|
||||
AsyncDelayFilter="Atraso de vídeo (Async)"
|
||||
CropFilter="Corte"
|
||||
ScrollFilter="Percorre"
|
||||
ChromaKeyFilter="Chroma Key"
|
||||
ColorKeyFilter="Color Key"
|
||||
SharpnessFilter="Nitidez"
|
||||
NoiseGate="Filtro de ruído"
|
||||
Gain="Ganho"
|
||||
DelayMs="Atraso (milissegundos)"
|
||||
Type="Topo"
|
||||
MaskBlendType.MaskColor="Alpha Mask (Color Channel)"
|
||||
MaskBlendType.MaskAlpha="Alpha Mask (Alpha Channel)"
|
||||
MaskBlendType.BlendMultiply="Misturar (multiplicação)"
|
||||
MaskBlendType.BlendAddition="Misturar (adição)"
|
||||
MaskBlendType.BlendSubtraction="Misturar (subtração)"
|
||||
Path="Caminho"
|
||||
Color="Cor"
|
||||
Opacity="Transparência"
|
||||
Contrast="Contraste"
|
||||
Brightness="Brilho"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Todos os ficheiros de imagem"
|
||||
BrowsePath.AllFiles="Todos os ficheiros"
|
||||
KeyColorType="Tipo de cor-chave"
|
||||
KeyColor="Cor-chave"
|
||||
Similarity="Semelhança (1-1000)"
|
||||
Smoothness="Suavidade (1-1000)"
|
||||
ColorSpillReduction="Redução de excesso da cor-chave (1-1000)"
|
||||
Crop.Left="Esquerda"
|
||||
Crop.Right="Direita"
|
||||
Crop.Top="Cima"
|
||||
Crop.Bottom="Baixo"
|
||||
Crop.Width="Largura"
|
||||
Crop.Height="Altura"
|
||||
Crop.Relative="Relativo"
|
||||
ScrollFilter.SpeedX="Velocidade horizontal"
|
||||
ScrollFilter.SpeedY="Velocidade vertical"
|
||||
ScrollFilter.LimitWidth="Limitar largura"
|
||||
ScrollFilter.LimitHeight="Limitar altura"
|
||||
CustomColor="Cor personalizada"
|
||||
Red="Vermelho"
|
||||
Green="Verde"
|
||||
Blue="Azul"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Limite de abertura (dB)"
|
||||
NoiseGate.CloseThreshold="Limite de fecho (dB)"
|
||||
NoiseGate.AttackTime="Tempo de ataque (milissegundos)"
|
||||
NoiseGate.HoldTime="Tempo de bloqueio (milissegundos)"
|
||||
NoiseGate.ReleaseTime="Tempo de libertação (milissegundos)"
|
||||
Gain.GainDB="Ganho (dB)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/ro-RO.ini
Normal file
54
plugins/obs-filters/data/locale/ro-RO.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Corecţie de culoare"
|
||||
MaskFilter="Mascare Imagine"
|
||||
AsyncDelayFilter="Întârziere video (asincron)"
|
||||
CropFilter="Crop"
|
||||
ScrollFilter="Scroll"
|
||||
ChromaKeyFilter="Cheia Chroma"
|
||||
ColorKeyFilter="Culoare cheie"
|
||||
SharpnessFilter="Accentuează"
|
||||
NoiseGate="Poarta de zgomot"
|
||||
Gain="Amplificare"
|
||||
DelayMs="Întârziere (milisecunde)"
|
||||
Type="Tip"
|
||||
MaskBlendType.MaskColor="Masca Alpha (Canal Culoare)"
|
||||
MaskBlendType.MaskAlpha="Masca Alpha (Canal Alpha)"
|
||||
MaskBlendType.BlendMultiply="Blend (Multiply)"
|
||||
MaskBlendType.BlendAddition="Amestec (Plus)"
|
||||
MaskBlendType.BlendSubtraction="Blend (Minus)"
|
||||
Path="Cale"
|
||||
Color="Culoare"
|
||||
Opacity="Opacitate"
|
||||
Contrast="Contrast"
|
||||
Brightness="Luminozitate"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Toate fişierele de imagini"
|
||||
BrowsePath.AllFiles="Toate fişierele"
|
||||
KeyColorType="Tip Culoare Cheie"
|
||||
KeyColor="Culoarea cheie"
|
||||
Similarity="Similitudine (1-100)"
|
||||
Smoothness="Netezime (1-1000)"
|
||||
ColorSpillReduction="Reducere Devarsare Culoare Cheie (1-1000)"
|
||||
Crop.Left="Stânga"
|
||||
Crop.Right="Dreapta"
|
||||
Crop.Top="Sus"
|
||||
Crop.Bottom="Jos"
|
||||
Crop.Width="Lăţime"
|
||||
Crop.Height="Înălţime"
|
||||
Crop.Relative="Relativa"
|
||||
ScrollFilter.SpeedX="Viteza orizontală"
|
||||
ScrollFilter.SpeedY="Viteza verticală"
|
||||
ScrollFilter.LimitWidth="Limită lățime"
|
||||
ScrollFilter.LimitHeight="Limita inaltime"
|
||||
CustomColor="Culoare personalizata"
|
||||
Red="Roșu"
|
||||
Green="Verde"
|
||||
Blue="Albastru"
|
||||
Magenta="Purpuriu"
|
||||
NoiseGate.OpenThreshold="Pragul de pornire (dB)"
|
||||
NoiseGate.CloseThreshold="Pragul de oprire (dB)"
|
||||
NoiseGate.AttackTime="Timpul de raspuns (milisecunde)"
|
||||
NoiseGate.HoldTime="Timpul de menţinut (milisecunde)"
|
||||
NoiseGate.ReleaseTime="Timpul de eliberare (milisecunde)"
|
||||
Gain.GainDB="Amplificare (dB)"
|
||||
StretchImage="Întinde imaginea (renunța la raportul de aspect al imaginii)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/ru-RU.ini
Normal file
54
plugins/obs-filters/data/locale/ru-RU.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Коррекция цвета"
|
||||
MaskFilter="Маска изображения/Смешивание"
|
||||
AsyncDelayFilter="Задержка видео (асинхронность)"
|
||||
CropFilter="Обрезка"
|
||||
ScrollFilter="Прокрутка"
|
||||
ChromaKeyFilter="Хромакей"
|
||||
ColorKeyFilter="Цветовой ключ"
|
||||
SharpnessFilter="Увеличить резкость"
|
||||
NoiseGate="Подавление шума"
|
||||
Gain="Усиление"
|
||||
DelayMs="Задержка (миллисекунд)"
|
||||
Type="Тип"
|
||||
MaskBlendType.MaskColor="Альфа-маска (канал цвета)"
|
||||
MaskBlendType.MaskAlpha="Альфа-маска (канал прозрачности)"
|
||||
MaskBlendType.BlendMultiply="Смешивание (Умножение)"
|
||||
MaskBlendType.BlendAddition="Смешивание (Добавление)"
|
||||
MaskBlendType.BlendSubtraction="Смешивание (Вычитание)"
|
||||
Path="Путь"
|
||||
Color="Цвет"
|
||||
Opacity="Непрозрачность"
|
||||
Contrast="Контрастность"
|
||||
Brightness="Яркость"
|
||||
Gamma="Гамма"
|
||||
BrowsePath.Images="Все файлы изображений"
|
||||
BrowsePath.AllFiles="Все файлы"
|
||||
KeyColorType="Тип ключевого цвета"
|
||||
KeyColor="Ключевой цвет"
|
||||
Similarity="Сходство (1-1000)"
|
||||
Smoothness="Гладкость (1-1000)"
|
||||
ColorSpillReduction="Снижение утечки ключевого цвета (1-1000)"
|
||||
Crop.Left="Слева"
|
||||
Crop.Right="Справа"
|
||||
Crop.Top="Сверху"
|
||||
Crop.Bottom="Снизу"
|
||||
Crop.Width="Ширина"
|
||||
Crop.Height="Высота"
|
||||
Crop.Relative="Относительно"
|
||||
ScrollFilter.SpeedX="Горизонтальная скорость"
|
||||
ScrollFilter.SpeedY="Вертикальная скорость"
|
||||
ScrollFilter.LimitWidth="Ограничивать ширину"
|
||||
ScrollFilter.LimitHeight="Ограничивать высоту"
|
||||
CustomColor="Пользовательский цвет"
|
||||
Red="Красный"
|
||||
Green="Зелёный"
|
||||
Blue="Cиний"
|
||||
Magenta="Пурпурный"
|
||||
NoiseGate.OpenThreshold="Нижний порог (дБ)"
|
||||
NoiseGate.CloseThreshold="Верхний порог (дБ)"
|
||||
NoiseGate.AttackTime="Длительность атаки (миллисекунд)"
|
||||
NoiseGate.HoldTime="Длительность задержки (миллисекунд)"
|
||||
NoiseGate.ReleaseTime="Длительность затухания (миллисекунд)"
|
||||
Gain.GainDB="Усиление (дБ)"
|
||||
StretchImage="Растянуть изображение (игнорировать пропорции изображения)"
|
||||
|
||||
11
plugins/obs-filters/data/locale/sk-SK.ini
Normal file
11
plugins/obs-filters/data/locale/sk-SK.ini
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Crop.Left="Vľavo"
|
||||
Crop.Right="Vpravo"
|
||||
Crop.Top="Hore"
|
||||
Crop.Bottom="Dole"
|
||||
Crop.Width="Šírka"
|
||||
Crop.Height="Výška"
|
||||
Crop.Relative="Relatívne"
|
||||
Red="Červená"
|
||||
Green="Zelená"
|
||||
Blue="Modrá"
|
||||
|
||||
2
plugins/obs-filters/data/locale/sl-SI.ini
Normal file
2
plugins/obs-filters/data/locale/sl-SI.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
ColorFilter="Popravljanje barv"
|
||||
|
||||
54
plugins/obs-filters/data/locale/sr-CS.ini
Normal file
54
plugins/obs-filters/data/locale/sr-CS.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Promena boja"
|
||||
MaskFilter="Slika maske i stapanja"
|
||||
AsyncDelayFilter="Video pauza (asinhrono)"
|
||||
CropFilter="Odsecanje"
|
||||
ScrollFilter="Pomeranje"
|
||||
ChromaKeyFilter="Ključ providnosti"
|
||||
ColorKeyFilter="Ključ boje"
|
||||
SharpnessFilter="Izoštravanje"
|
||||
NoiseGate="Kapija šuma"
|
||||
Gain="Pojačanje"
|
||||
DelayMs="Pauza (milisekunde)"
|
||||
Type="Vrsta"
|
||||
MaskBlendType.MaskColor="Maska prozirnosti (kanal boje)"
|
||||
MaskBlendType.MaskAlpha="Maska prozirnosti (prozirni kanal)"
|
||||
MaskBlendType.BlendMultiply="Stapanje (višestruko)"
|
||||
MaskBlendType.BlendAddition="Stapanje (dodavanjem)"
|
||||
MaskBlendType.BlendSubtraction="Stapanje (oduzimanjem)"
|
||||
Path="Putanja"
|
||||
Color="Boja"
|
||||
Opacity="Prozirnost"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Osvetljenje"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Sve slikovne datoteke"
|
||||
BrowsePath.AllFiles="Sve datoteke"
|
||||
KeyColorType="Vrsta ključne boje"
|
||||
KeyColor="Ključna boja"
|
||||
Similarity="Sličnost (1-1000)"
|
||||
Smoothness="Uglađenost (1-1000)"
|
||||
ColorSpillReduction="Smanjivanje prosipanja ključne boje (1-1000)"
|
||||
Crop.Left="S leva"
|
||||
Crop.Right="S desna"
|
||||
Crop.Top="Odozgo"
|
||||
Crop.Bottom="Odozdo"
|
||||
Crop.Width="Širina"
|
||||
Crop.Height="Visina"
|
||||
Crop.Relative="Relativno"
|
||||
ScrollFilter.SpeedX="Vodoravna brzina"
|
||||
ScrollFilter.SpeedY="Uspravna brzina"
|
||||
ScrollFilter.LimitWidth="Ograničenje širine"
|
||||
ScrollFilter.LimitHeight="Ograničenje visine"
|
||||
CustomColor="Posebna boja"
|
||||
Red="Crvena"
|
||||
Green="Zelena"
|
||||
Blue="Plava"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Prag otvaranja (dB)"
|
||||
NoiseGate.CloseThreshold="Prag zatvaranja (dB)"
|
||||
NoiseGate.AttackTime="Vreme napada (milisekunde)"
|
||||
NoiseGate.HoldTime="Vreme zadržavanja (milisekunde)"
|
||||
NoiseGate.ReleaseTime="Vreme otpuštanja (milisekunde)"
|
||||
Gain.GainDB="Pojačanje (dB)"
|
||||
StretchImage="Istegni sliku (zanemari odnos visine i širine slike)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/sr-SP.ini
Normal file
54
plugins/obs-filters/data/locale/sr-SP.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="Промена боја"
|
||||
MaskFilter="Слика маске и стапања"
|
||||
AsyncDelayFilter="Видео пауза (асинхроно)"
|
||||
CropFilter="Одсецање"
|
||||
ScrollFilter="Померање"
|
||||
ChromaKeyFilter="Кључ провидности"
|
||||
ColorKeyFilter="Кључ боје"
|
||||
SharpnessFilter="Изоштравање"
|
||||
NoiseGate="Капија шума"
|
||||
Gain="Појачање"
|
||||
DelayMs="Пауза (милисекунде)"
|
||||
Type="Врста"
|
||||
MaskBlendType.MaskColor="Маска прозирности (канал боје)"
|
||||
MaskBlendType.MaskAlpha="Маска прозирности (прозирни канал)"
|
||||
MaskBlendType.BlendMultiply="Стапање (умножавањем)"
|
||||
MaskBlendType.BlendAddition="Стапање (додавањем)"
|
||||
MaskBlendType.BlendSubtraction="Стапање (одузимањем)"
|
||||
Path="Путања"
|
||||
Color="Боја"
|
||||
Opacity="Прозирност"
|
||||
Contrast="Контраст"
|
||||
Brightness="Осветљење"
|
||||
Gamma="Гама"
|
||||
BrowsePath.Images="Све сликовне датотеке"
|
||||
BrowsePath.AllFiles="Све датотеке"
|
||||
KeyColorType="Врста кључне боје"
|
||||
KeyColor="Кључна боја"
|
||||
Similarity="Сличност (1-1000)"
|
||||
Smoothness="Углађеност (1-1000)"
|
||||
ColorSpillReduction="Смањење просипања кључне боје (1-1000)"
|
||||
Crop.Left="С лева"
|
||||
Crop.Right="С десна"
|
||||
Crop.Top="Одозго"
|
||||
Crop.Bottom="Одоздо"
|
||||
Crop.Width="Ширина"
|
||||
Crop.Height="Висина"
|
||||
Crop.Relative="Релативно"
|
||||
ScrollFilter.SpeedX="Водоравна брзина"
|
||||
ScrollFilter.SpeedY="Усправна брзина"
|
||||
ScrollFilter.LimitWidth="Ограничење ширине"
|
||||
ScrollFilter.LimitHeight="Ограничење висине"
|
||||
CustomColor="Посебна боја"
|
||||
Red="Црвена"
|
||||
Green="Зелена"
|
||||
Blue="Плава"
|
||||
Magenta="Магента"
|
||||
NoiseGate.OpenThreshold="Праг отварања (dB)"
|
||||
NoiseGate.CloseThreshold="Праг затварања (dB)"
|
||||
NoiseGate.AttackTime="Време напада (милисекунде)"
|
||||
NoiseGate.HoldTime="Време задржавања (милисекунде)"
|
||||
NoiseGate.ReleaseTime="Време отпуштања (милисекунде)"
|
||||
Gain.GainDB="Појачање (dB)"
|
||||
StretchImage="Истегни слику (занемари однос висине и ширине слике)"
|
||||
|
||||
53
plugins/obs-filters/data/locale/sv-SE.ini
Normal file
53
plugins/obs-filters/data/locale/sv-SE.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Färgkorrigering"
|
||||
MaskFilter="Bild Mask/Blandning"
|
||||
AsyncDelayFilter="Videofördröjning (Async)"
|
||||
CropFilter="Beskär"
|
||||
ScrollFilter="Scrollning"
|
||||
ChromaKeyFilter="Kromafilter"
|
||||
ColorKeyFilter="Färgfilter"
|
||||
SharpnessFilter="Skärpa"
|
||||
NoiseGate="Brusblockering"
|
||||
Gain="Förstärkning"
|
||||
DelayMs="Fördröjning (millisekunder)"
|
||||
Type="Typ"
|
||||
MaskBlendType.MaskColor="Alpha Mask (färgkanal)"
|
||||
MaskBlendType.MaskAlpha="Alpha Mask (alfakanal)"
|
||||
MaskBlendType.BlendMultiply="Blanda (Multiplicera)"
|
||||
MaskBlendType.BlendAddition="Blanda (Addition)"
|
||||
MaskBlendType.BlendSubtraction="Blanda (Subtraktion)"
|
||||
Path="Sökväg"
|
||||
Color="Färg"
|
||||
Opacity="Opacitet"
|
||||
Contrast="Kontrast"
|
||||
Brightness="Ljusstyrka"
|
||||
Gamma="Gamma"
|
||||
BrowsePath.Images="Alla bildfiler"
|
||||
BrowsePath.AllFiles="Alla Filer"
|
||||
KeyColorType="Huvudfärg typ"
|
||||
KeyColor="Huvudfärg"
|
||||
Similarity="Likhet (1-1000)"
|
||||
Smoothness="Jämnhet (1-1000)"
|
||||
ColorSpillReduction="Huvudfärgspillminskning (1-1000)"
|
||||
Crop.Left="Vänster"
|
||||
Crop.Right="Höger"
|
||||
Crop.Top="Överst"
|
||||
Crop.Bottom="Botten"
|
||||
Crop.Width="Bredd"
|
||||
Crop.Height="Höjd"
|
||||
Crop.Relative="Relativ"
|
||||
ScrollFilter.SpeedX="Horisontell hastighet"
|
||||
ScrollFilter.SpeedY="Vertikal hastighet"
|
||||
ScrollFilter.LimitWidth="Begränsa bredd"
|
||||
ScrollFilter.LimitHeight="Begränsa höjd"
|
||||
CustomColor="Anpassad färg"
|
||||
Red="Röd"
|
||||
Green="Grön"
|
||||
Blue="Blå"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Öppningströskel (dB)"
|
||||
NoiseGate.CloseThreshold="Avslutningströskel (dB)"
|
||||
NoiseGate.AttackTime="Ansatstid (millisekunder)"
|
||||
NoiseGate.HoldTime="Hålltid (millisekunder)"
|
||||
NoiseGate.ReleaseTime="Släpptid (millisekunder)"
|
||||
Gain.GainDB="Förstärkning (dB)"
|
||||
|
||||
53
plugins/obs-filters/data/locale/tr-TR.ini
Normal file
53
plugins/obs-filters/data/locale/tr-TR.ini
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
ColorFilter="Renk Düzeltme"
|
||||
MaskFilter="Görüntü Maskesi/Blend"
|
||||
AsyncDelayFilter="Görüntü Gecikmesi (Async)"
|
||||
CropFilter="Kırpma"
|
||||
ScrollFilter="Kaydır"
|
||||
ChromaKeyFilter="Chroma Anahtarı"
|
||||
ColorKeyFilter="Renk Anahtarı"
|
||||
SharpnessFilter="Keskinleştirme"
|
||||
NoiseGate="Gürültü Filtresi"
|
||||
Gain="Kazanç"
|
||||
DelayMs="Gecikme (milisaniye)"
|
||||
Type="Türü"
|
||||
MaskBlendType.MaskColor="Alfa Maskesi (Renk Kanalı)"
|
||||
MaskBlendType.MaskAlpha="Alfa Maskesi (Alfa Kanalı)"
|
||||
MaskBlendType.BlendMultiply="Blend (Çoğaltma)"
|
||||
MaskBlendType.BlendAddition="Blend (Ekleme)"
|
||||
MaskBlendType.BlendSubtraction="Blend (Çıkarma)"
|
||||
Path="Dosya Yolu"
|
||||
Color="Renk"
|
||||
Opacity="Opaklık"
|
||||
Contrast="Karşıtlık"
|
||||
Brightness="Parlaklık"
|
||||
Gamma="Gama"
|
||||
BrowsePath.Images="Tüm Resim Dosyaları"
|
||||
BrowsePath.AllFiles="Tüm Dosyalar"
|
||||
KeyColorType="Anahtar Renk Türü"
|
||||
KeyColor="Anahtar Renk"
|
||||
Similarity="Benzerlik (1-1000)"
|
||||
Smoothness="Pürüzsüzlük (1-1000)"
|
||||
ColorSpillReduction="Anahtar Renk Sızıntı Azaltma (1-1000)"
|
||||
Crop.Left="Sol"
|
||||
Crop.Right="Sağ"
|
||||
Crop.Top="Üst"
|
||||
Crop.Bottom="Alt"
|
||||
Crop.Width="Genişlik"
|
||||
Crop.Height="Yükseklik"
|
||||
Crop.Relative="Göreceli"
|
||||
ScrollFilter.SpeedX="Yatay Hız"
|
||||
ScrollFilter.SpeedY="Düşey Hız"
|
||||
ScrollFilter.LimitWidth="Genişliği Sınırla"
|
||||
ScrollFilter.LimitHeight="Yüksekliği Sınırla"
|
||||
CustomColor="Özel Renk"
|
||||
Red="Kırmızı"
|
||||
Green="Yeşil"
|
||||
Blue="Mavi"
|
||||
Magenta="Eflatun"
|
||||
NoiseGate.OpenThreshold="Eşik Başlangıcı (dB)"
|
||||
NoiseGate.CloseThreshold="Eşik Bitişi (dB)"
|
||||
NoiseGate.AttackTime="Atak Süresi (milisaniye)"
|
||||
NoiseGate.HoldTime="Kavrama Süresi (milisaniye)"
|
||||
NoiseGate.ReleaseTime="Bırakma Süresi (milisaniye)"
|
||||
Gain.GainDB="Kazanç (dB)"
|
||||
|
||||
54
plugins/obs-filters/data/locale/zh-CN.ini
Normal file
54
plugins/obs-filters/data/locale/zh-CN.ini
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
ColorFilter="色彩校正"
|
||||
MaskFilter="图像掩码/混合"
|
||||
AsyncDelayFilter="视频延迟(异步)"
|
||||
CropFilter="剪裁"
|
||||
ScrollFilter="滚动"
|
||||
ChromaKeyFilter="色度键"
|
||||
ColorKeyFilter="色值"
|
||||
SharpnessFilter="锐化"
|
||||
NoiseGate="噪音阈值"
|
||||
Gain="增益"
|
||||
DelayMs="延迟(毫秒)"
|
||||
Type="类型"
|
||||
MaskBlendType.MaskColor="Alpha 蒙版 (颜色通道)"
|
||||
MaskBlendType.MaskAlpha="Alpha 蒙版 (Alpha 通道)"
|
||||
MaskBlendType.BlendMultiply="混合 (多层)"
|
||||
MaskBlendType.BlendAddition="混合 (增加)"
|
||||
MaskBlendType.BlendSubtraction="混合 (减少)"
|
||||
Path="路径"
|
||||
Color="色彩"
|
||||
Opacity="不透明度"
|
||||
Contrast="对比度"
|
||||
Brightness="亮度"
|
||||
Gamma="伽玛"
|
||||
BrowsePath.Images="所有图像文件"
|
||||
BrowsePath.AllFiles="所有文件"
|
||||
KeyColorType="关键的颜色类型"
|
||||
KeyColor="关键的颜色"
|
||||
Similarity="相似度(1-1000)"
|
||||
Smoothness="平滑 (1-1000)"
|
||||
ColorSpillReduction="主色泄漏减少 (1-1000)"
|
||||
Crop.Left="左"
|
||||
Crop.Right="右"
|
||||
Crop.Top="顶部"
|
||||
Crop.Bottom="底部"
|
||||
Crop.Width="宽度"
|
||||
Crop.Height="高度"
|
||||
Crop.Relative="相对"
|
||||
ScrollFilter.SpeedX="水平速度"
|
||||
ScrollFilter.SpeedY="垂直速度"
|
||||
ScrollFilter.LimitWidth="限制宽度"
|
||||
ScrollFilter.LimitHeight="限制高度"
|
||||
CustomColor="自定义颜色"
|
||||
Red="红色"
|
||||
Green="绿色"
|
||||
Blue="蓝色"
|
||||
Magenta="品红"
|
||||
NoiseGate.OpenThreshold="打开阈值 (dB)"
|
||||
NoiseGate.CloseThreshold="关闭阈值 (dB)"
|
||||
NoiseGate.AttackTime="触发时间(毫秒)"
|
||||
NoiseGate.HoldTime="保持时间(毫秒)"
|
||||
NoiseGate.ReleaseTime="释放时间(毫秒)"
|
||||
Gain.GainDB="增益 (dB)"
|
||||
StretchImage="伸展图像 (丢弃图像纵横比)"
|
||||
|
||||
76
plugins/obs-filters/data/mask_alpha_filter.effect
Normal file
76
plugins/obs-filters/data/mask_alpha_filter.effect
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform texture2d target;
|
||||
uniform float4 color;
|
||||
uniform float2 mul_val;
|
||||
uniform float2 add_val;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertDataIn {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertDataOut {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float2 uv2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
VertDataOut VSDefault(VertDataIn v_in)
|
||||
{
|
||||
VertDataOut vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
vert_out.uv2 = v_in.uv * mul_val + add_val;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSAlphaMaskRGBA(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.a *= targetRGB.a;
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSAlphaMaskMatrix(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, v_in.uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
|
||||
float4 rgba = saturate(mul(float4(yuv.xyz, 1.0), color_matrix)) *
|
||||
color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.a = targetRGB.a;
|
||||
return rgba;
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSAlphaMaskRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSAlphaMaskMatrix(v_in);
|
||||
}
|
||||
}
|
||||
76
plugins/obs-filters/data/mask_color_filter.effect
Normal file
76
plugins/obs-filters/data/mask_color_filter.effect
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform texture2d target;
|
||||
uniform float4 color;
|
||||
uniform float2 mul_val;
|
||||
uniform float2 add_val;
|
||||
|
||||
sampler_state textureSampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertDataIn {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertDataOut {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float2 uv2 : TEXCOORD1;
|
||||
};
|
||||
|
||||
VertDataOut VSDefault(VertDataIn v_in)
|
||||
{
|
||||
VertDataOut vert_out;
|
||||
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = v_in.uv;
|
||||
vert_out.uv2 = v_in.uv * mul_val + add_val;
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSColorMaskRGBA(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 rgba = image.Sample(textureSampler, v_in.uv) * color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.a *= (targetRGB.r + targetRGB.g + targetRGB.b) / 3.0;
|
||||
return rgba;
|
||||
}
|
||||
|
||||
float4 PSColorMaskMatrix(VertDataOut v_in) : TARGET
|
||||
{
|
||||
float4 yuv = image.Sample(textureSampler, v_in.uv);
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
|
||||
float4 rgba = saturate(mul(float4(yuv.xyz, 1.0), color_matrix)) *
|
||||
color;
|
||||
|
||||
float4 targetRGB = target.Sample(textureSampler, v_in.uv2);
|
||||
rgba.a = (targetRGB.r + targetRGB.g + targetRGB.b) / 3.0;
|
||||
return rgba;
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSColorMaskRGBA(v_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(v_in);
|
||||
pixel_shader = PSColorMaskMatrix(v_in);
|
||||
}
|
||||
}
|
||||
118
plugins/obs-filters/data/sharpness.effect
Normal file
118
plugins/obs-filters/data/sharpness.effect
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
// Based on libretro shader https://github.com/libretro/common-shaders/blob/master/test/lab/misc/sharpness.cg
|
||||
// Converted to obs effect file by Nibbles
|
||||
|
||||
uniform float4x4 ViewProj;
|
||||
uniform texture2d image;
|
||||
uniform float4x4 color_matrix;
|
||||
uniform float3 color_range_min = {0.0, 0.0, 0.0};
|
||||
uniform float3 color_range_max = {1.0, 1.0, 1.0};
|
||||
|
||||
uniform texture2d target;
|
||||
uniform float4 color = {1.0, 1.0, 1.0, 1.0};
|
||||
|
||||
uniform float sharpness;
|
||||
uniform float texture_width;
|
||||
uniform float texture_height;
|
||||
|
||||
sampler_state def_sampler {
|
||||
Filter = Linear;
|
||||
AddressU = Clamp;
|
||||
AddressV = Clamp;
|
||||
};
|
||||
|
||||
struct VertInOut {
|
||||
float4 pos : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertOut {
|
||||
float4 pos : POSITION;
|
||||
float4 col : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 t1 : TEXCOORD1;
|
||||
float4 t2 : TEXCOORD2;
|
||||
float4 t3 : TEXCOORD3;
|
||||
};
|
||||
|
||||
VertOut VSDefault(VertInOut vert_in)
|
||||
{
|
||||
VertOut vert_out;
|
||||
vert_out.pos = mul(float4(vert_in.pos.xyz, 1.0), ViewProj);
|
||||
vert_out.uv = vert_in.uv;
|
||||
vert_out.col = color;
|
||||
|
||||
float2 ps = float2(1.0/texture_width, 1.0/texture_height);
|
||||
float dx = ps.x;
|
||||
float dy = ps.y;
|
||||
|
||||
vert_out.t1 = vert_in.uv.xxxy + float4( -dx, 0, dx, -dy); // A B C
|
||||
vert_out.t2 = vert_in.uv.xxxy + float4( -dx, 0, dx, 0); // D E F
|
||||
vert_out.t3 = vert_in.uv.xxxy + float4( -dx, 0, dx, dy); // G H I
|
||||
return vert_out;
|
||||
}
|
||||
|
||||
float4 PSDrawBare(VertOut vert_in) : TARGET
|
||||
{
|
||||
float4 E = image.Sample(def_sampler, vert_in.uv);
|
||||
|
||||
float4 colorx = 8*E;
|
||||
float4 B = image.Sample(def_sampler, vert_in.t1.yw);
|
||||
float4 D = image.Sample(def_sampler, vert_in.t2.xw);
|
||||
float4 F = image.Sample(def_sampler, vert_in.t2.zw);
|
||||
float4 H = image.Sample(def_sampler, vert_in.t3.yw);
|
||||
colorx -= image.Sample(def_sampler, vert_in.t1.xw);
|
||||
colorx -= B;
|
||||
colorx -= image.Sample(def_sampler, vert_in.t1.zw);
|
||||
colorx -= D;
|
||||
colorx -= F;
|
||||
colorx -= image.Sample(def_sampler, vert_in.t3.xw);
|
||||
colorx -= H;
|
||||
colorx -= image.Sample(def_sampler, vert_in.t3.zw);
|
||||
|
||||
colorx = ((E!=F && E!=D) || (E!=B && E!=H)) ? saturate(E + colorx*sharpness) : E;
|
||||
|
||||
return colorx;
|
||||
}
|
||||
|
||||
float4 PSDrawMatrix(VertOut vert_in) : TARGET
|
||||
{
|
||||
float4 E = image.Sample(def_sampler, vert_in.uv);
|
||||
|
||||
float4 colorx = 8*E;
|
||||
float4 B = image.Sample(def_sampler, vert_in.t1.yw);
|
||||
float4 D = image.Sample(def_sampler, vert_in.t2.xw);
|
||||
float4 F = image.Sample(def_sampler, vert_in.t2.zw);
|
||||
float4 H = image.Sample(def_sampler, vert_in.t3.yw);
|
||||
colorx -= image.Sample(def_sampler, vert_in.t1.xw);
|
||||
colorx -= B;
|
||||
colorx -= image.Sample(def_sampler, vert_in.t1.zw);
|
||||
colorx -= D;
|
||||
colorx -= F;
|
||||
colorx -= image.Sample(def_sampler, vert_in.t3.xw);
|
||||
colorx -= H;
|
||||
colorx -= image.Sample(def_sampler, vert_in.t3.zw);
|
||||
|
||||
colorx = ((E!=F && E!=D) || (E!=B && E!=H)) ? saturate(E + colorx*sharpness) : E;
|
||||
|
||||
float4 yuv = colorx;
|
||||
yuv.xyz = clamp(yuv.xyz, color_range_min, color_range_max);
|
||||
return saturate(mul(float4(yuv.xyz, 1.0), color_matrix));
|
||||
}
|
||||
|
||||
technique Draw
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(vert_in);
|
||||
pixel_shader = PSDrawBare(vert_in);
|
||||
}
|
||||
}
|
||||
|
||||
technique DrawMatrix
|
||||
{
|
||||
pass
|
||||
{
|
||||
vertex_shader = VSDefault(vert_in);
|
||||
pixel_shader = PSDrawMatrix(vert_in);
|
||||
}
|
||||
}
|
||||
96
plugins/obs-filters/gain-filter.c
Normal file
96
plugins/obs-filters/gain-filter.c
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
#include <obs-module.h>
|
||||
#include <media-io/audio-math.h>
|
||||
#include <math.h>
|
||||
|
||||
#define do_log(level, format, ...) \
|
||||
blog(level, "[gain filter: '%s'] " format, \
|
||||
obs_source_get_name(gf->context), ##__VA_ARGS__)
|
||||
|
||||
#define warn(format, ...) do_log(LOG_WARNING, format, ##__VA_ARGS__)
|
||||
#define info(format, ...) do_log(LOG_INFO, format, ##__VA_ARGS__)
|
||||
|
||||
#define S_GAIN_DB "db"
|
||||
|
||||
#define MT_ obs_module_text
|
||||
#define TEXT_GAIN_DB MT_("Gain.GainDB")
|
||||
|
||||
struct gain_data {
|
||||
obs_source_t *context;
|
||||
float multiple;
|
||||
};
|
||||
|
||||
static const char *gain_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("Gain");
|
||||
}
|
||||
|
||||
static void gain_destroy(void *data)
|
||||
{
|
||||
struct gain_data *gf = data;
|
||||
bfree(gf);
|
||||
}
|
||||
|
||||
static void gain_update(void *data, obs_data_t *s)
|
||||
{
|
||||
struct gain_data *gf = data;
|
||||
double val = obs_data_get_double(s, S_GAIN_DB);
|
||||
|
||||
gf->multiple = db_to_mul((float)val);
|
||||
}
|
||||
|
||||
static void *gain_create(obs_data_t *settings, obs_source_t *filter)
|
||||
{
|
||||
struct gain_data *gf = bzalloc(sizeof(*gf));
|
||||
gf->context = filter;
|
||||
gain_update(gf, settings);
|
||||
return gf;
|
||||
}
|
||||
|
||||
static struct obs_audio_data *gain_filter_audio(void *data,
|
||||
struct obs_audio_data *audio)
|
||||
{
|
||||
struct gain_data *gf = data;
|
||||
|
||||
float *adata[2] = {(float*)audio->data[0], (float*)audio->data[1]};
|
||||
const float multiple = gf->multiple;
|
||||
|
||||
for (size_t c = 0; c < 2; c++) {
|
||||
if (audio->data[c]) {
|
||||
for (size_t i = 0; i < audio->frames; i++) {
|
||||
adata[c][i] *= multiple;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return audio;
|
||||
}
|
||||
|
||||
static void gain_defaults(obs_data_t *s)
|
||||
{
|
||||
obs_data_set_default_double(s, S_GAIN_DB, 0.0f);
|
||||
}
|
||||
|
||||
static obs_properties_t *gain_properties(void *data)
|
||||
{
|
||||
obs_properties_t *ppts = obs_properties_create();
|
||||
|
||||
obs_properties_add_float_slider(ppts, S_GAIN_DB, TEXT_GAIN_DB,
|
||||
-30.0, 30.0, 0.1);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return ppts;
|
||||
}
|
||||
|
||||
struct obs_source_info gain_filter = {
|
||||
.id = "gain_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_AUDIO,
|
||||
.get_name = gain_name,
|
||||
.create = gain_create,
|
||||
.destroy = gain_destroy,
|
||||
.update = gain_update,
|
||||
.filter_audio = gain_filter_audio,
|
||||
.get_defaults = gain_defaults,
|
||||
.get_properties = gain_properties,
|
||||
};
|
||||
245
plugins/obs-filters/mask-filter.c
Normal file
245
plugins/obs-filters/mask-filter.c
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
#include <obs-module.h>
|
||||
#include <graphics/vec2.h>
|
||||
#include <graphics/vec4.h>
|
||||
#include <graphics/image-file.h>
|
||||
#include <util/dstr.h>
|
||||
|
||||
#define SETTING_TYPE "type"
|
||||
#define SETTING_IMAGE_PATH "image_path"
|
||||
#define SETTING_COLOR "color"
|
||||
#define SETTING_OPACITY "opacity"
|
||||
#define SETTING_STRETCH "stretch"
|
||||
|
||||
#define TEXT_TYPE obs_module_text("Type")
|
||||
#define TEXT_IMAGE_PATH obs_module_text("Path")
|
||||
#define TEXT_COLOR obs_module_text("Color")
|
||||
#define TEXT_OPACITY obs_module_text("Opacity")
|
||||
#define TEXT_STRETCH obs_module_text("StretchImage")
|
||||
#define TEXT_PATH_IMAGES obs_module_text("BrowsePath.Images")
|
||||
#define TEXT_PATH_ALL_FILES obs_module_text("BrowsePath.AllFiles")
|
||||
|
||||
struct mask_filter_data {
|
||||
uint64_t last_time;
|
||||
|
||||
obs_source_t *context;
|
||||
gs_effect_t *effect;
|
||||
|
||||
gs_texture_t *target;
|
||||
gs_image_file_t image;
|
||||
struct vec4 color;
|
||||
bool lock_aspect;
|
||||
};
|
||||
|
||||
static const char *mask_filter_get_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("MaskFilter");
|
||||
}
|
||||
|
||||
static void mask_filter_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct mask_filter_data *filter = data;
|
||||
|
||||
const char *path = obs_data_get_string(settings, SETTING_IMAGE_PATH);
|
||||
const char *effect_file = obs_data_get_string(settings, SETTING_TYPE);
|
||||
uint32_t color = (uint32_t)obs_data_get_int(settings, SETTING_COLOR);
|
||||
int opacity = (int)obs_data_get_int(settings, SETTING_OPACITY);
|
||||
char *effect_path;
|
||||
|
||||
color |= (uint32_t)(((double)opacity) * 2.55) << 24;
|
||||
|
||||
vec4_from_rgba(&filter->color, color);
|
||||
|
||||
obs_enter_graphics();
|
||||
gs_image_file_free(&filter->image);
|
||||
obs_leave_graphics();
|
||||
|
||||
gs_image_file_init(&filter->image, path);
|
||||
|
||||
obs_enter_graphics();
|
||||
|
||||
gs_image_file_init_texture(&filter->image);
|
||||
|
||||
filter->target = filter->image.texture;
|
||||
filter->lock_aspect = !obs_data_get_bool(settings, SETTING_STRETCH);
|
||||
|
||||
effect_path = obs_module_file(effect_file);
|
||||
gs_effect_destroy(filter->effect);
|
||||
filter->effect = gs_effect_create_from_file(effect_path, NULL);
|
||||
bfree(effect_path);
|
||||
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
static void mask_filter_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_string(settings, SETTING_TYPE,
|
||||
"mask_color_filter.effect");
|
||||
obs_data_set_default_int(settings, SETTING_COLOR, 0xFFFFFF);
|
||||
obs_data_set_default_int(settings, SETTING_OPACITY, 100);
|
||||
}
|
||||
|
||||
#define IMAGE_FILTER_EXTENSIONS \
|
||||
" (*.bmp *.jpg *.jpeg *.tga *.gif *.png)"
|
||||
|
||||
static obs_properties_t *mask_filter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
struct dstr filter_str = {0};
|
||||
obs_property_t *p;
|
||||
|
||||
dstr_copy(&filter_str, TEXT_PATH_IMAGES);
|
||||
dstr_cat(&filter_str, IMAGE_FILTER_EXTENSIONS ";;");
|
||||
dstr_cat(&filter_str, TEXT_PATH_ALL_FILES);
|
||||
dstr_cat(&filter_str, " (*.*)");
|
||||
|
||||
p = obs_properties_add_list(props, SETTING_TYPE, TEXT_TYPE,
|
||||
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
|
||||
|
||||
obs_property_list_add_string(p,
|
||||
obs_module_text("MaskBlendType.MaskColor"),
|
||||
"mask_color_filter.effect");
|
||||
obs_property_list_add_string(p,
|
||||
obs_module_text("MaskBlendType.MaskAlpha"),
|
||||
"mask_alpha_filter.effect");
|
||||
obs_property_list_add_string(p,
|
||||
obs_module_text("MaskBlendType.BlendMultiply"),
|
||||
"blend_mul_filter.effect");
|
||||
obs_property_list_add_string(p,
|
||||
obs_module_text("MaskBlendType.BlendAddition"),
|
||||
"blend_add_filter.effect");
|
||||
obs_property_list_add_string(p,
|
||||
obs_module_text("MaskBlendType.BlendSubtraction"),
|
||||
"blend_sub_filter.effect");
|
||||
|
||||
obs_properties_add_path(props, SETTING_IMAGE_PATH, TEXT_IMAGE_PATH,
|
||||
OBS_PATH_FILE, filter_str.array, NULL);
|
||||
obs_properties_add_color(props, SETTING_COLOR, TEXT_COLOR);
|
||||
obs_properties_add_int(props, SETTING_OPACITY, TEXT_OPACITY, 0, 100, 1);
|
||||
obs_properties_add_bool(props, SETTING_STRETCH, TEXT_STRETCH);
|
||||
|
||||
dstr_free(&filter_str);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void *mask_filter_create(obs_data_t *settings, obs_source_t *context)
|
||||
{
|
||||
struct mask_filter_data *filter =
|
||||
bzalloc(sizeof(struct mask_filter_data));
|
||||
filter->context = context;
|
||||
|
||||
obs_source_update(context, settings);
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void mask_filter_destroy(void *data)
|
||||
{
|
||||
struct mask_filter_data *filter = data;
|
||||
|
||||
obs_enter_graphics();
|
||||
gs_effect_destroy(filter->effect);
|
||||
gs_image_file_free(&filter->image);
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(filter);
|
||||
}
|
||||
|
||||
static void mask_filter_tick(void *data, float t)
|
||||
{
|
||||
struct mask_filter_data *filter = data;
|
||||
UNUSED_PARAMETER(t);
|
||||
|
||||
if (filter->image.is_animated_gif) {
|
||||
uint64_t cur_time = obs_get_video_frame_time();
|
||||
|
||||
if (!filter->last_time)
|
||||
filter->last_time = cur_time;
|
||||
|
||||
gs_image_file_tick(&filter->image, cur_time - filter->last_time);
|
||||
obs_enter_graphics();
|
||||
gs_image_file_update_texture(&filter->image);
|
||||
obs_leave_graphics();
|
||||
|
||||
filter->last_time = cur_time;
|
||||
}
|
||||
}
|
||||
|
||||
static void mask_filter_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct mask_filter_data *filter = data;
|
||||
obs_source_t *target = obs_filter_get_target(filter->context);
|
||||
gs_eparam_t *param;
|
||||
struct vec2 add_val = {0};
|
||||
struct vec2 mul_val = {1.0f, 1.0f};
|
||||
|
||||
if (!target || !filter->target || !filter->effect) {
|
||||
obs_source_skip_video_filter(filter->context);
|
||||
return;
|
||||
}
|
||||
|
||||
if (filter->lock_aspect) {
|
||||
struct vec2 source_size;
|
||||
struct vec2 mask_size;
|
||||
struct vec2 mask_temp;
|
||||
float source_aspect;
|
||||
float mask_aspect;
|
||||
bool size_to_x;
|
||||
float fix;
|
||||
|
||||
source_size.x = (float)obs_source_get_base_width(target);
|
||||
source_size.y = (float)obs_source_get_base_height(target);
|
||||
mask_size.x = (float)gs_texture_get_width(filter->target);
|
||||
mask_size.y = (float)gs_texture_get_height(filter->target);
|
||||
|
||||
source_aspect = source_size.x / source_size.y;
|
||||
mask_aspect = mask_size.x / mask_size.y;
|
||||
size_to_x = (source_aspect < mask_aspect);
|
||||
|
||||
fix = size_to_x ?
|
||||
(source_size.x / mask_size.x) :
|
||||
(source_size.y / mask_size.y);
|
||||
|
||||
vec2_mulf(&mask_size, &mask_size, fix);
|
||||
vec2_div(&mul_val, &source_size, &mask_size);
|
||||
vec2_mulf(&source_size, &source_size, 0.5f);
|
||||
vec2_mulf(&mask_temp, &mask_size, 0.5f);
|
||||
vec2_sub(&add_val, &source_size, &mask_temp);
|
||||
vec2_neg(&add_val, &add_val);
|
||||
vec2_div(&add_val, &add_val, &mask_size);
|
||||
}
|
||||
|
||||
obs_source_process_filter_begin(filter->context, GS_RGBA,
|
||||
OBS_ALLOW_DIRECT_RENDERING);
|
||||
|
||||
param = gs_effect_get_param_by_name(filter->effect, "target");
|
||||
gs_effect_set_texture(param, filter->target);
|
||||
|
||||
param = gs_effect_get_param_by_name(filter->effect, "color");
|
||||
gs_effect_set_vec4(param, &filter->color);
|
||||
|
||||
param = gs_effect_get_param_by_name(filter->effect, "mul_val");
|
||||
gs_effect_set_vec2(param, &mul_val);
|
||||
|
||||
param = gs_effect_get_param_by_name(filter->effect, "add_val");
|
||||
gs_effect_set_vec2(param, &add_val);
|
||||
|
||||
obs_source_process_filter_end(filter->context, filter->effect, 0, 0);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
struct obs_source_info mask_filter = {
|
||||
.id = "mask_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO,
|
||||
.get_name = mask_filter_get_name,
|
||||
.create = mask_filter_create,
|
||||
.destroy = mask_filter_destroy,
|
||||
.update = mask_filter_update,
|
||||
.get_defaults = mask_filter_defaults,
|
||||
.get_properties = mask_filter_properties,
|
||||
.video_tick = mask_filter_tick,
|
||||
.video_render = mask_filter_render
|
||||
};
|
||||
194
plugins/obs-filters/noise-gate-filter.c
Normal file
194
plugins/obs-filters/noise-gate-filter.c
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
#include <media-io/audio-math.h>
|
||||
#include <obs-module.h>
|
||||
#include <math.h>
|
||||
|
||||
#define do_log(level, format, ...) \
|
||||
blog(level, "[noise gate: '%s'] " format, \
|
||||
obs_source_get_name(ng->context), ##__VA_ARGS__)
|
||||
|
||||
#define warn(format, ...) do_log(LOG_WARNING, format, ##__VA_ARGS__)
|
||||
#define info(format, ...) do_log(LOG_INFO, format, ##__VA_ARGS__)
|
||||
|
||||
#define S_OPEN_THRESHOLD "open_threshold"
|
||||
#define S_CLOSE_THRESHOLD "close_threshold"
|
||||
#define S_ATTACK_TIME "attack_time"
|
||||
#define S_HOLD_TIME "hold_time"
|
||||
#define S_RELEASE_TIME "release_time"
|
||||
|
||||
#define MT_ obs_module_text
|
||||
#define TEXT_OPEN_THRESHOLD MT_("NoiseGate.OpenThreshold")
|
||||
#define TEXT_CLOSE_THRESHOLD MT_("NoiseGate.CloseThreshold")
|
||||
#define TEXT_ATTACK_TIME MT_("NoiseGate.AttackTime")
|
||||
#define TEXT_HOLD_TIME MT_("NoiseGate.HoldTime")
|
||||
#define TEXT_RELEASE_TIME MT_("NoiseGate.ReleaseTime")
|
||||
|
||||
struct noise_gate_data {
|
||||
obs_source_t *context;
|
||||
|
||||
float sample_rate_i;
|
||||
size_t channels;
|
||||
|
||||
float open_threshold;
|
||||
float close_threshold;
|
||||
float decay_rate;
|
||||
float attack_rate;
|
||||
float release_rate;
|
||||
float hold_time;
|
||||
|
||||
bool is_open;
|
||||
float attenuation;
|
||||
float level;
|
||||
float held_time;
|
||||
};
|
||||
|
||||
#define VOL_MIN -96.0f
|
||||
#define VOL_MAX 0.0f
|
||||
|
||||
static const char *noise_gate_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("NoiseGate");
|
||||
}
|
||||
|
||||
static void noise_gate_destroy(void *data)
|
||||
{
|
||||
struct noise_gate_data *ng = data;
|
||||
bfree(ng);
|
||||
}
|
||||
|
||||
static inline float ms_to_secf(int ms)
|
||||
{
|
||||
return (float)ms / 1000.0f;
|
||||
}
|
||||
|
||||
static void noise_gate_update(void *data, obs_data_t *s)
|
||||
{
|
||||
struct noise_gate_data *ng = data;
|
||||
float open_threshold_db;
|
||||
float close_threshold_db;
|
||||
float sample_rate;
|
||||
int attack_time_ms;
|
||||
int hold_time_ms;
|
||||
int release_time_ms;
|
||||
|
||||
open_threshold_db = (float)obs_data_get_double(s, S_OPEN_THRESHOLD);
|
||||
close_threshold_db = (float)obs_data_get_double(s, S_CLOSE_THRESHOLD);
|
||||
attack_time_ms = (int)obs_data_get_int(s, S_ATTACK_TIME);
|
||||
hold_time_ms = (int)obs_data_get_int(s, S_HOLD_TIME);
|
||||
release_time_ms = (int)obs_data_get_int(s, S_RELEASE_TIME);
|
||||
sample_rate = (float)audio_output_get_sample_rate(obs_get_audio());
|
||||
|
||||
ng->sample_rate_i = 1.0f / sample_rate;
|
||||
ng->channels = audio_output_get_channels(obs_get_audio());
|
||||
ng->open_threshold = db_to_mul(open_threshold_db);
|
||||
ng->close_threshold = db_to_mul(close_threshold_db);
|
||||
ng->attack_rate = 1.0f / (ms_to_secf(attack_time_ms) * sample_rate);
|
||||
ng->release_rate = 1.0f / (ms_to_secf(release_time_ms) * sample_rate);
|
||||
|
||||
const float threshold_diff = ng->open_threshold - ng->close_threshold;
|
||||
const float min_decay_period = (1.0f / 75.0f) * sample_rate;
|
||||
|
||||
ng->decay_rate = threshold_diff / min_decay_period;
|
||||
ng->hold_time = ms_to_secf(hold_time_ms);
|
||||
ng->is_open = false;
|
||||
ng->attenuation = 0.0f;
|
||||
ng->level = 0.0f;
|
||||
ng->held_time = 0.0f;
|
||||
}
|
||||
|
||||
static void *noise_gate_create(obs_data_t *settings, obs_source_t *filter)
|
||||
{
|
||||
struct noise_gate_data *ng = bzalloc(sizeof(*ng));
|
||||
ng->context = filter;
|
||||
noise_gate_update(ng, settings);
|
||||
return ng;
|
||||
}
|
||||
|
||||
static struct obs_audio_data *noise_gate_filter_audio(void *data,
|
||||
struct obs_audio_data *audio)
|
||||
{
|
||||
struct noise_gate_data *ng = data;
|
||||
|
||||
float *adata[2] = {(float*)audio->data[0], (float*)audio->data[1]};
|
||||
const float close_threshold = ng->close_threshold;
|
||||
const float open_threshold = ng->open_threshold;
|
||||
const float sample_rate_i = ng->sample_rate_i;
|
||||
const float release_rate = ng->release_rate;
|
||||
const float attack_rate = ng->attack_rate;
|
||||
const float decay_rate = ng->decay_rate;
|
||||
const float hold_time = ng->hold_time;
|
||||
const size_t channels = ng->channels;
|
||||
|
||||
for (size_t i = 0; i < audio->frames; i++) {
|
||||
float cur_level = (channels == 2)
|
||||
? fmaxf(fabsf(adata[0][i]), fabsf(adata[1][i]))
|
||||
: fabsf(adata[0][i]);
|
||||
|
||||
if (cur_level > open_threshold && !ng->is_open) {
|
||||
ng->is_open = true;
|
||||
}
|
||||
if (ng->level < close_threshold && ng->is_open) {
|
||||
ng->held_time = 0.0f;
|
||||
ng->is_open = false;
|
||||
}
|
||||
|
||||
ng->level = fmaxf(ng->level, cur_level) - decay_rate;
|
||||
|
||||
if (ng->is_open) {
|
||||
ng->attenuation = fminf(1.0f,
|
||||
ng->attenuation + attack_rate);
|
||||
} else {
|
||||
ng->held_time += sample_rate_i;
|
||||
if (ng->held_time > hold_time) {
|
||||
ng->attenuation = fmaxf(0.0f,
|
||||
ng->attenuation - release_rate);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t c = 0; c < channels; c++)
|
||||
adata[c][i] *= ng->attenuation;
|
||||
}
|
||||
|
||||
return audio;
|
||||
}
|
||||
|
||||
static void noise_gate_defaults(obs_data_t *s)
|
||||
{
|
||||
obs_data_set_default_double(s, S_OPEN_THRESHOLD, -26.0f);
|
||||
obs_data_set_default_double(s, S_CLOSE_THRESHOLD, -32.0f);
|
||||
obs_data_set_default_int (s, S_ATTACK_TIME, 25);
|
||||
obs_data_set_default_int (s, S_HOLD_TIME, 200);
|
||||
obs_data_set_default_int (s, S_RELEASE_TIME, 150);
|
||||
}
|
||||
|
||||
static obs_properties_t *noise_gate_properties(void *data)
|
||||
{
|
||||
obs_properties_t *ppts = obs_properties_create();
|
||||
|
||||
obs_properties_add_float_slider(ppts, S_CLOSE_THRESHOLD,
|
||||
TEXT_CLOSE_THRESHOLD, VOL_MIN, VOL_MAX, 1.0f);
|
||||
obs_properties_add_float_slider(ppts, S_OPEN_THRESHOLD,
|
||||
TEXT_OPEN_THRESHOLD, VOL_MIN, VOL_MAX, 1.0f);
|
||||
obs_properties_add_int(ppts, S_ATTACK_TIME, TEXT_ATTACK_TIME,
|
||||
0, 10000, 1);
|
||||
obs_properties_add_int(ppts, S_HOLD_TIME, TEXT_HOLD_TIME,
|
||||
0, 10000, 1);
|
||||
obs_properties_add_int(ppts, S_RELEASE_TIME, TEXT_RELEASE_TIME,
|
||||
0, 10000, 1);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return ppts;
|
||||
}
|
||||
|
||||
struct obs_source_info noise_gate_filter = {
|
||||
.id = "noise_gate_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_AUDIO,
|
||||
.get_name = noise_gate_name,
|
||||
.create = noise_gate_create,
|
||||
.destroy = noise_gate_destroy,
|
||||
.update = noise_gate_update,
|
||||
.filter_audio = noise_gate_filter_audio,
|
||||
.get_defaults = noise_gate_defaults,
|
||||
.get_properties = noise_gate_properties,
|
||||
};
|
||||
31
plugins/obs-filters/obs-filters.c
Normal file
31
plugins/obs-filters/obs-filters.c
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include <obs-module.h>
|
||||
|
||||
OBS_DECLARE_MODULE()
|
||||
|
||||
OBS_MODULE_USE_DEFAULT_LOCALE("obs-filters", "en-US")
|
||||
|
||||
extern struct obs_source_info mask_filter;
|
||||
extern struct obs_source_info crop_filter;
|
||||
extern struct obs_source_info gain_filter;
|
||||
extern struct obs_source_info color_filter;
|
||||
extern struct obs_source_info scroll_filter;
|
||||
extern struct obs_source_info color_key_filter;
|
||||
extern struct obs_source_info sharpness_filter;
|
||||
extern struct obs_source_info chroma_key_filter;
|
||||
extern struct obs_source_info async_delay_filter;
|
||||
extern struct obs_source_info noise_gate_filter;
|
||||
|
||||
bool obs_module_load(void)
|
||||
{
|
||||
obs_register_source(&mask_filter);
|
||||
obs_register_source(&crop_filter);
|
||||
obs_register_source(&gain_filter);
|
||||
obs_register_source(&color_filter);
|
||||
obs_register_source(&scroll_filter);
|
||||
obs_register_source(&color_key_filter);
|
||||
obs_register_source(&sharpness_filter);
|
||||
obs_register_source(&chroma_key_filter);
|
||||
obs_register_source(&async_delay_filter);
|
||||
obs_register_source(&noise_gate_filter);
|
||||
return true;
|
||||
}
|
||||
224
plugins/obs-filters/scroll-filter.c
Normal file
224
plugins/obs-filters/scroll-filter.c
Normal file
|
|
@ -0,0 +1,224 @@
|
|||
#include <obs-module.h>
|
||||
#include <graphics/vec2.h>
|
||||
|
||||
struct scroll_filter_data {
|
||||
obs_source_t *context;
|
||||
|
||||
gs_effect_t *effect;
|
||||
gs_eparam_t *param_add;
|
||||
gs_eparam_t *param_mul;
|
||||
|
||||
struct vec2 scroll_speed;
|
||||
bool limit_cx;
|
||||
bool limit_cy;
|
||||
uint32_t cx;
|
||||
uint32_t cy;
|
||||
|
||||
struct vec2 size_i;
|
||||
struct vec2 offset;
|
||||
};
|
||||
|
||||
static const char *scroll_filter_get_name(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("ScrollFilter");
|
||||
}
|
||||
|
||||
static void *scroll_filter_create(obs_data_t *settings, obs_source_t *context)
|
||||
{
|
||||
struct scroll_filter_data *filter = bzalloc(sizeof(*filter));
|
||||
char *effect_path = obs_module_file("crop_filter.effect");
|
||||
|
||||
filter->context = context;
|
||||
|
||||
obs_enter_graphics();
|
||||
filter->effect = gs_effect_create_from_file(effect_path, NULL);
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(effect_path);
|
||||
|
||||
if (!filter->effect) {
|
||||
bfree(filter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
filter->param_add = gs_effect_get_param_by_name(filter->effect,
|
||||
"add_val");
|
||||
filter->param_mul = gs_effect_get_param_by_name(filter->effect,
|
||||
"mul_val");
|
||||
|
||||
obs_source_update(context, settings);
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void scroll_filter_destroy(void *data)
|
||||
{
|
||||
struct scroll_filter_data *filter = data;
|
||||
|
||||
obs_enter_graphics();
|
||||
gs_effect_destroy(filter->effect);
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(filter);
|
||||
}
|
||||
|
||||
static void scroll_filter_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct scroll_filter_data *filter = data;
|
||||
|
||||
filter->limit_cx = obs_data_get_bool(settings, "limit_cx");
|
||||
filter->limit_cy = obs_data_get_bool(settings, "limit_cy");
|
||||
filter->cx = (uint32_t)obs_data_get_int(settings, "cx");
|
||||
filter->cy = (uint32_t)obs_data_get_int(settings, "cy");
|
||||
|
||||
filter->scroll_speed.x = (float)obs_data_get_double(settings,
|
||||
"speed_x");
|
||||
filter->scroll_speed.y = (float)obs_data_get_double(settings,
|
||||
"speed_y");
|
||||
|
||||
if (filter->scroll_speed.x == 0.0f)
|
||||
filter->offset.x = 0.0f;
|
||||
if (filter->scroll_speed.y == 0.0f)
|
||||
filter->offset.y = 0.0f;
|
||||
}
|
||||
|
||||
static bool limit_cx_clicked(obs_properties_t *props, obs_property_t *p,
|
||||
obs_data_t *settings)
|
||||
{
|
||||
bool limit_size = obs_data_get_bool(settings, "limit_cx");
|
||||
obs_property_set_visible(obs_properties_get(props, "cx"), limit_size);
|
||||
|
||||
UNUSED_PARAMETER(p);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool limit_cy_clicked(obs_properties_t *props, obs_property_t *p,
|
||||
obs_data_t *settings)
|
||||
{
|
||||
bool limit_size = obs_data_get_bool(settings, "limit_cy");
|
||||
obs_property_set_visible(obs_properties_get(props, "cy"), limit_size);
|
||||
|
||||
UNUSED_PARAMETER(p);
|
||||
return true;
|
||||
}
|
||||
|
||||
static obs_properties_t *scroll_filter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
obs_property_t *p;
|
||||
|
||||
obs_properties_add_float_slider(props, "speed_x",
|
||||
obs_module_text("ScrollFilter.SpeedX"),
|
||||
-500.0f, 500.0f, 1.0f);
|
||||
obs_properties_add_float_slider(props, "speed_y",
|
||||
obs_module_text("ScrollFilter.SpeedY"),
|
||||
-500.0f, 500.0f, 1.0f);
|
||||
|
||||
p = obs_properties_add_bool(props, "limit_cx",
|
||||
obs_module_text("ScrollFilter.LimitWidth"));
|
||||
obs_property_set_modified_callback(p, limit_cx_clicked);
|
||||
obs_properties_add_int(props, "cx",
|
||||
obs_module_text("Crop.Width"), 1, 8192, 1);
|
||||
|
||||
p = obs_properties_add_bool(props, "limit_cy",
|
||||
obs_module_text("ScrollFilter.LimitHeight"));
|
||||
obs_property_set_modified_callback(p, limit_cy_clicked);
|
||||
obs_properties_add_int(props, "cy",
|
||||
obs_module_text("Crop.Height"), 1, 8192, 1);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void scroll_filter_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_bool(settings, "limit_size", false);
|
||||
obs_data_set_default_int(settings, "cx", 100);
|
||||
obs_data_set_default_int(settings, "cy", 100);
|
||||
}
|
||||
|
||||
static void scroll_filter_tick(void *data, float seconds)
|
||||
{
|
||||
struct scroll_filter_data *filter = data;
|
||||
|
||||
filter->offset.x += filter->size_i.x * filter->scroll_speed.x * seconds;
|
||||
filter->offset.y += filter->size_i.y * filter->scroll_speed.y * seconds;
|
||||
|
||||
if (filter->offset.x > 1.0f)
|
||||
filter->offset.x -= 1.0f;
|
||||
if (filter->offset.y > 1.0f)
|
||||
filter->offset.y -= 1.0f;
|
||||
}
|
||||
|
||||
static void scroll_filter_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct scroll_filter_data *filter = data;
|
||||
struct vec2 mul_val;
|
||||
uint32_t base_cx;
|
||||
uint32_t base_cy;
|
||||
uint32_t cx;
|
||||
uint32_t cy;
|
||||
|
||||
obs_source_t *target = obs_filter_get_target(filter->context);
|
||||
base_cx = obs_source_get_base_width(target);
|
||||
base_cy = obs_source_get_base_height(target);
|
||||
|
||||
cx = filter->limit_cx ? filter->cx : base_cx;
|
||||
cy = filter->limit_cy ? filter->cy : base_cy;
|
||||
|
||||
if (cx && cy) {
|
||||
vec2_set(&filter->size_i,
|
||||
1.0f / (float)base_cx,
|
||||
1.0f / (float)base_cy);
|
||||
} else {
|
||||
vec2_zero(&filter->size_i);
|
||||
}
|
||||
|
||||
vec2_set(&mul_val,
|
||||
(float)cx / (float)base_cx,
|
||||
(float)cy / (float)base_cy);
|
||||
|
||||
obs_source_process_filter_begin(filter->context, GS_RGBA,
|
||||
OBS_NO_DIRECT_RENDERING);
|
||||
|
||||
gs_effect_set_vec2(filter->param_add, &filter->offset);
|
||||
gs_effect_set_vec2(filter->param_mul, &mul_val);
|
||||
|
||||
obs_source_process_filter_end(filter->context, filter->effect, cx, cy);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
static uint32_t scroll_filter_width(void *data)
|
||||
{
|
||||
struct scroll_filter_data *filter = data;
|
||||
obs_source_t *target = obs_filter_get_target(filter->context);
|
||||
|
||||
return filter->limit_cx ?
|
||||
filter->cx : obs_source_get_base_width(target);
|
||||
}
|
||||
|
||||
static uint32_t scroll_filter_height(void *data)
|
||||
{
|
||||
struct scroll_filter_data *filter = data;
|
||||
obs_source_t *target = obs_filter_get_target(filter->context);
|
||||
|
||||
return filter->limit_cy ?
|
||||
filter->cy : obs_source_get_base_height(target);
|
||||
}
|
||||
|
||||
struct obs_source_info scroll_filter = {
|
||||
.id = "scroll_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO,
|
||||
.get_name = scroll_filter_get_name,
|
||||
.create = scroll_filter_create,
|
||||
.destroy = scroll_filter_destroy,
|
||||
.update = scroll_filter_update,
|
||||
.get_properties = scroll_filter_properties,
|
||||
.get_defaults = scroll_filter_defaults,
|
||||
.video_tick = scroll_filter_tick,
|
||||
.video_render = scroll_filter_render,
|
||||
.get_width = scroll_filter_width,
|
||||
.get_height = scroll_filter_height
|
||||
};
|
||||
127
plugins/obs-filters/sharpness-filter.c
Normal file
127
plugins/obs-filters/sharpness-filter.c
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
#include <obs-module.h>
|
||||
#include <obs-source.h>
|
||||
#include <obs.h>
|
||||
#include <util/platform.h>
|
||||
|
||||
struct sharpness_data {
|
||||
obs_source_t *context;
|
||||
|
||||
gs_effect_t *effect;
|
||||
gs_eparam_t *sharpness_param;
|
||||
gs_eparam_t *texture_width, *texture_height;
|
||||
|
||||
float sharpness;
|
||||
float texwidth, texheight;
|
||||
};
|
||||
|
||||
static const char *sharpness_getname(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("SharpnessFilter");
|
||||
}
|
||||
|
||||
static void sharpness_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct sharpness_data *filter = data;
|
||||
double sharpness = obs_data_get_double(settings, "sharpness");
|
||||
|
||||
filter->sharpness = (float)sharpness;
|
||||
}
|
||||
|
||||
static void sharpness_destroy(void *data)
|
||||
{
|
||||
struct sharpness_data *filter = data;
|
||||
|
||||
if (filter->effect) {
|
||||
obs_enter_graphics();
|
||||
gs_effect_destroy(filter->effect);
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
bfree(data);
|
||||
}
|
||||
|
||||
static void *sharpness_create(obs_data_t *settings, obs_source_t *context)
|
||||
{
|
||||
struct sharpness_data *filter =
|
||||
bzalloc(sizeof(struct sharpness_data));
|
||||
char *effect_path = obs_module_file("sharpness.effect");
|
||||
|
||||
filter->context = context;
|
||||
|
||||
obs_enter_graphics();
|
||||
|
||||
filter->effect = gs_effect_create_from_file(effect_path, NULL);
|
||||
if (filter->effect) {
|
||||
filter->sharpness_param = gs_effect_get_param_by_name(
|
||||
filter->effect, "sharpness");
|
||||
filter->texture_width = gs_effect_get_param_by_name(
|
||||
filter->effect, "texture_width");
|
||||
filter->texture_height = gs_effect_get_param_by_name(
|
||||
filter->effect, "texture_height");
|
||||
}
|
||||
|
||||
obs_leave_graphics();
|
||||
|
||||
bfree(effect_path);
|
||||
|
||||
if (!filter->effect) {
|
||||
sharpness_destroy(filter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sharpness_update(filter, settings);
|
||||
return filter;
|
||||
}
|
||||
|
||||
static void sharpness_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct sharpness_data *filter = data;
|
||||
if (!filter) return;
|
||||
if (!obs_filter_get_target(filter->context)) return;
|
||||
|
||||
obs_source_process_filter_begin(filter->context, GS_RGBA,
|
||||
OBS_ALLOW_DIRECT_RENDERING);
|
||||
|
||||
filter->texwidth =(float)obs_source_get_width(
|
||||
obs_filter_get_target(filter->context));
|
||||
filter->texheight = (float)obs_source_get_height(
|
||||
obs_filter_get_target(filter->context));
|
||||
|
||||
gs_effect_set_float(filter->sharpness_param, filter->sharpness);
|
||||
gs_effect_set_float(filter->texture_width, filter->texwidth);
|
||||
gs_effect_set_float(filter->texture_height, filter->texheight);
|
||||
|
||||
obs_source_process_filter_end(filter->context, filter->effect, 0, 0);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
static obs_properties_t *sharpness_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_properties_add_float_slider(props, "sharpness",
|
||||
"Sharpness", 0.0f, 1.0f, 0.01f);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
}
|
||||
|
||||
static void sharpness_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_double(settings, "sharpness", 0.08);
|
||||
}
|
||||
|
||||
struct obs_source_info sharpness_filter = {
|
||||
.id = "sharpness_filter",
|
||||
.type = OBS_SOURCE_TYPE_FILTER,
|
||||
.output_flags = OBS_SOURCE_VIDEO,
|
||||
.get_name = sharpness_getname,
|
||||
.create = sharpness_create,
|
||||
.destroy = sharpness_destroy,
|
||||
.update = sharpness_update,
|
||||
.video_render = sharpness_render,
|
||||
.get_properties = sharpness_properties,
|
||||
.get_defaults = sharpness_defaults
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue