Ejemplo n.º 1
0
int _720to480Main::process_loop(VFrame *output)
{
	int result = 0;

	if(!temp)
		temp = new VFrame(0,
			-1,
			output->get_w(),
			output->get_h(),
			output->get_color_model(),
			-1);

	if(config.direction == FORWARD)
	{
// Step 1: Reduce vertically and put in desired fields of output
		read_frame(temp, input_position);
		reduce_field(output, temp, config.first_field == 0 ? 0 : 1);
		input_position++;

		read_frame(temp, input_position);
		reduce_field(output, temp, config.first_field == 0 ? 1 : 0);
		input_position++;
	}

	if(PluginClient::interactive) 
		result = progress->update(input_position - PluginClient::start);

	if(input_position >= PluginClient::end) result = 1;

	return result;
}
Ejemplo n.º 2
0
int _1080to540Main::process_realtime(VFrame *input, VFrame *output)
{
	load_configuration();
	if(!temp)
	{
		temp = new VFrame(0,
			-1,
			input->get_w(),
			input->get_h(),
			input->get_color_model(),
			-1);
		temp->clear_frame();
	}

	reduce_field(temp, input, config.first_field == 0 ? 0 : 1, 0);
	reduce_field(temp, input, config.first_field == 0 ? 1 : 0, 1);
	
	output->copy_from(temp);

	return 0;
}