Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

cmake_minimum_required(VERSION 3.0)
project(c-net C)
option(ENABLE_STB_IMAGE "enable stb image" OFF)
option(ENABLE_ESP32 "enable esp32 build" ON)
option(ENABLE_POSIX_PORTS "enable posix ports supported" OFF)
option(ENABLE_DEBUG_MEMORY "enable debug memory allocation" ON)

add_definitions(-Wall -Wno-unused-function -Ofast)
add_definitions(-Wall -Wno-unused-function)
#add_definitions(-Wall -Wno-unused-function -Ofast)
set(CMAKE_C_STANDARD 99)

if(NOT DEFINED CMAKE_INSTALL_PREFIX)
Expand Down
3 changes: 2 additions & 1 deletion c-image/include/tensor_pixel.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ typedef enum pixel_type_t
PIXEL_RGBA2BGR = PIXEL_RGBA | (PIXEL_BGR << PIXEL_CONVERT_SHIFT),
PIXEL_RGBA2GRAY = PIXEL_RGBA | (PIXEL_GRAY << PIXEL_CONVERT_SHIFT),
} pixel_type_t;

/**
* mean norm operator
*/
Expand All @@ -47,7 +48,7 @@ FUNCTION_IRAM void tensor_substract_mean_normalize(tensor_t *tensor, const float
*/
FUNCTION_IRAM tensor_t tensor_from_pixels(const unsigned char* pixels, int type, int w, int h, allocator_t *allocator);
FUNCTION_IRAM tensor_t tensor_from_pixels_resize(const unsigned char* pixels, int type, int w, int h, int target_width, int target_height, allocator_t *allocator);
FUNCTION_IRAM tensor_t tensor_from_float16(const unsigned short *data, int size, allocator_t *allocator);// create tensor form float16 buffer
//FUNCTION_IRAM tensor_t tensor_from_float16(const unsigned short *data, int size, allocator_t *allocator);// create tensor form float16 buffer

/**
* tensor data to pixels data, tensor is nchw layout
Expand Down
Loading