JPEG encoding running stops at jpeg_start_compress(&cinfo, TRUE);

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JPEG encoding running stops at jpeg_start_compress(&cinfo, TRUE);

890 Views
nanjun
Contributor III
Spoiler
 

Hello,

based on the csi_rgb565.c, I am going to extend the JPEG Encoding function integrated with the samlpe code of AN12110.

The code is running until the line

jpeg_start_compress(&cinfo, TRUE);-->

                              (*cinfo->master->prepare_for_pass) (cinfo); //stop

in JpegCompress(uint32_t Buffer):

Versions:

SDK Version 2.9.1, MCUXpresso IDE 11.3.0

Since the camera and display share a small size 480x272,

I did not change the default memory settings from  csi_rgb565.c shown as attached pic. 

I am not sure if it could cause the failure.

My code is attached below.

Regards,

Nanjun

0 Kudos
2 Replies

885 Views
converse
Senior Contributor V

What do you mean by running stops?. It can’t just stop, it must be doing something. Most likely is it has taken a fault. But please tell us.

0 Kudos

846 Views
nanjun
Contributor III


Hello,

thanks for your kind reply.

The error was removed via modifying the init-configuration of the SD-Card.

In this application, i.MX RT1064 EVK is used to capture the camera data and sends it to LCD-Display.They work fine.

However, the JPG data written into SD Card cannot be opened properly, which shows "IMG_0001.JPG this data cannot be opened"


All data share a same size of 128 KB and the resolution of camera is set to 272x480.

Where could the error come from?

0 Kudos