Commit 69defb6b authored by Andrey Filippov's avatar Andrey Filippov

Added debug output

parent d495822f
...@@ -133,7 +133,7 @@ long getPercentile(unsigned long frame,int color, unsigned long fraction, int re ...@@ -133,7 +133,7 @@ long getPercentile(unsigned long frame,int color, unsigned long fraction, int re
else lseek(fd_histogram_cache, LSEEK_HIST_WAIT_Y, SEEK_END); /// wait for just Y (G1) else lseek(fd_histogram_cache, LSEEK_HIST_WAIT_Y, SEEK_END); /// wait for just Y (G1)
MDF2(fprintf(stderr,"this_frame: 0x%lx, NOW: 0x%lx\n",this_frame, GLOBALPARS_SNGL(G_THIS_FRAME))); MDF2(fprintf(stderr,"this_frame: 0x%lx, NOW: 0x%lx\n",this_frame, GLOBALPARS_SNGL(G_THIS_FRAME)));
lseek(fd_histogram_cache, LSEEK_HIST_NEEDED + (request_colors << 8), SEEK_END); /// specify that reverse histogram(s) are needed lseek(fd_histogram_cache, LSEEK_HIST_NEEDED + (request_colors << 8), SEEK_END); /// specify that reverse histogram(s) are needed
hist_index=lseek(fd_histogram_cache, frame, SEEK_SET); /// request histograms for the specified frame hist_index=lseek(fd_histogram_cache, frame, SEEK_SET); /// request histograms for the specified frame
MDF2(fprintf(stderr,"got histogram for frame: 0x%lx, NOW: 0x%lx\n",histogram_cache[hist_index].frame, GLOBALPARS_SNGL(G_THIS_FRAME))); MDF2(fprintf(stderr,"got histogram for frame: 0x%lx, NOW: 0x%lx\n",histogram_cache[hist_index].frame, GLOBALPARS_SNGL(G_THIS_FRAME)));
/// histograms for frame will be available 1 frame later /// histograms for frame will be available 1 frame later
if(hist_index <0) { if(hist_index <0) {
......
...@@ -151,7 +151,10 @@ int main (int argc, char *argv[]) { ...@@ -151,7 +151,10 @@ int main (int argc, char *argv[]) {
// lseek(fd_fparmsall,10+LSEEK_FRAME_WAIT_ABS, SEEK_END); /// skip 3 frames (first got 0 pixels, 2- 0x3fff) - one extra, sometimes it is needed // lseek(fd_fparmsall,10+LSEEK_FRAME_WAIT_ABS, SEEK_END); /// skip 3 frames (first got 0 pixels, 2- 0x3fff) - one extra, sometimes it is needed
// with 10 - 3 bad frames // with 10 - 3 bad frames
lseek(fd_fparmsall,14+LSEEK_FRAME_WAIT_ABS, SEEK_END); /// skip 3 frames (first got 0 pixels, 2- 0x3fff) - one extra, sometimes it is needed MDF0(fprintf(stderr,"autoexposure#%d this_frame = 0x%x\n", sensor_port, (int) GLOBALPARS_SNGL(G_THIS_FRAME)));
// lseek(fd_fparmsall,14+LSEEK_FRAME_WAIT_ABS, SEEK_END); /// skip 3 frames (first got 0 pixels, 2- 0x3fff) - one extra, sometimes it is needed
lseek(fd_fparmsall,20+LSEEK_FRAME_WAIT_ABS, SEEK_END); /// skip 3 frames (first got 0 pixels, 2- 0x3fff) - one extra, sometimes it is needed
MDF0(fprintf(stderr,"frame 14: autoexposure#%d this_frame = 0x%x\n", sensor_port, (int) GLOBALPARS_SNGL(G_THIS_FRAME)));
while (1) { /// restart loop while (1) { /// restart loop
if (initParams(daemon_bit)<0) exit (1); /// initialization errors if (initParams(daemon_bit)<0) exit (1); /// initialization errors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment