Update of /cvsroot/dirac/compress/util/encoder_gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27158 Modified Files: README diracdata.h diracgui.cpp diracgui.h encodebox.cpp filesbox.cpp repthread.cpp tables.h Removed Files: encoder_gui.pro Log Message: Included option in GUI to disable the creation of diagnostics data file and locally decoded output. dirac_encoder need no longer be in the current working directory but in any directory in the PATH variable. Index: repthread.cpp =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/repthread.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** repthread.cpp 7 Sep 2005 14:29:06 -0000 1.1 --- repthread.cpp 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 51,58 **** --- 51,60 ---- if (!isRunning()) { + fprintf (stderr, "Thread not running\n"); start(LowPriority); } else { + fprintf (stderr, "Thread Running\n"); restart = true; cond.wakeOne(); *************** *** 66,70 **** char buf[1000]; ! sprintf(cmd, "./dirac_encoder -width %d -height %d -fr %f -cformat %d -qf %d -cpd %d -xblen %d -yblen %d -xbsep %d -ybsep %d -start %ld -stop %ld -num_L1 %d -L1_sep %d %s %s", local_data.frame_width, local_data.frame_height, --- 68,72 ---- char buf[1000]; ! sprintf(cmd, "dirac_encoder -width %d -height %d -fr %f -cformat %d -qf %d -cpd %d -xblen %d -yblen %d -xbsep %d -ybsep %d -start %ld -stop %ld -num_L1 %d -L1_sep %d %s %s %s", local_data.frame_width, local_data.frame_height, *************** *** 81,84 **** --- 83,87 ---- local_data.num_l1, local_data.sep_l1, + local_data.local ? "-local" : "", local_data.fname_in, local_data.fname_out); *************** *** 93,106 **** while (fgets(buf, 100, op_ptr)) { ! if (restart) ! break; ! if (abort) ! break; ! ! QString qbuf = QString(buf); ! emit RepMessage(qbuf); ! fflush(stdout); ! fflush(op_ptr); } --- 96,109 ---- while (fgets(buf, 100, op_ptr)) { ! if (restart) ! break; ! if (abort) ! break; ! ! QString qbuf = QString(buf); ! emit RepMessage(qbuf); ! fflush(stdout); ! fflush(op_ptr); } Index: tables.h =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/tables.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tables.h 7 Sep 2005 14:29:06 -0000 1.1 --- tables.h 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 30,34 **** #define MIN_QUALITY 0 #define MAX_QUALITY 15 ! #define DEF_QUALITY 10 #define MIN_WIDTH 160 --- 30,34 ---- #define MIN_QUALITY 0 #define MAX_QUALITY 15 ! #define DEF_QUALITY 7 #define MIN_WIDTH 160 --- encoder_gui.pro DELETED --- Index: encodebox.cpp =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/encodebox.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** encodebox.cpp 7 Sep 2005 14:29:06 -0000 1.1 --- encodebox.cpp 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 43,47 **** encode_widget->setVisible(false); //encode_widget2->setVisible(true); ! QLabel *label1 = new QLabel(tr("Prefered viewing distance (CPD)")); QLabel *label2 = new QLabel(tr("Motion compensation block width (xblen)")); --- 43,47 ---- encode_widget->setVisible(false); //encode_widget2->setVisible(true); ! QLabel *label1 = new QLabel(tr("Prefered viewing distance (CPD)")); QLabel *label2 = new QLabel(tr("Motion compensation block width (xblen)")); *************** *** 139,156 **** { encode_widget->show(); ! //encode_widget2->show(); encode_more->setText(tr("Hide")); encodeGroupBox->setFixedHeight(390); ! reportGroupBox->setFixedHeight(30); ! report_widget->hide(); } else { encode_widget->hide(); ! //encode_widget2->show(); encode_more->setText(tr("Show")); encodeGroupBox->setFixedHeight(130); ! reportGroupBox->setFixedHeight(250); ! report_widget->show(); } } --- 139,156 ---- { encode_widget->show(); ! //encode_widget2->show(); encode_more->setText(tr("Hide")); encodeGroupBox->setFixedHeight(390); ! reportGroupBox->setFixedHeight(30); ! report_widget->hide(); } else { encode_widget->hide(); ! //encode_widget2->show(); encode_more->setText(tr("Show")); encodeGroupBox->setFixedHeight(130); ! reportGroupBox->setFixedHeight(250); ! report_widget->show(); } } Index: diracdata.h =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/diracdata.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** diracdata.h 7 Sep 2005 14:29:06 -0000 1.1 --- diracdata.h 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 42,45 **** --- 42,46 ---- char fname_in[1000]; char fname_out[1000]; + bool local; }; Index: README =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 7 Sep 2005 14:29:06 -0000 1.1 --- README 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 48,55 **** test_in.yuv ! WARNING!: at the moment the GUI calls up dirac_encoder only in the current ! directory, i.e. the directory from which the encoder was started up. ! ! This will change in future. LICENSING --- 48,52 ---- test_in.yuv ! WARNING!: The GUI calls up dirac_encoder by searching in the PATH variable. LICENSING Index: diracgui.h =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/diracgui.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** diracgui.h 7 Sep 2005 14:29:06 -0000 1.1 --- diracgui.h 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 46,49 **** --- 46,50 ---- #include <QListWidget> #include <QThread> + #include <QCheckBox> //#include "tables.h" *************** *** 84,87 **** --- 85,89 ---- QLabel *input_file_name; QLabel *output_file_name; + QCheckBox *local_output; QLabel *reportrun; Index: filesbox.cpp =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/filesbox.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** filesbox.cpp 7 Sep 2005 14:29:06 -0000 1.1 --- filesbox.cpp 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 44,48 **** output_file_name = new QLabel; output_file_name->setText("Output files: <I>Nothing</I>"); ! infile_valid = false; outfile_valid = false; --- 44,50 ---- output_file_name = new QLabel; output_file_name->setText("Output files: <I>Nothing</I>"); ! QLabel local_output_label; ! local_output = new QCheckBox; ! local_output->setText ("Locally Decoded Output"); infile_valid = false; outfile_valid = false; *************** *** 55,58 **** --- 57,61 ---- fileButtons->addWidget(input_file_name, 1, 0, 1, 2); fileButtons->addWidget(output_file_name, 3, 0, 1, 2); + fileButtons->addWidget(local_output, 4, 0); filesGroupBox->setLayout(fileButtons); *************** *** 66,69 **** --- 69,74 ---- connect(output_file_text, SIGNAL(returnPressed()), this, SLOT(textOutputFile())); + connect(local_output, SIGNAL(released()), + this, SLOT(textOutputFile())); } *************** *** 93,110 **** if (!fileName.isEmpty()) { ! input_file_text->setText(fileName); strcpy(dirac_data.fname_in, fileName.toAscii()); ! infile_valid = true; ! dot = checkExtn(dirac_data.fname_in, extn); ! ! if (strcmp(extn, ".yuv") == 0) ! { ! int i = strlen(dirac_data.fname_in); ! dirac_data.fname_in[i - 4] = 0; ! } ! sprintf(txt, "Input file: %s.yuv", basename(dirac_data.fname_in)); ! input_file_name->setText(txt); } else --- 98,115 ---- if (!fileName.isEmpty()) { ! input_file_text->setText(fileName); strcpy(dirac_data.fname_in, fileName.toAscii()); ! infile_valid = true; ! dot = checkExtn(dirac_data.fname_in, extn); ! ! if (strcmp(extn, ".yuv") == 0) ! { ! int i = strlen(dirac_data.fname_in); ! dirac_data.fname_in[i - 4] = 0; ! } ! sprintf(txt, "Input file: %s.yuv", basename(dirac_data.fname_in)); ! input_file_name->setText(txt); } else *************** *** 121,125 **** { QString fileName = QFileDialog::getSaveFileName(this, ! tr("Open File"), QDir::currentPath()); useOutputFile(fileName); } --- 126,130 ---- { QString fileName = QFileDialog::getSaveFileName(this, ! tr("Open File"), QDir::currentPath()); useOutputFile(fileName); } *************** *** 130,155 **** bool dot; char txt[500]; ! ! if (!fileName.isEmpty()) { ! output_file_text->setText(fileName); strcpy(dirac_data.fname_out, fileName.toAscii()); ! outfile_valid = true; ! ! dot = checkExtn(dirac_data.fname_out, extn); ! if (strcmp(extn, ".yuv") == 0 || ! strcmp(extn, ".drc") == 0 || ! strcmp(extn, ".imt") == 0) ! { ! int i = strlen(dirac_data.fname_out); ! dirac_data.fname_out[i - 4] = 0; ! } ! sprintf(txt, "Output files: %s.yuv, %s.drc, %s.imt", ! basename(dirac_data.fname_out), ! basename(dirac_data.fname_out), ! basename(dirac_data.fname_out)); ! output_file_name->setText(txt); } else { --- 135,172 ---- bool dot; char txt[500]; ! ! if (strcmp (fileName.toAscii(), "No file") == 0) ! return; ! ! if (!fileName.isEmpty() ) { ! output_file_text->setText(fileName); strcpy(dirac_data.fname_out, fileName.toAscii()); ! outfile_valid = true; ! ! dot = checkExtn(dirac_data.fname_out, extn); ! if (strcmp(extn, ".yuv") == 0 || ! strcmp(extn, ".drc") == 0 || ! strcmp(extn, ".imt") == 0) ! { ! int i = strlen(dirac_data.fname_out); ! dirac_data.fname_out[i - 4] = 0; ! } ! if (local_output->isChecked()) ! { ! dirac_data.local = true; ! sprintf(txt, "Output files: %s.yuv, %s.drc, %s.imt", ! basename(dirac_data.fname_out), ! basename(dirac_data.fname_out), ! basename(dirac_data.fname_out)); ! } ! else ! { ! dirac_data.local = false; ! sprintf(txt, "Output files: %s.drc", basename(dirac_data.fname_out)); ! } ! output_file_name->setText(txt); } else { Index: diracgui.cpp =================================================================== RCS file: /cvsroot/dirac/compress/util/encoder_gui/diracgui.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** diracgui.cpp 7 Sep 2005 14:29:06 -0000 1.1 --- diracgui.cpp 1 Dec 2005 14:02:43 -0000 1.2 *************** *** 44,48 **** createReportBox(); ! done = new QPushButton("Done"); done->setFont(QFont("Sans Serif", 12, QFont::Bold)); done->setEnabled(false); --- 44,48 ---- createReportBox(); ! done = new QPushButton("Encode"); done->setFont(QFont("Sans Serif", 12, QFont::Bold)); done->setEnabled(false); *************** *** 57,62 **** connect(done, SIGNAL(clicked()), this, SLOT(doneValues())); connect(reset, SIGNAL(clicked()), this, SLOT(setReset())); ! connect(help, SIGNAL(clicked()), this, SLOT(help())); ! QHBoxLayout *buttons = new QHBoxLayout; buttons->addWidget(done); --- 57,62 ---- connect(done, SIGNAL(clicked()), this, SLOT(doneValues())); connect(reset, SIGNAL(clicked()), this, SLOT(setReset())); ! connect(help, SIGNAL(clicked()), this, SLOT(help())); ! QHBoxLayout *buttons = new QHBoxLayout; buttons->addWidget(done); *************** *** 113,116 **** --- 113,118 ---- input_file_name->setText("Input file: <I>Nothing</I>"); output_file_name->setText("Output files: <I>Nothing</I>"); + dirac_data.local = false; + local_output->setChecked(false); } |