Changeset 383
- Timestamp:
- 02/11/07 13:25:04 (2 years ago)
- Files:
-
- trunk/Doxyfile (modified) (3 diffs)
- trunk/include/cc3.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Doxyfile
r382 r383 56 56 CASE_SENSE_NAMES = YES 57 57 HIDE_SCOPE_NAMES = NO 58 SHOW_INCLUDE_FILES = YES58 SHOW_INCLUDE_FILES = NO 59 59 INLINE_INFO = YES 60 60 SORT_MEMBER_DOCS = YES … … 171 171 TOC_EXPAND = NO 172 172 DISABLE_INDEX = NO 173 ENUM_VALUES_PER_LINE = 4173 ENUM_VALUES_PER_LINE = 1 174 174 GENERATE_TREEVIEW = NO 175 175 TREEVIEW_WIDTH = 250 … … 250 250 HIDE_UNDOC_RELATIONS = YES 251 251 HAVE_DOT = YES 252 CLASS_GRAPH = YES253 COLLABORATION_GRAPH = YES254 GROUP_GRAPHS = YES252 CLASS_GRAPH = NO 253 COLLABORATION_GRAPH = NO 254 GROUP_GRAPHS = NO 255 255 UML_LOOK = NO 256 256 TEMPLATE_RELATIONS = NO 257 INCLUDE_GRAPH = YES258 INCLUDED_BY_GRAPH = YES257 INCLUDE_GRAPH = NO 258 INCLUDED_BY_GRAPH = NO 259 259 CALL_GRAPH = NO 260 260 CALLER_GRAPH = NO trunk/include/cc3.h
r371 r383 1 1 /* 2 * Copyright 2006 Anthony Rowe and Adam Goode2 * Copyright 2006-2007 Anthony Rowe and Adam Goode 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 */ 17 17 18 /** \file 19 * The core of the cc3 system. 20 */ 21 18 22 19 23 #ifndef CC3_H … … 24 28 #include <stdio.h> 25 29 26 /******************************************************************************* 27 * Initial CMUcam3 (cc3) data types and functions. 28 * 29 *******************************************************************************/ 30 30 /** 31 * Mark a boolean expression as "likely". 32 * This is sometimes useful for assisting the compiler in predicting branches. 33 */ 31 34 #define likely(x) __builtin_expect(x,1) 35 36 /** 37 * Mark a boolean expression as "unlikely". 38 * This is sometimes useful for assisting the compiler in predicting branches. 39 */ 32 40 #define unlikely(x) __builtin_expect(x,0) 33 41 34 typedef enum { 35 CC3_LOW_RES = 0, 36 CC3_HIGH_RES = 1 42 /** 43 * Allowed resolutions for the camera device. 44 */ 45 typedef enum { 46 CC3_LOW_RES = 0, /**< QCIF */ 47 CC3_HIGH_RES = 1 /**< CIF */ 37 48 } cc3_camera_resolution_t; 38 49 39 typedef enum { 40 CC3_SINGLE = 0, 41 CC3_RED = 0, 42 CC3_GREEN = 1, 43 CC3_BLUE = 2, 44 CC3_Y = 0, 45 CC3_CR = 1, 46 CC3_CB = 2, 47 CC3_ALL 50 /** 51 * Allowable channel values for channel of interest selection and 52 * other functions. 53 */ 54 typedef enum { 55 CC3_SINGLE = 0, /**< Only channel in single-channel images */ 56 CC3_RED = 0, /**< Red channel in RGB images */ 57 CC3_GREEN = 1, /**< Green channel in RGB images */ 58 CC3_BLUE = 2, /**< Blue channel in RGB images */ 59 CC3_Y = 0, /**< Y channel in YCrCb images */ 60 CC3_CR = 1, /**< Cr channel in YCrCb images */ 61 CC3_CB = 2, /**< Cb channel in YCrCb images */ 62 CC3_ALL /**< All channels in an image */ 48 63 } cc3_channel_t; 49 64 50 typedef enum { 51 CC3_YCRCB = 0, 52 CC3_RGB = 1 65 /** 66 * Colorspace selector. 67 */ 68 typedef enum { 69 CC3_YCRCB = 0, /**< YCrCb colorspace */ 70 CC3_RGB = 1 /**< RGB colorspace */ 53 71 } cc3_colorspace_t; 54 72 55 typedef enum { 56 CC3_NEAREST, 57 CC3_MEAN, 58 CC3_RANDOM 73 /** 74 * Subsampling modes. 75 */ 76 typedef enum { 77 CC3_NEAREST, /**< Nearest neighbor subsampling */ 78 CC3_MEAN, /**< Mean of neighbors subsampling */ 79 CC3_RANDOM /**< Random neighbor subsampling */ 59 80 } cc3_subsample_mode_t; 60 81 82 /** 83 * UART speeds. 115200 is the most common. 84 * \sa cc3_uart_init(). 85 */ 61 86 typedef enum { 62 87 CC3_UART_RATE_300 = 300, … … 74 99 } cc3_uart_rate_t; 75 100 76 typedef enum { 77 CC3_UART_MODE_8N1, 78 CC3_UART_MODE_7N1, 79 CC3_UART_MODE_8N2, 80 CC3_UART_MODE_7N2, 81 CC3_UART_MODE_8E1, 82 CC3_UART_MODE_7E1, 83 CC3_UART_MODE_8E2, 84 CC3_UART_MODE_7E2, 85 CC3_UART_MODE_8O1, 86 CC3_UART_MODE_7O1, 87 CC3_UART_MODE_8O2, 88 CC3_UART_MODE_7O2 101 102 /** 103 * UART modes. 104 * 8N1 is the most common. 105 * \sa cc3_uart_init(). 106 */ 107 typedef enum { 108 CC3_UART_MODE_8N1, /**< 8 data bits, no parity, 1 stop bit */ 109 CC3_UART_MODE_7N1, /**< 7 data bits, no parity, 1 stop bit */ 110 CC3_UART_MODE_8N2, /**< 8 data bits, no parity, 2 stop bits */ 111 CC3_UART_MODE_7N2, /**< 7 data bits, no parity, 2 stop bits */ 112 CC3_UART_MODE_8E1, /**< 8 data bits, even parity, 1 stop bit */ 113 CC3_UART_MODE_7E1, /**< 7 data bits, even parity, 1 stop bit */ 114 CC3_UART_MODE_8E2, /**< 8 data bits, even parity, 2 stop bits */ 115 CC3_UART_MODE_7E2, /**< 7 data bits, even parity, 2 stop bits */ 116 CC3_UART_MODE_8O1, /**< 8 data bits, odd parity, 1 stop bit */ 117 CC3_UART_MODE_7O1, /**< 7 data bits, odd parity, 1 stop bit */ 118 CC3_UART_MODE_8O2, /**< 8 data bits, odd parity, 2 stop bits */ 119 CC3_UART_MODE_7O2 /**< 7 data bits, odd parity, 2 stop bits */ 89 120 } cc3_uart_mode_t; 90 121 122 /** 123 * UART binary/text mode selection values. \sa cc3_uart_init() for 124 * how to use this. 125 */ 91 126 typedef enum { 92 127 CC3_UART_BINMODE_BINARY, … … 94 129 } cc3_uart_binmode_t; 95 130 96 131 /** 132 * Framebuffer definition. 133 * \sa cc3_g_current_frame for the main use of this definition. 134 */ 97 135 typedef struct { 98 uint16_t raw_width, raw_height; // raw image width and height 99 uint16_t x0, y0, x1, y1; // bounding box in frame 100 uint16_t y_loc; // current position in frame 101 uint8_t x_step, y_step; // subsampling step 102 cc3_channel_t coi; 103 cc3_subsample_mode_t subsample_mode; 104 uint16_t width, height; 105 uint8_t channels; 136 uint16_t raw_width; /**< Native width */ 137 uint16_t raw_height; /**< Native height */ 138 uint16_t x0; /**< Left horizontal clipping boundary */ 139 uint16_t y0; /**< Top vertical clipping boundary */ 140 uint16_t x1; /**< Right horizontal clipping boundary */ 141 uint16_t y1; /**< Bottom horizontal clipping boundary */ 142 uint16_t y_loc; /**< Currently selected row */ 143 uint8_t x_step; /**< Horizontal subsampling value */ 144 uint8_t y_step; /**< Vertical subsampling value */ 145 cc3_channel_t coi; /**< Channel of interest */ 146 cc3_subsample_mode_t subsample_mode; /**< Subsampling mode */ 147 uint16_t width; /**< Width of clipping region */ 148 uint16_t height; /**< Height of clipping region */ 149 uint8_t channels; /**< Number of channels */ 106 150 } cc3_frame_t; 107 151 … … 146 190 147 191 /** 148 * Sets the channel of interest 1 or all 192 * Sets the channel of interest 1 or all. Blah. 149 193 */ 150 194 int cc3_pixbuf_set_coi (cc3_channel_t chan); … … 176 220 177 221 uint8_t cc3_get_uart_count (void); 222 223 /** 224 * Awesome. 225 */ 178 226 bool cc3_uart_init (uint8_t uart, 179 227 cc3_uart_rate_t rate,
