Compare commits

...

11 Commits

View File

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