Skip to content

IDF release/v4.4 #5996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 14, 2021
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions platform.txt

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions tools/platformio-build-esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"-Wl,--gc-sections",
"-fno-rtti",
"-fno-lto",
"-Wl,--wrap=mbedtls_mpi_exp_mod",
"-Wl,--wrap=longjmp",
"-Wl,--undefined=uxTopUsedPriority",
"-T", "esp32.rom.redefined.ld",
Expand Down Expand Up @@ -304,7 +303,7 @@
"UNITY_INCLUDE_CONFIG_H",
"WITH_POSIX",
"_GNU_SOURCE",
("IDF_VER", '\\"v4.4-dev-3703-gddc44956bf\\"'),
("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'),
"ESP_PLATFORM",
"_POSIX_READER_WRITER_LOCKS",
"ARDUINO_ARCH_ESP32",
Expand Down
3 changes: 1 addition & 2 deletions tools/platformio-build-esp32c3.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"-Wl,--gc-sections",
"-fno-rtti",
"-fno-lto",
"-Wl,--wrap=mbedtls_mpi_exp_mod",
"-Wl,--undefined=uxTopUsedPriority",
"-Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting",
"-Wl,--wrap=__register_frame_info_bases",
Expand Down Expand Up @@ -294,7 +293,7 @@
"UNITY_INCLUDE_CONFIG_H",
"WITH_POSIX",
"_GNU_SOURCE",
("IDF_VER", '\\"v4.4-dev-3703-gddc44956bf\\"'),
("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'),
"ESP_PLATFORM",
"_POSIX_READER_WRITER_LOCKS",
"ARDUINO_ARCH_ESP32",
Expand Down
2 changes: 1 addition & 1 deletion tools/platformio-build-esp32s2.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
"UNITY_INCLUDE_CONFIG_H",
"WITH_POSIX",
"_GNU_SOURCE",
("IDF_VER", '\\"v4.4-dev-3703-gddc44956bf\\"'),
("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'),
"ESP_PLATFORM",
"_POSIX_READER_WRITER_LOCKS",
"ARDUINO_ARCH_ESP32",
Expand Down
Binary file modified tools/sdk/esp32/bin/bootloader_dio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_dio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_dout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_dout_80m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/esp32/bin/bootloader_qout_80m.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct {
*/
static inline void esp_apptrace_lock_init(esp_apptrace_lock_t *lock)
{
vPortCPUInitializeMutex(&lock->mux);
portMUX_INITIALIZE(&lock->mux);
lock->int_state = 0;
}

Expand Down
3 changes: 2 additions & 1 deletion tools/sdk/esp32/include/config/sdkconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
#define CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 1
#define CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_COREDUMP_ENABLE_TO_NONE 1
#define CONFIG_FATFS_CODEPAGE_850 1
#define CONFIG_FATFS_CODEPAGE 850
Expand Down Expand Up @@ -676,5 +677,5 @@
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
#define CONFIG_ARDUINO_IDF_COMMIT "ddc44956bf"
#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555"
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
52 changes: 52 additions & 0 deletions tools/sdk/esp32/include/esp-face/include/image/dl_image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ namespace dl
output[2] = input & 0xF8; // red
}

/**
* @brief Convert RGB565 image to RGB888 image.
*
* @param image ptr of RGB565 image
* @param image_shape shape of the input image
* @return Tensor<uint8_t>* output RGB88 image
*/
Tensor<uint8_t> *convert_image_rgb565_to_rgb888(uint16_t *image, std::vector<int> &image_shape);

/**
* @brief Convert RGB565 pixel to Gray.
*
Expand Down Expand Up @@ -435,5 +444,48 @@ namespace dl
*/
Tensor<uint8_t> *rgb2hsv(Tensor<uint8_t> &image, bool bgr = false, bool fast = true);

/**
* @brief resize an image to the target shape.
*
* @param image the input image Tensor
* @param target_shape the target shape of the resized image.
* @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST
* @return Tensor<uint8_t>* the pointer of the resized image Tensor
*/
Tensor<uint8_t> *resize_image(Tensor<uint8_t> &image, std::vector<int> target_shape, resize_type_t resize_type);

/**
* @brief resize an image to the target shape.
*
* @param image the input image Tensor
* @param resized_image the resized image Tensor
* @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST
*/
void resize_image(Tensor<uint8_t> &image, Tensor<uint8_t> &resized_image, resize_type_t resize_type);

/**
* @brief resize an image to the target shape with nearest method.
*
* @tparam T
* @param image the pointer of the input image
* @param input_shape the input shape of the image
* @param target_shape the target shape of the resized image
* @return T* the pointer of the resized image
*/
template <typename T>
T *resize_image_nearest(T *image, std::vector<int> input_shape, std::vector<int> target_shape);

/**
* @brief resize an image to the target shape with nearest method.
*
* @tparam T
* @param image the pointer of the input image
* @param input_shape the input shape of the image
* @param resized_image the pointer of the resized image
* @param target_shape the target shape of the resized image
*/
template <typename T>
void resize_image_nearest(T *image, std::vector<int> input_shape, T *resized_image, std::vector<int> target_shape);

} // namespace image
} // namespace dl
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ namespace dl
const char *name = "AvgPool2D") : Layer(name),
output_exponent(output_exponent),
filter_shape(filter_shape),
padding_type(padding_type),
padding(padding),
stride_y(stride_y),
stride_x(stride_x),
padding_type(padding_type),
padding(padding),
output_shape({})
{
this->output = new Tensor<feature_t>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ namespace dl
* false: the output will store to a separate memory
*/
ExpandDims(std::vector<int> axis, const char *name = "ExpandDims", bool inplace = false) : Layer(name),
axis(axis), inplace(inplace), output_shape({})
output_shape({}),
axis(axis),
output(NULL),
inplace(inplace)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), inplace(inplace), output_shape({})
Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), output(NULL), inplace(inplace), output_shape({})
{}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ namespace dl
const int stride_x = 1,
const char *name = "MaxPool2D") : Layer(name),
filter_shape(filter_shape),
padding_type(padding_type),
padding(padding),
stride_y(stride_y),
stride_x(stride_x),
padding_type(padding_type),
padding(padding),
output_shape({})
{
this->output = new Tensor<feature_t>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace dl
* - int8_t: stands for operation in int8_t quantize
*/
template <typename feature_t>
class ReLU : public Layer
class Relu : public Layer
{
private:
Tensor<feature_t> *output; /*<! output ptr of relu >*/
Expand All @@ -33,7 +33,7 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
ReLU(const char *name = "ReLU", bool inplace = false) : Layer(name),
Relu(const char *name = "Relu", bool inplace = false) : Layer(name),
output(NULL), inplace(inplace), output_shape({})
{
}
Expand All @@ -42,7 +42,7 @@ namespace dl
* @brief Destroy the ReLU object
*
*/
~ReLU()
~Relu()
{
if ((!this->inplace) && (this->output != NULL))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ namespace dl
* false: the output will store to a separate memory
*/
Reshape(std::vector<int> shape, const char *name = "Reshape", bool inplace = false) : Layer(name),
output_shape(shape), inplace(inplace)
output(NULL),
inplace(inplace),
output_shape(shape)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name), axis(axis), inplace(inplace), output_shape({})
Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name),
output(NULL),
inplace(inplace),
axis(axis),
output_shape({})
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ namespace dl
* false: the output will store to a separate memory
*/
Sub2D(const int output_exponent, const Activation<feature_t> *activation = NULL, const char *name = "Sub2D", bool inplace = false) : Layer(name),
output_exponent(output_exponent), activation(activation), output(NULL), inplace(inplace), output_shape({})
output_exponent(output_exponent),
activation(activation),
output(NULL),
inplace(inplace),
output_shape({})
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ namespace dl
* @param inplace true: the output will store to input
* false: the output will store to a separate memory
*/
Transpose(std::vector<int> perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name), perm(perm), inplace(inplace), output_shape({})
Transpose(std::vector<int> perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name),
output(NULL),
inplace(inplace),
perm(perm),
output_shape({})
{
}

Expand Down
Loading