#include "bccmodels.h"
+#include "file.h"
#include "filexml.h"
#include "rgb601.h"
#include "rgb601window.h"
{
char directory[1024], string[1024];
// set the default directory
- sprintf(directory, "%srgb601.rc", BCASTDIR);
+ sprintf(directory, "%s/rgb601.rc", File::get_config_path());
// load the defaults
defaults = new Defaults(directory);
output.tag.set_property("AUTOMATIC", config.automatic);
output.tag.set_property("AUTO_THRESHOLD", config.auto_threshold);
output.append_tag();
+ output.tag.set_title("/RGB601");
+ output.append_tag();
output.terminate_string();
}
// average = -1;
// }
- if(thread)
+ if(thread)
{
thread->window->frame_offset->update((long)config.frame_offset);
thread->window->first_field->update(config.first_field);
{
case BC_RGB888:
case BC_YUV888:
- COMPARE_ROWS(result,
- frame1->get_rows()[row],
- frame2->get_rows()[row],
- unsigned char,
- frame1->get_w(),
+ COMPARE_ROWS(result,
+ frame1->get_rows()[row],
+ frame2->get_rows()[row],
+ unsigned char,
+ frame1->get_w(),
3);
break;
case BC_RGBA8888:
case BC_YUVA8888:
- COMPARE_ROWS(result,
- frame1->get_rows()[row],
- frame2->get_rows()[row],
- unsigned char,
+ COMPARE_ROWS(result,
+ frame1->get_rows()[row],
+ frame2->get_rows()[row],
+ unsigned char,
frame1->get_w(),
4);
break;
case BC_RGB161616:
case BC_YUV161616:
- COMPARE_ROWS(result,
- frame1->get_rows()[row],
- frame2->get_rows()[row],
- u_int16_t,
+ COMPARE_ROWS(result,
+ frame1->get_rows()[row],
+ frame2->get_rows()[row],
+ u_int16_t,
frame1->get_w(),
3);
break;
-
+
case BC_RGBA16161616:
case BC_YUVA16161616:
- COMPARE_ROWS(result,
- frame1->get_rows()[row],
- frame2->get_rows()[row],
- u_int16_t,
+ COMPARE_ROWS(result,
+ frame1->get_rows()[row],
+ frame2->get_rows()[row],
+ u_int16_t,
frame1->get_w(),
4);
break;
{
int64_t field1 = compare_fields(temp_frame[0], input_ptr, 0);
int64_t field2 = compare_fields(temp_frame[0], input_ptr, 1);
- int64_t threshold = (int64_t)(config.auto_threshold *
- input_ptr->get_w() *
+ int64_t threshold = (int64_t)(config.auto_threshold *
+ input_ptr->get_w() *
input_ptr->get_h());
// if(input_ptr->get_color_model() == BC_RGBA8888 ||
for(int i = 0; i < input_ptr->get_h(); i++)
{
if((i + new_field) & 1)
- memcpy(output_ptr->get_rows()[i],
+ memcpy(output_ptr->get_rows()[i],
input_ptr->get_rows()[i],
row_size);
else
state = 0;
// Compute new threshold for next time
- average = (int64_t)(average * total_average +
- field1 +
+ average = (int64_t)(average * total_average +
+ field1 +
field2) / (total_average + 2);
if(input_ptr->get_rows()[0] != output_ptr->get_rows()[0])
new_field = 1;
// Compute new threshold for next time
- average = (int64_t)(average * total_average +
+ average = (int64_t)(average * total_average +
field1) / (total_average + 1);
for(int i = 0; i < input_ptr->get_h(); i++)
{
if(i & 1)
- memcpy(output_ptr->get_rows()[i],
+ memcpy(output_ptr->get_rows()[i],
temp_frame[0]->get_rows()[i],
row_size);
else
new_field = 0;
// Compute new threshold for next time
- average = (int64_t)(average * total_average +
+ average = (int64_t)(average * total_average +
field2) / (total_average + 1);
for(int i = 0; i < input_ptr->get_h(); i++)
input_ptr->get_rows()[i],
row_size);
else
- memcpy(output_ptr->get_rows()[i],
+ memcpy(output_ptr->get_rows()[i],
temp_frame[0]->get_rows()[i],
row_size);
}
for(int i = 0; i < input_ptr->get_h(); i++)
{
if((i + config.first_field) & 1)
- memcpy(output_ptr->get_rows()[i],
+ memcpy(output_ptr->get_rows()[i],
input_ptr->get_rows()[i],
row_size);
else
- memcpy(output_ptr->get_rows()[i],
+ memcpy(output_ptr->get_rows()[i],
temp_frame[1]->get_rows()[i],
row_size);
}