Skip to content
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

fix(esp_jpeg): Correctly handle invalid 0xFFFF marker #471

Merged
merged 1 commit into from
Feb 4, 2025
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
4 changes: 4 additions & 0 deletions esp_jpeg/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.1

- Fixed decoding of non-conforming 0xFFFF marker

## 1.2.0

- Added option to for passing user defined working buffer
Expand Down
2 changes: 1 addition & 1 deletion esp_jpeg/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.2.0"
version: "1.2.1"
description: "JPEG Decoder: TJpgDec"
url: https://github.com/espressif/idf-extra-components/tree/master/esp_jpeg/
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion esp_jpeg/test_apps/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ idf_component_register(SRCS "tjpgd_test.c" "test_tjpgd_main.c"
INCLUDE_DIRS "."
PRIV_REQUIRES "unity"
WHOLE_ARCHIVE
EMBED_FILES "logo.jpg" "usb_camera.jpg")
EMBED_FILES "logo.jpg" "usb_camera.jpg" "usb_camera_2.jpg")
7 changes: 6 additions & 1 deletion esp_jpeg/test_apps/main/test_logo_jpg.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
// JPEG encoded image 46x46, 7561 bytes
extern const unsigned char logo_jpg[] asm("_binary_logo_jpg_start");
const unsigned int logo_jpg_len = 7561;

extern char _binary_logo_jpg_start;
extern char _binary_logo_jpg_end;
// Must be defined as macro because extern variables are not known at compile time (but at link time)
#define logo_jpg_len (&_binary_logo_jpg_end - &_binary_logo_jpg_start)
12 changes: 12 additions & 0 deletions esp_jpeg/test_apps/main/test_usb_camera_2_jpg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
Raw data from Logitech C170 USB camera was reconstructed to usb_camera_2.jpg
It was converted to RGB888 array with jpg_to_rgb888_hex.py
*/

// JPEG encoded frame 160x120, 1384 bytes, has broken 0xFFFF marker
extern const unsigned char camera_2_jpg[] asm("_binary_usb_camera_2_jpg_start");

extern char _binary_usb_camera_2_jpg_start;
extern char _binary_usb_camera_2_jpg_end;
// Must be defined as macro because extern variables are not known at compile time (but at link time)
#define camera_2_jpg_len (&_binary_usb_camera_2_jpg_end - &_binary_usb_camera_2_jpg_start)
Loading