delete threshold_engine;
}
-const char* ThresholdMain::plugin_title() { return _("Threshold"); }
+const char* ThresholdMain::plugin_title() { return N_("Threshold"); }
int ThresholdMain::is_realtime() { return 1; }
void ThresholdMain::save_data(KeyFrame *keyframe)
{
FileXML output;
- output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+ output.set_shared_output(keyframe->xbuf);
output.tag.set_title("THRESHOLD");
output.tag.set_property("MIN", config.min);
output.tag.set_property("MAX", config.max);
void ThresholdMain::read_data(KeyFrame *keyframe)
{
FileXML input;
- const char *data = keyframe->get_data();
- input.set_shared_input((char *)data, strlen(data));
+ input.set_shared_input(keyframe->xbuf);
int result = 0;
while(!result)
{
"uniform vec4 low_color;\n"
"uniform vec4 mid_color;\n"
"uniform vec4 high_color;\n"
- "uniform mat3 rgb_to_yuv_matrix;\n"
+ "uniform vec3 rgb_to_y_vector;\n"
"uniform float yminf;\n"
"void main()\n"
"{\n"
" vec4 pixel = texture2D(tex, gl_TexCoord[0].st);\n"
- " float v = dot(pixel.rgb, rgb_to_yuv_matrix[0]) + yminf;\n"
+ " float v = dot(pixel.rgb, rgb_to_y_vector) + yminf;\n"
" if(v < min)\n"
" pixel = low_color;\n"
" else if(v < max)\n"
(float)config.high_color.g / 0xff,
(float)config.high_color.b / 0xff,
has_alpha ? (float)config.high_color.a / 0xff : 1.0);
- BC_GL_RGB_TO_YUV(shader);
+ BC_GL_RGB_TO_Y(shader);
}
}