Skip to content

Commit e23454d

Browse files
committed
Minor cleanup of #defines
1 parent fe8002a commit e23454d

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

cam.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -54,44 +54,44 @@
5454
// after subsampling
5555
// Camera parameters for QQVGA
5656
// See ovcam.c for more options
57-
#define NATIVE_CCD_COLS (160)
58-
#define NATIVE_CCD_ROWS (240) // Should be 240, but some rows don't seem to work
59-
#define NATIVE_COL_SS (1) // Hardware skipping 0 pixels
60-
#define NATIVE_ROW_SS (2) // Hardware skipping every 1/2 rows
57+
#define NATIVE_CCD_COLS (160)
58+
#define NATIVE_CCD_ROWS (240) // Less than 240 as some rows don't work?
59+
#define NATIVE_COL_SS (1) // Hardware skipping 0 pixels
60+
#define NATIVE_ROW_SS (2) // Hardware skipping every 1/2 rows
6161

6262
// Hardware output parameters
63-
#define NATIVE_IMAGE_COLS (160) // NATIVE_CCD_COLS/NATIVE_COL_SS
64-
#define NATIVE_IMAGE_ROWS (120) // NATIVE_CCD_ROWS/NATIVE_ROW_SS
63+
#define NATIVE_IMAGE_COLS (160) // NATIVE_CCD_COLS/NATIVE_COL_SS
64+
#define NATIVE_IMAGE_ROWS (120) // NATIVE_CCD_ROWS/NATIVE_ROW_SS
6565

6666
// TODO: Integrate row windowing
6767
// Windowing parameters
68-
#define WINDOW_START_COL (20)
69-
#define WINDOW_END_COL (140)
70-
#define WINDOW_START_ROW (0)
71-
#define WINDOW_END_ROW (120)
68+
#define WINDOW_START_COL (20)
69+
#define WINDOW_END_COL (140)
70+
#define WINDOW_START_ROW (0)
71+
#define WINDOW_END_ROW (120)
7272

7373
// Downsampling parameters
74-
#define DS_COL_PERIOD (4) // Capturing 1/4 pixels
75-
#define DS_ROW_PERIOD (4) // Capturing 1/4 rows
76-
#define DS_FRAME_PERIOD (1) // Capturing 1/1 frames
74+
#define DS_COL_PERIOD (4) // Capturing 1/4 pixels
75+
#define DS_ROW_PERIOD (4) // Capturing 1/4 rows
76+
#define DS_FRAME_PERIOD (1) // Capturing 1/1 frames
7777

7878
// Image output parameters
79-
#define DS_IMAGE_COLS (30) // NATIVE_IMAGE_COLS/DS_COL_PERIOD
80-
#define DS_IMAGE_ROWS (30) // NATIVE_IMAGE_ROWS/DS_ROW_PERIOD
79+
#define DS_IMAGE_COLS (30) // NATIVE_IMAGE_COLS/DS_COL_PERIOD
80+
#define DS_IMAGE_ROWS (30) // NATIVE_IMAGE_ROWS/DS_ROW_PERIOD
8181

8282
// Default camera capture timings for QQVGA no subsampling, 25 fps
83-
#define ROW_ROW_TIME (32)
84-
#define VSYNC_ROW_TIME (12800)
85-
#define ROW_VSYNC_TIME (2800)
86-
#define VSYNC_VSYNC_TIME (25000)
83+
#define ROW_ROW_TIME (32)
84+
#define VSYNC_ROW_TIME (12800)
85+
#define ROW_VSYNC_TIME (2800)
86+
#define VSYNC_VSYNC_TIME (25000)
8787

8888
// Amount of time before an event to trigger timer
89-
#define ROW_ROW_OFFSET (6) // 384 cycles
90-
#define VSYNC_ROW_OFFSET (6) // 384 cycles
91-
#define ROW_VSYNC_OFFSET (10) // 640 cycles
92-
#define VSYNC_VSYNC_OFFSET (8) // 512 cycles
89+
#define ROW_ROW_OFFSET (6) // 384 cycles
90+
#define VSYNC_ROW_OFFSET (6) // 384 cycles
91+
#define ROW_VSYNC_OFFSET (10) // 640 cycles
92+
#define VSYNC_VSYNC_OFFSET (8) // 512 cycles
9393

94-
#define CAM_POOL_SIZE (4) // 4 frames shared with system
94+
#define CAM_POOL_SIZE (4) // 4 frames shared with system
9595

9696
// The timer states describe what the timer is waiting for
9797
// i.e. VSYNC state means timer is waiting for VSYNC event

0 commit comments

Comments
 (0)