void CLASS wavelet_denoise()
{
float *fimg=0, *temp, thold, mul[2], avg, diff;
- int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2];
+ int scale=1, size, lev, hpass, lpass=0, row, col, nc, c, i, wlast, blk[2];
ushort *window[4];
static const float noise[] =
{ 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 };
if( !ret && table >= CHANLIST_SIZE ) ret = 1;
struct dvb_frontend_parameters frontend_param;
+#if 1
+ if( !ret ) {
+ uint32_t frequency = chanlists[table].list[index].freq * 1000;
+ class dtv_props : public ArrayList<dtv_property> {
+ public:
+ void add(int c, int d) {
+ dtv_property &p = append();
+ memset(&p, 0, sizeof(p));
+ p.cmd = c; p.u.data = d;
+ }
+ } props;
+
+ switch( table ) {
+ case NTSC_DVB:
+ case NTSC_BCAST:
+ case NTSC_HRC:
+ case NTSC_BCAST_JP:
+ props.add(DTV_DELIVERY_SYSTEM, SYS_ATSC);
+ props.add(DTV_FREQUENCY, frequency);
+ props.add(DTV_INVERSION, INVERSION_AUTO);
+ props.add(DTV_MODULATION, VSB_8);
+// frontend_param.u.vsb.modulation = VSB_8;
+ break;
+ case PAL_EUROPE:
+ case PAL_E_EUROPE:
+ case PAL_ITALY:
+ case PAL_NEWZEALAND:
+ case PAL_AUSTRALIA:
+ case PAL_IRELAND:
+ case CATV_DVB:
+ case NTSC_CABLE:
+ case NTSC_CABLE_JP:
+// props.add(DTV_DELIVERY_SYSTEM, SYS_DVBT);
+// if( t->delsys == SYS_DVBT2 ) { props.add(DTV_STREAM_ID, 0 /* id */); }
+ props.add(DTV_FREQUENCY, frequency /* 174.00MHz ... 862.00MHz */);
+// props.add(DTV_INVERSION, INVERSION_AUTO);
+ props.add(DTV_BANDWIDTH_HZ, 6000000 /* 6/7/8 Mhz */);
+ props.add(DTV_CODE_RATE_HP, FEC_AUTO);
+ props.add(DTV_CODE_RATE_LP, FEC_AUTO);
+ props.add(DTV_MODULATION, QAM_AUTO);
+ props.add(DTV_TRANSMISSION_MODE, TRANSMISSION_MODE_AUTO);
+ props.add(DTV_GUARD_INTERVAL, GUARD_INTERVAL_AUTO);
+ props.add(DTV_HIERARCHY, HIERARCHY_AUTO);
+// frontend_param.u.qam.modulation = QAM_AUTO;
+ break;
+ default:
+ fprintf(stderr,
+ "DeviceDVBInput::dvb_open bad table index=%d\n", table);
+ ret = 2;
+ break;
+ }
+ struct dtv_properties dtv_props;
+ memset(&dtv_props, 0, sizeof(dtv_props));
+ props.add(DTV_TUNE, 0);
+ dtv_props.num = props.size();
+ dtv_props.props = &props[0];
+ if( ioctl(frontend_fd, FE_SET_PROPERTY, &dtv_props) < 0 ) {
+ fprintf(stderr,
+ "DeviceDVBInput::dvb_open FE_SET_PROPERY frequency=%d: %s\n",
+ frequency, strerror(errno));
+ ret = 2;
+ }
+ }
+
+#else
+// older version
+ if( !ret && ioctl(frontend_fd, FE_SET_FRONTEND, &frontend_param) < 0 ) {
+ fprintf(stderr,
+ "DeviceDVBInput::dvb_open FE_SET_FRONTEND frequency=%d: %s\n",
+ frontend_param.frequency, strerror(errno));
+ ret = 2;
+ }
+
if( !ret ) {
uint32_t frequency = chanlists[table].list[index].freq * 1000;
if( frequency < fe_info.frequency_min ||
frontend_param.frequency, strerror(errno));
ret = 2;
}
+#endif
if( !ret && wait_signal(333,3) ) {
fprintf(stderr,
case MOVE_RIPPLE:
edits_moved = rest_moved = 1;
startsource += cut_length;
- length -= cut_length;
+ cut_length = -cut_length;
+ length += cut_length;
for( Edit *edit=next; edit; edit=edit->next )
- edit->startproject -= cut_length;
+ edit->startproject += cut_length;
break;
case MOVE_ROLL:
if( prev ) prev->trim(cut_length);
}
if( edit_plugins ) {
if( cut_length > 0 ) {
- track->clear(end, end+cut_length, 0, 0, 1, 0, 0);
+ track->clear(end, end+cut_length, 0, 0, -1, 0, 0);
track->shift_effects(start, cut_length, 1, 0);
}
else if( cut_length < 0 ) {
- track->clear(start+cut_length, start, 0, 0, 1, 0, 0);
+ track->clear(start+cut_length, start, 0, 0, -1, 0, 0);
track->shift_effects(end+cut_length, -cut_length, 1, 0);
}
}
0x0b33, 0x0030 },
{ "/dev/input/by-id/usb-Contour_Design_ShuttlePro-event-if00",
0x0b33, 0x0030 },
+ { "/dev/input/by-id/usb-Contour_Design_ShuttlePRO_v2-event-joystick",
+ 0x0b33, 0x0030 },
};
#ifdef HAVE_SHUTTLE_USB
if( edit_autos )
automation->clear(start, end, 0, 1);
if( edit_plugins ) {
+ int edit_keyframes = edit_plugins < 0 ? 1 : edit_autos;
for(int i = 0; i < plugin_set.total; i++) {
if(!trim_edits || trim_edits == (Edits*)plugin_set.values[i])
- plugin_set.values[i]->clear(start, end, edit_autos);
+ plugin_set.values[i]->clear(start, end, edit_keyframes);
}
}
if( edit_edits )
0, 0, 1, 0, 1)
{
this->filebox = filebox;
+ set_tooltip(_("Recent paths"));
}
int BC_FileBoxRecent::handle_event()
BC_FileBoxTextBox::BC_FileBoxTextBox(int x, int y, BC_FileBox *filebox)
- : BC_TextBox(x, y, filebox->get_w() - 20, 1,
+ : BC_TextBox(x, y, filebox->get_w() - x - 20, 1,
filebox->want_directory ? filebox->directory : filebox->filename)
{
this->filebox = filebox;
}
-BC_FileBoxDirectoryText::BC_FileBoxDirectoryText(int x, int y, BC_FileBox *filebox)
- : BC_TextBox(x, y, filebox->get_w() - 40, 1, filebox->fs->get_current_dir())
+BC_FileBoxDirectoryText::BC_FileBoxDirectoryText(int x, int y, int w, BC_FileBox *filebox)
+ : BC_TextBox(x, y, w, 1, filebox->fs->get_current_dir())
{
this->filebox = filebox;
}
y += directory_title_margin + 3;
add_subwindow(recent_popup = new BC_FileBoxRecent(this, x, y));
- add_subwindow(directory_title = new BC_FileBoxDirectoryText(x, y, this));
- directory_title->reposition_window(x, y, get_w() - recent_popup->get_w() - 20, 1);
- x += directory_title->get_w() + 8;
- recent_popup->reposition_window(x, y, directory_title->get_w(), 200);
+ BC_Title *dir_title;
+ add_subwindow(dir_title = new BC_Title(x, y, _("Directory:")));
+ int x1 = x + dir_title->get_w() + 10, w1 = get_w()-x1 - recent_popup->get_w()-20;
+ add_subwindow(directory_title = new BC_FileBoxDirectoryText(x1, y, w1, this));
+ x1 += directory_title->get_w() + 8;
+ recent_popup->reposition_window(x1, y, directory_title->get_w(), 200);
x = 10;
y += directory_title->get_h() + 5;
listbox = 0;
create_listbox(x, y, get_display_mode());
y += listbox->get_h() + 10;
- add_subwindow(textbox = new BC_FileBoxTextBox(x, y, this));
+ add_subwindow(file_title = new BC_Title(x, y, _("File:")));
+ x1 = x + file_title->get_w() + 10;
+ add_subwindow(textbox = new BC_FileBoxTextBox(x1, y, this));
y += textbox->get_h() + 10;
if(!want_directory) {
w - (get_w() - filter_text->get_w()),
1);
directory_title->reposition_window(
- directory_title->get_x(),
- directory_title->get_y(),
- get_w() - recent_popup->get_w() - 20,
- 1);
+ directory_title->get_x(), directory_title->get_y(),
+ get_w()-directory_title->get_x() - recent_popup->get_w()-20, 1);
recent_popup->reposition_window(
directory_title->get_x() + directory_title->get_w() + 8,
directory_title->get_y(),
search_text->get_y(),
get_w() - search_text->get_x() - 40,
1);
+ file_title->reposition_window(file_title->get_x(),
+ h - (get_h() - file_title->get_y()));
textbox->reposition_window(textbox->get_x(),
h - (get_h() - textbox->get_y()),
w - (get_w() - textbox->get_w()),
class BC_FileBoxDirectoryText : public BC_TextBox
{
public:
- BC_FileBoxDirectoryText(int x, int y, BC_FileBox *filebox);
+ BC_FileBoxDirectoryText(int x, int y, int w, BC_FileBox *filebox);
int handle_event();
BC_FileBox *filebox;
};
BC_Pixmap *icons[TOTAL_ICONS];
BC_FileBoxRecent *recent_popup;
+ BC_Title *file_title;
BC_FileBoxTextBox *textbox;
BC_FileBoxListBox *listbox;
BC_Title *filter_title;