Changeset 6086 for trunk/ippTools/src
- Timestamp:
- Jan 20, 2006, 11:47:20 AM (21 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 4 edited
-
p2insertPendingFrames.c (modified) (2 diffs)
-
p2pendingToDone.c (modified) (2 diffs)
-
p2rawToPending.c (modified) (2 diffs)
-
p2writePendingFrames.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/p2insertPendingFrames.c
r6063 r6086 24 24 p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc( 25 25 rawFrame->exposure->exp_id, 26 rawFrame->exposure->camera, 27 rawFrame->exposure->filter, 26 28 rawFrame->exposure->class, 27 29 rawFrame->exposure->nclass, … … 38 40 p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc( 39 41 rawImage->exp_id, 42 rawImage->exptype, 40 43 rawImage->class, 41 44 rawImage->class_id, -
trunk/ippTools/src/p2pendingToDone.c
r6063 r6086 2 2 3 3 // select pending frames (exposure+images) which are done/not done 4 psArray *p2pendingToDone (p2Config *config, psArray *pendingFrames) {4 psArray *p2pendingToDone(p2Config *config, psArray *pendingFrames) { 5 5 6 6 psArray *doneFrames = psArrayAlloc(pendingFrames->n); … … 9 9 for (int i = 0; i < pendingFrames->n; i++) { 10 10 p2PendingFrame *pendingFrame = pendingFrames->data[i]; 11 // if (pendingFrame->exposure->state != P2_STATE_DONE) continue;11 // if (pendingFrame->exposure->state != P2_STATE_DONE) continue; 12 12 13 p2DoneExpRow *doneExposure = p2DoneExpRowAlloc( 14 pendingFrame->exposure->exp_id, 15 pendingFrame->exposure->class, 16 pendingFrame->exposure->nclass, 17 pendingFrame->exposure->nclass, // XXX ndone is uneeded? 18 pendingFrame->exposure->p1_version, 19 pendingFrame->exposure->p2_version 20 //doneExposure->state = P2_STATE_DONE; 21 ); 13 p2DoneExpRow *doneExposure = p2DoneExpRowAlloc( 14 pendingFrame->exposure->exp_id, 15 pendingFrame->exposure->camera, 16 pendingFrame->exposure->filter, 17 pendingFrame->exposure->class, 18 pendingFrame->exposure->nclass, // XXX ndone is uneeded? 19 0xFF, // ndone 20 pendingFrame->exposure->p1_version, 21 pendingFrame->exposure->p2_version 22 //doneExposure->state = P2_STATE_DONE; 23 ); 22 24 23 psArray *doneImages = psArrayAlloc(pendingFrame->images->n);24 doneImages->n = 0;25 for (int j = 0; j < pendingFrame->images->n; j++) {26 p2PendingImfileRow *pendingImage = pendingFrame->images->data[j];25 psArray *doneImages = psArrayAlloc(pendingFrame->images->n); 26 doneImages->n = 0; 27 for (int j = 0; j < pendingFrame->images->n; j++) { 28 p2PendingImfileRow *pendingImage = pendingFrame->images->data[j]; 27 29 28 30 /* 29 if (pendingImage->state != P2_STATE_DONE) {30 psAbort ("p2search", "programming error!");31 }31 if (pendingImage->state != P2_STATE_DONE) { 32 psAbort ("p2search", "programming error!"); 33 } 32 34 */ 33 35 34 p2DoneImfileRow *doneImage = p2DoneImfileRowAlloc( 35 pendingImage->exp_id, 36 pendingImage->class, 37 pendingImage->class_id, 38 pendingImage->p1_version, 39 pendingImage->p2_version, 36 p2DoneImfileRow *doneImage = p2DoneImfileRowAlloc( 37 pendingImage->exp_id, 38 pendingImage->exptype, 39 pendingImage->class, 40 pendingImage->class_id, 41 pendingImage->p1_version, 42 pendingImage->p2_version, 40 43 "", // recipe 41 44 "", // stats 42 pendingImage->url45 pendingImage->url 43 46 ); 44 47 45 psArrayAdd (doneImages, 100, doneImage); 46 } 47 48 // XXX FIXME 49 p2DoneFrame *doneFrame = p2DoneFrameAlloc(doneExposure, doneImages); 48 psArrayAdd(doneImages, 100, doneImage); 49 } 50 50 51 psArrayAdd (doneFrames, 100, doneFrame); 51 // XXX FIXME 52 p2DoneFrame *doneFrame = p2DoneFrameAlloc(doneExposure, doneImages); 53 54 psArrayAdd(doneFrames, 100, doneFrame); 52 55 } 56 53 57 return doneFrames; 54 } 58 } 55 59 56 60 // XXX the filename layout is defined by this code -
trunk/ippTools/src/p2rawToPending.c
r6083 r6086 2 2 3 3 // select pending frames (exposure+images) which are done/not done 4 psArray *p2rawToPending (p2Config *config, psArray *rawFrames) {4 psArray *p2rawToPending(p2Config *config, psArray *rawFrames) { 5 5 6 6 psArray *pendingFrames = psArrayAlloc(rawFrames->n); … … 8 8 9 9 for (int i = 0; i < rawFrames->n; i++) { 10 ppRawFrame *rawFrame = rawFrames->data[i];10 ppRawFrame *rawFrame = rawFrames->data[i]; 11 11 12 p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc( 13 rawFrame->exposure->exp_id, 14 rawFrame->exposure->class, 15 rawFrame->exposure->nclass, 16 0xff, // p1 17 0xff // p2 18 ); 19 20 psArray *pendingImages = psArrayAlloc (rawFrame->images->n); 21 pendingImages->n = 0; 22 for (int j = 0; j < rawFrame->images->n; j++) { 23 rawImfileRow *rawImage = rawFrame->images->data[j]; 24 p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc( 25 rawImage->exp_id, 26 rawImage->class, 27 rawImage->class_id, 28 0xff, // p1 29 0xff, // p2 30 "", // recipe 31 "", // stats 32 rawImage->url 12 p2PendingExpRow *pendingExposure = p2PendingExpRowAlloc( 13 rawFrame->exposure->exp_id, 14 rawFrame->exposure->camera, 15 rawFrame->exposure->filter, 16 rawFrame->exposure->class, 17 rawFrame->exposure->nclass, 18 0xff, // p1 19 0xff // p2 33 20 ); 34 21 35 psArrayAdd (pendingImages, 100, pendingImage); 36 } 37 38 p2PendingFrame *pendingFrame = p2PendingFrameAlloc (pendingExposure, pendingImages); 39 psArrayAdd (pendingFrames, 100, pendingFrame); 22 psArray *pendingImages = psArrayAlloc(rawFrame->images->n); 23 pendingImages->n = 0; 24 for (int j = 0; j < rawFrame->images->n; j++) { 25 rawImfileRow *rawImage = rawFrame->images->data[j]; 26 p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc( 27 rawImage->exp_id, 28 rawImage->exptype, 29 rawImage->class, 30 rawImage->class_id, 31 0xff, // p1 32 0xff, // p2 33 "", // recipe 34 "", // stats 35 rawImage->url 36 ); 37 38 psArrayAdd(pendingImages, 100, pendingImage); 39 } 40 41 p2PendingFrame *pendingFrame = p2PendingFrameAlloc(pendingExposure, 42 pendingImages); 43 psArrayAdd(pendingFrames, 100, pendingFrame); 40 44 } 45 41 46 return pendingFrames; 42 } 47 } 43 48 44 49 // XXX the filename layout is defined by this code -
trunk/ippTools/src/p2writePendingFrames.c
r6063 r6086 5 5 6 6 for (int i = 0; i < frames->n; i++) { 7 p2PendingFrame *frame = frames->data[i]; 8 9 for (int j = 0; j < frame->images->n; j++) { 10 p2PendingImfileRow *image = frame->images->data[j]; 11 fprintf (stdout, "%s %d %s %s %s\n", 12 image->exp_id, 13 image->p2_version, 14 image->class, 15 image->class_id, 16 image->url); 17 } 7 p2PendingFrame *frame = frames->data[i]; 8 for (int j = 0; j < frame->images->n; j++) { 9 p2PendingImfileRow *image = frame->images->data[j]; 10 fprintf (stdout, "%s %d %s %s %s\n", 11 image->exp_id, 12 image->p2_version, 13 image->class, 14 image->class_id, 15 image->url); 16 } 18 17 } 18 19 19 return true; 20 20 }
Note:
See TracChangeset
for help on using the changeset viewer.
