mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1556 from openmv/jpeg_fixes
imlib: Update JPEG decoder and fix memory issues.
This commit is contained in:
commit
b76222b9d1
@ -2743,7 +2743,7 @@ void imlib_draw_image(image_t *dst_img, image_t *src_img, int dst_x_start, int d
|
||||
} else if (src_img->is_yuv) {
|
||||
imlib_deyuv_image(&new_src_img, src_img);
|
||||
} else if (is_jpeg) {
|
||||
jpeg_decompress_image_to_binary(&new_src_img, src_img);
|
||||
jpeg_decompress(&new_src_img, src_img);
|
||||
} else if (is_png) {
|
||||
png_decompress(&new_src_img, src_img);
|
||||
}
|
||||
@ -2755,7 +2755,7 @@ void imlib_draw_image(image_t *dst_img, image_t *src_img, int dst_x_start, int d
|
||||
} else if (src_img->is_yuv) {
|
||||
imlib_deyuv_image(&new_src_img, src_img);
|
||||
} else if (is_jpeg) {
|
||||
jpeg_decompress_image_to_grayscale(&new_src_img, src_img);
|
||||
jpeg_decompress(&new_src_img, src_img);
|
||||
} else if (is_png) {
|
||||
png_decompress(&new_src_img, src_img);
|
||||
}
|
||||
@ -2767,7 +2767,7 @@ void imlib_draw_image(image_t *dst_img, image_t *src_img, int dst_x_start, int d
|
||||
} else if (src_img->is_yuv) {
|
||||
imlib_deyuv_image(&new_src_img, src_img);
|
||||
} else if (is_jpeg) {
|
||||
jpeg_decompress_image_to_rgb565(&new_src_img, src_img);
|
||||
jpeg_decompress(&new_src_img, src_img);
|
||||
} else if (is_png) {
|
||||
png_decompress(&new_src_img, src_img);
|
||||
}
|
||||
|
||||
@ -1125,9 +1125,7 @@ void imlib_jpeg_compress_init();
|
||||
void imlib_jpeg_compress_deinit();
|
||||
void jpeg_mdma_irq_handler();
|
||||
#endif
|
||||
void jpeg_decompress_image_to_binary(image_t *dst, image_t *src);
|
||||
void jpeg_decompress_image_to_grayscale(image_t *dst, image_t *src);
|
||||
void jpeg_decompress_image_to_rgb565(image_t *dst, image_t *src);
|
||||
void jpeg_decompress(image_t *dst, image_t *src);
|
||||
bool jpeg_compress(image_t *src, image_t *dst, int quality, bool realloc);
|
||||
int jpeg_clean_trailing_bytes(int bpp, uint8_t *data);
|
||||
void jpeg_read_geometry(FIL *fp, image_t *img, const char *path, jpg_read_settings_t *rs);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user