|
| 1 | +diff --git a/src/omv/boards/OPENMV4P/imlib_config.h b/src/omv/boards/OPENMV4P/imlib_config.h |
| 2 | +index 6b4cd2f4..ee5f14f0 100644 |
| 3 | +--- a/src/omv/boards/OPENMV4P/imlib_config.h |
| 4 | ++++ b/src/omv/boards/OPENMV4P/imlib_config.h |
| 5 | +@@ -18,102 +18,102 @@ |
| 6 | + #define IMLIB_ENABLE_IMAGE_FILE_IO |
| 7 | + |
| 8 | + // Enable LAB LUT |
| 9 | +-#define IMLIB_ENABLE_LAB_LUT |
| 10 | ++// #define IMLIB_ENABLE_LAB_LUT |
| 11 | + |
| 12 | + // Enable YUV LUT |
| 13 | +-//#define IMLIB_ENABLE_YUV_LUT |
| 14 | ++// #define IMLIB_ENABLE_YUV_LUT |
| 15 | + |
| 16 | + // Enable mean pooling |
| 17 | +-#define IMLIB_ENABLE_MEAN_POOLING |
| 18 | ++// #define IMLIB_ENABLE_MEAN_POOLING |
| 19 | + |
| 20 | + // Enable midpoint pooling |
| 21 | +-#define IMLIB_ENABLE_MIDPOINT_POOLING |
| 22 | ++// #define IMLIB_ENABLE_MIDPOINT_POOLING |
| 23 | + |
| 24 | + // Enable binary ops |
| 25 | +-#define IMLIB_ENABLE_BINARY_OPS |
| 26 | ++// #define IMLIB_ENABLE_BINARY_OPS |
| 27 | + |
| 28 | + // Enable math ops |
| 29 | +-#define IMLIB_ENABLE_MATH_OPS |
| 30 | ++// #define IMLIB_ENABLE_MATH_OPS |
| 31 | + |
| 32 | + // Enable flood_fill() |
| 33 | +-#define IMLIB_ENABLE_FLOOD_FILL |
| 34 | ++// #define IMLIB_ENABLE_FLOOD_FILL |
| 35 | + |
| 36 | + // Enable mean() |
| 37 | +-#define IMLIB_ENABLE_MEAN |
| 38 | ++// #define IMLIB_ENABLE_MEAN |
| 39 | + |
| 40 | + // Enable median() |
| 41 | +-#define IMLIB_ENABLE_MEDIAN |
| 42 | ++// #define IMLIB_ENABLE_MEDIAN |
| 43 | + |
| 44 | + // Enable mode() |
| 45 | +-#define IMLIB_ENABLE_MODE |
| 46 | ++// #define IMLIB_ENABLE_MODE |
| 47 | + |
| 48 | + // Enable midpoint() |
| 49 | +-#define IMLIB_ENABLE_MIDPOINT |
| 50 | ++// #define IMLIB_ENABLE_MIDPOINT |
| 51 | + |
| 52 | + // Enable morph() |
| 53 | +-#define IMLIB_ENABLE_MORPH |
| 54 | ++// #define IMLIB_ENABLE_MORPH |
| 55 | + |
| 56 | + // Enable Gaussian |
| 57 | +-#define IMLIB_ENABLE_GAUSSIAN |
| 58 | ++// #define IMLIB_ENABLE_GAUSSIAN |
| 59 | + |
| 60 | + // Enable Laplacian |
| 61 | +-#define IMLIB_ENABLE_LAPLACIAN |
| 62 | ++// #define IMLIB_ENABLE_LAPLACIAN |
| 63 | + |
| 64 | + // Enable bilateral() |
| 65 | +-#define IMLIB_ENABLE_BILATERAL |
| 66 | ++// #define IMLIB_ENABLE_BILATERAL |
| 67 | + |
| 68 | + // Enable cartoon() |
| 69 | + // #define IMLIB_ENABLE_CARTOON |
| 70 | + |
| 71 | + // Enable linpolar() |
| 72 | +-#define IMLIB_ENABLE_LINPOLAR |
| 73 | ++// #define IMLIB_ENABLE_LINPOLAR |
| 74 | + |
| 75 | + // Enable logpolar() |
| 76 | +-#define IMLIB_ENABLE_LOGPOLAR |
| 77 | ++// #define IMLIB_ENABLE_LOGPOLAR |
| 78 | + |
| 79 | + // Enable lens_corr() |
| 80 | +-#define IMLIB_ENABLE_LENS_CORR |
| 81 | ++// #define IMLIB_ENABLE_LENS_CORR |
| 82 | + |
| 83 | + // Enable rotation_corr() |
| 84 | +-#define IMLIB_ENABLE_ROTATION_CORR |
| 85 | ++// #define IMLIB_ENABLE_ROTATION_CORR |
| 86 | + |
| 87 | + // Enable phasecorrelate() |
| 88 | + #if defined(IMLIB_ENABLE_ROTATION_CORR) |
| 89 | +-#define IMLIB_ENABLE_FIND_DISPLACEMENT |
| 90 | ++// #define IMLIB_ENABLE_FIND_DISPLACEMENT |
| 91 | + #endif |
| 92 | + |
| 93 | + // Enable get_similarity() |
| 94 | +-#define IMLIB_ENABLE_GET_SIMILARITY |
| 95 | ++// #define IMLIB_ENABLE_GET_SIMILARITY |
| 96 | + |
| 97 | + // Enable find_lines() |
| 98 | +-#define IMLIB_ENABLE_FIND_LINES |
| 99 | ++// #define IMLIB_ENABLE_FIND_LINES |
| 100 | + |
| 101 | + // Enable find_line_segments() |
| 102 | +-#define IMLIB_ENABLE_FIND_LINE_SEGMENTS |
| 103 | ++// #define IMLIB_ENABLE_FIND_LINE_SEGMENTS |
| 104 | + |
| 105 | + // Enable find_circles() |
| 106 | +-#define IMLIB_ENABLE_FIND_CIRCLES |
| 107 | ++// #define IMLIB_ENABLE_FIND_CIRCLES |
| 108 | + |
| 109 | + // Enable find_rects() |
| 110 | +-#define IMLIB_ENABLE_FIND_RECTS |
| 111 | ++// #define IMLIB_ENABLE_FIND_RECTS |
| 112 | + |
| 113 | + // Enable find_qrcodes() (14 KB) |
| 114 | +-#define IMLIB_ENABLE_QRCODES |
| 115 | ++// #define IMLIB_ENABLE_QRCODES |
| 116 | + |
| 117 | + // Enable find_apriltags() (64 KB) |
| 118 | +-#define IMLIB_ENABLE_APRILTAGS |
| 119 | ++// #define IMLIB_ENABLE_APRILTAGS |
| 120 | + |
| 121 | + // Enable fine find_apriltags() - (8-way connectivity versus 4-way connectivity) |
| 122 | + // #define IMLIB_ENABLE_FINE_APRILTAGS |
| 123 | + |
| 124 | + // Enable high res find_apriltags() - uses more RAM |
| 125 | +-#define IMLIB_ENABLE_HIGH_RES_APRILTAGS |
| 126 | ++// #define IMLIB_ENABLE_HIGH_RES_APRILTAGS |
| 127 | + |
| 128 | + // Enable find_datamatrices() (26 KB) |
| 129 | +-#define IMLIB_ENABLE_DATAMATRICES |
| 130 | ++// #define IMLIB_ENABLE_DATAMATRICES |
| 131 | + |
| 132 | + // Enable find_barcodes() (42 KB) |
| 133 | +-#define IMLIB_ENABLE_BARCODES |
| 134 | ++// #define IMLIB_ENABLE_BARCODES |
| 135 | + |
| 136 | + // Enable CMSIS NN |
| 137 | + // #if !defined(CUBEAI) |
| 138 | +@@ -122,26 +122,26 @@ |
| 139 | + |
| 140 | + // Enable Tensor Flow |
| 141 | + #if !defined(CUBEAI) |
| 142 | +-#define IMLIB_ENABLE_TF |
| 143 | ++// #define IMLIB_ENABLE_TF |
| 144 | + #endif |
| 145 | + |
| 146 | + // Enable FAST (20+ KBs). |
| 147 | + // #define IMLIB_ENABLE_FAST |
| 148 | + |
| 149 | + // Enable find_template() |
| 150 | +-#define IMLIB_FIND_TEMPLATE |
| 151 | ++// #define IMLIB_FIND_TEMPLATE |
| 152 | + |
| 153 | + // Enable find_lbp() |
| 154 | +-#define IMLIB_ENABLE_FIND_LBP |
| 155 | ++// #define IMLIB_ENABLE_FIND_LBP |
| 156 | + |
| 157 | + // Enable find_keypoints() |
| 158 | +-#define IMLIB_ENABLE_FIND_KEYPOINTS |
| 159 | ++// #define IMLIB_ENABLE_FIND_KEYPOINTS |
| 160 | + |
| 161 | + // Enable load, save and match descriptor |
| 162 | +-#define IMLIB_ENABLE_DESCRIPTOR |
| 163 | ++// #define IMLIB_ENABLE_DESCRIPTOR |
| 164 | + |
| 165 | + // Enable find_hog() |
| 166 | +-#define IMLIB_ENABLE_HOG |
| 167 | ++// #define IMLIB_ENABLE_HOG |
| 168 | + |
| 169 | + // Enable selective_search() |
| 170 | + // #define IMLIB_ENABLE_SELECTIVE_SEARCH |
| 171 | +@@ -149,4 +149,4 @@ |
| 172 | + // Enable STM32 DMA2D |
| 173 | + #define IMLIB_ENABLE_DMA2D |
| 174 | + |
| 175 | +-#endif //__IMLIB_CONFIG_H__ |
| 176 | ++#endif //__IMLIB_CONFIG_H__ |
| 177 | +diff --git a/src/omv/boards/OPENMV4P/omv_boardconfig.h b/src/omv/boards/OPENMV4P/omv_boardconfig.h |
| 178 | +index 178c8ea6..6ec5761d 100644 |
| 179 | +--- a/src/omv/boards/OPENMV4P/omv_boardconfig.h |
| 180 | ++++ b/src/omv/boards/OPENMV4P/omv_boardconfig.h |
| 181 | +@@ -146,6 +146,7 @@ |
| 182 | + // Note: fb_alloc is a stack-based, dynamically allocated memory on FB. |
| 183 | + // The maximum available fb_alloc memory = FB_ALLOC_SIZE + FB_SIZE - (w*h*bpp). |
| 184 | + #define OMV_MAIN_MEMORY SRAM1 // data, bss and heap |
| 185 | ++#define OMV_MAIN_MEMORY2 SRAM5 // my memory |
| 186 | + #define OMV_STACK_MEMORY ITCM // stack memory |
| 187 | + #define OMV_DMA_MEMORY SRAM3 // Misc DMA buffers memory. |
| 188 | + #define OMV_FB_MEMORY DRAM // Framebuffer, fb_alloc |
| 189 | +@@ -153,12 +154,15 @@ |
| 190 | + #define OMV_JPEG_MEMORY_OFFSET (31M) // JPEG buffer is placed after FB/fballoc memory. |
| 191 | + #define OMV_VOSPI_MEMORY SRAM4 // VoSPI buffer memory. |
| 192 | + #define OMV_FB_OVERLAY_MEMORY AXI_SRAM // Fast fb_alloc memory. |
| 193 | +-#define OMV_FB_OVERLAY_MEMORY_OFFSET (496*1024) // Fast fb_alloc memory size. |
| 194 | ++// #define OMV_FB_OVERLAY_MEMORY_OFFSET (496*1024) // Fast fb_alloc memory size. |
| 195 | ++#define OMV_FB_OVERLAY_MEMORY_OFFSET (240*1024) // Fast fb_alloc memory size. |
| 196 | ++ |
| 197 | + |
| 198 | + #define OMV_FB_SIZE (20M) // FB memory: header + VGA/GS image |
| 199 | + #define OMV_FB_ALLOC_SIZE (11M) // minimum fb alloc size |
| 200 | + #define OMV_STACK_SIZE (64K) |
| 201 | +-#define OMV_HEAP_SIZE (240K) |
| 202 | ++// #define OMV_HEAP_SIZE (240K) |
| 203 | ++#define OMV_HEAP_SIZE (140K) |
| 204 | + #define OMV_SDRAM_SIZE (32 * 1024 * 1024) // This needs to be here for UVC firmware. |
| 205 | + |
| 206 | + #define OMV_LINE_BUF_SIZE (11 * 1024) // Image line buffer round(2592 * 2BPP * 2 buffers). |
| 207 | +@@ -175,14 +179,18 @@ |
| 208 | + #define OMV_DTCM_LENGTH 128K |
| 209 | + #define OMV_ITCM_ORIGIN 0x00000000 |
| 210 | + #define OMV_ITCM_LENGTH 64K |
| 211 | +-#define OMV_SRAM1_ORIGIN 0x30000000 |
| 212 | +-#define OMV_SRAM1_LENGTH 256K // SRAM1 + SRAM2 + 1/2 SRAM3 |
| 213 | ++// #define OMV_SRAM1_ORIGIN 0x30000000 |
| 214 | ++// #define OMV_SRAM1_LENGTH 256K // SRAM1 + SRAM2 + 1/2 SRAM3 |
| 215 | ++#define OMV_SRAM1_ORIGIN 0x24000000 |
| 216 | ++#define OMV_SRAM1_LENGTH 512K |
| 217 | + #define OMV_SRAM3_ORIGIN 0x30040000 |
| 218 | + #define OMV_SRAM3_LENGTH 32K |
| 219 | + #define OMV_SRAM4_ORIGIN 0x38000000 |
| 220 | + #define OMV_SRAM4_LENGTH 64K |
| 221 | +-#define OMV_AXI_SRAM_ORIGIN 0x24000000 |
| 222 | +-#define OMV_AXI_SRAM_LENGTH 512K |
| 223 | ++// #define OMV_AXI_SRAM_ORIGIN 0x24000000 |
| 224 | ++// #define OMV_AXI_SRAM_LENGTH 512K |
| 225 | ++#define OMV_AXI_SRAM_ORIGIN 0x30000000 |
| 226 | ++#define OMV_AXI_SRAM_LENGTH 256K |
| 227 | + #define OMV_DRAM_ORIGIN 0xC0000000 |
| 228 | + #define OMV_DRAM_LENGTH 32M |
| 229 | + |
0 commit comments