Skip to content

Commit

Permalink
Merge branch 'bugfix/esp_new_jpeg_memory_issue' into 'master'
Browse files Browse the repository at this point in the history
Fix esp_new_jpeg memory issue

See merge request adf/esp-adf-libs!269
  • Loading branch information
jason-mao committed Nov 15, 2024
2 parents 526a193 + 7fc3346 commit 891d0b0
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 4 deletions.
9 changes: 8 additions & 1 deletion esp_new_jpeg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog

## 0.5.0
## v0.5.1

### Bug Fixes

- Fix memory leakage on jpeg_enc_open fail
- Fix memory allocation fail when dram is insufficient

## v0.5.0

### Features

Expand Down
13 changes: 12 additions & 1 deletion esp_new_jpeg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,22 @@ Please refer to the `test_app` folder for more details on API usage.

The issue typically occurs when a few columns of the image on the far left or right side appear on the opposite side. If you are using the ESP32-S3, a possible cause is that the output buffer is not 16-byte aligned. Please use the `jpeg_calloc_align` function to allocate output buffer.

3. How can I use a simpler method to check if the encoder's output is correct?
You can use the following code to directly print the output JPEG data. Copy the output data, paste it into a hex editor, and save it as a .jpg file.
```c
for (int i = 0; i < out_len; i++) {
printf("%02x", outbuf[i]);
}
printf("\n");
```
## Supported chip
The following table shows the support of ESP_NEW_JPEG for Espressif SoCs. The "&#10004;" means supported, and the "&#10006;" means not supported.
| Chip | 0.5.0 |
| Chip | v0.5.1 |
|----------|----------|
| ESP32 | &#10004; |
| ESP32-S2 | &#10004; |
Expand Down
2 changes: 1 addition & 1 deletion esp_new_jpeg/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "0.5.0"
version: "0.5.1"
description: Espressif JPEG encoder and decoder
url: https://github.com/espressif/esp-adf-libs/tree/master/esp_new_jpeg
repository: https://github.com/espressif/esp-adf-libs.git
Expand Down
2 changes: 1 addition & 1 deletion esp_new_jpeg/include/esp_jpeg_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
extern "C" {
#endif /* __cplusplus */

#define ESP_JPEG_VERION "0.5.0"
#define ESP_JPEG_VERION "0.5.1"

/**
* @version 0.5.0:
Expand Down
Binary file modified esp_new_jpeg/lib/esp32/libesp_new_jpeg.a
Binary file not shown.
Binary file modified esp_new_jpeg/lib/esp32c2/libesp_new_jpeg.a
Binary file not shown.
Binary file modified esp_new_jpeg/lib/esp32c3/libesp_new_jpeg.a
Binary file not shown.
Binary file modified esp_new_jpeg/lib/esp32c5/libesp_new_jpeg.a
Binary file not shown.
Binary file modified esp_new_jpeg/lib/esp32c6/libesp_new_jpeg.a
Binary file not shown.
Binary file modified esp_new_jpeg/lib/esp32p4/libesp_new_jpeg.a
Binary file not shown.
Binary file modified esp_new_jpeg/lib/esp32s2/libesp_new_jpeg.a
Binary file not shown.
Binary file modified esp_new_jpeg/lib/esp32s3/libesp_new_jpeg.a
Binary file not shown.

0 comments on commit 891d0b0

Please sign in to comment.