Compare commits

...

11 Commits

View File

@ -174,6 +174,7 @@ int main(int argc, char *argv[]) {
int nped = 1000;
int cf = 0;
int numberOfPackets=nrows/8;
#ifdef RECT
@ -299,6 +300,7 @@ int main(int argc, char *argv[]) {
double *ped=new double[nx * ny];//, *ped1;
int pos,pos1;
//return 0;
if (pedfile.find(".raw") != std::string::npos) {
pos1=pedfile.rfind("/");
strcpy(froot,pedfile.substr(pos1).c_str());
@ -309,6 +311,7 @@ int main(int argc, char *argv[]) {
cout << "PEDESTAL " << endl;
if (pedfile.find(".tif") == std::string::npos) {
sprintf(fname, "%s", pedfile.c_str());
cout << fname << endl;
std::time(&end_time);
//cout << "aaa" << std::ctime(&end_time) << endl;
@ -320,12 +323,14 @@ int main(int argc, char *argv[]) {
if (filebin.is_open()) {
ff = -1;
while (decoder->readNextFrame(filebin, ff, np, buff)) {
if (np == numberOfPackets) {
mt->pushData(buff);
mt->nextThread();
mt->popFree(buff);
ifr++;
if (ifr % 100 == 0)
cout << ifr << " " << ff << " " << np << endl;
// break;
} else {
@ -336,9 +341,10 @@ int main(int argc, char *argv[]) {
}
filebin.close();
while (mt->isBusy()) {
;
}
}
sprintf(imgfname, "%s/%s_ped.tiff", outdir.c_str(),froot);
mt->writePedestal(imgfname);
@ -436,6 +442,7 @@ int main(int argc, char *argv[]) {
ff = -1;
ifr = 0;
while (decoder->readNextFrame(filebin, ff, np, buff)) {
if (np == numberOfPackets) {
// //push
mt->pushData(buff);
@ -463,6 +470,7 @@ int main(int argc, char *argv[]) {
}
} else {
cout << "bp " << ifr << " " << ff << " " << np << endl;
//break;
}
ff = -1;