cancel
Showing results for 
Search instead for 
Did you mean: 

JPEG Mode in DCMI

MSale.1
Senior

In your application note AN5020 and related to JPEG reception. i have some questions and hopefully you can answer them so every thing work.

 Each JPEG stream is divided into packets, which have programmable size

What does JPEG Stream means? is it JPEG frame or what exactly?

What packets mean? Minimum Code Unit (MCU) or what?

also how many packet can be received between every HSYNC, one packet or more?

how this packets can have programmable size and which register responsible for this?

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

 

Hello @MSale.1 

I am not sure if I can help you in this topic but here are my suggestions

 Each JPEG stream is divided into packets, which have programmable size

What does JPEG Stream means? is it JPEG frame or what exactly?

What packets mean? Minimum Code Unit (MCU) or what?

JPEG codec can decode a JPEG stream as defined in the ISO/IEC 10918-1 specification.

Once the JPEG header generated, the incoming MCUs are encoded, and the resulting data stream sent to the output FIFO. Number of MCUs to be encoded or decoded is configured in JPEG_CONFR2

> how many packet can be received between every HSYNC, one packet or more?

This figure in the reference manual illustrates the dispatching of data. DCMI_HSYNC signal act like blanking signals.

FBelaid_0-1693909404529.png

> how this packets can have programmable size and which register responsible for this?

I guess the JPEG header contains information about the image size, resolution, and other parameters. By parsing the header, you can determine the actual size of the image and allocate memory for the frame buffer accordingly...

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3

That the image is compressed into a JPEG file format (w/headers) as a compact way of transmitting the frames. MJPEG (Motion JPEG) is a series of frames, each basically a key-frame in JPEG format.

I'd assume you unpack the stream, finding the JPEG header, recovering file size details, and then saving to a file, or reprocessing. You'd need to unpack the frame to get an image you could display a frame buffer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

That is not the problem. the problem is how to configure the DMA if we dont know the image size. in jpeg the image size is un known.

i dont want save it in file. i want to decode it and show it on display.

FBL
ST Employee

 

Hello @MSale.1 

I am not sure if I can help you in this topic but here are my suggestions

 Each JPEG stream is divided into packets, which have programmable size

What does JPEG Stream means? is it JPEG frame or what exactly?

What packets mean? Minimum Code Unit (MCU) or what?

JPEG codec can decode a JPEG stream as defined in the ISO/IEC 10918-1 specification.

Once the JPEG header generated, the incoming MCUs are encoded, and the resulting data stream sent to the output FIFO. Number of MCUs to be encoded or decoded is configured in JPEG_CONFR2

> how many packet can be received between every HSYNC, one packet or more?

This figure in the reference manual illustrates the dispatching of data. DCMI_HSYNC signal act like blanking signals.

FBelaid_0-1693909404529.png

> how this packets can have programmable size and which register responsible for this?

I guess the JPEG header contains information about the image size, resolution, and other parameters. By parsing the header, you can determine the actual size of the image and allocate memory for the frame buffer accordingly...

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.