Skip to main content
eem
Associate
January 31, 2019
Question

why stm32f7 hardware JPEG can't read header?

  • January 31, 2019
  • 6 replies
  • 1768 views

hi.i work with stm32f767IG and it's hardware JPEG.i write code like stmcube EVAL board JPEG example. in some cases and pictures, header data ready flag is set and i receive interrupt but returned values like image width and height etc are all zero.but when i open image with paint and just save it and use it again all header values get right .i want to know why this happen and how i can handle it . can anyone guide me?

i attached mentioned image below.

This topic has been closed for replies.

6 replies

AvaTar
Senior III
January 31, 2019

The STM32F7 MCU has no JPEG hardware I know of.

> .i write code like stmcube EVAL board JPEG example.

Cube code/examples might have bugs.

After Forever
Senior III
January 31, 2019

> The STM32F7 MCU has no JPEG hardware I know of.

From RM0410 reference manual:

21 JPEG codec (JPEG) [Click Show More]

21.1 Introduction

The hardware 8-bit JPEG codec encodes uncompressed image data stream or decodes JPEG-compressed image data stream. It also fully manages JPEG headers.

> but when i open image with paint and just save it and use it again all header values get right

Maybe the original image header has some fluctuations from the standard, or maybe the JPEG decoder has issues with some edge cases, it's hard to tell. You could compare byte-by-byte the working and not working JPEGs headers to find the differences. And make sure to check the errata document of your MCU model.

AvaTar
Senior III
January 31, 2019

> 21 JPEG codec (JPEG) [Click Show More]

Didn't catch that. And still wondering about the fancy hardware ST puts in some of it's MCUs.

I'd like to know how it sells ...

> Maybe the original image header has some fluctuations from the standard, or maybe the JPEG decoder has issues with some edge cases, it's hard to tell.

Factual deviations from standards are commonplace in the industry, market power usual trumps conformity. And complex peripherals tend to have issues, too.

I would try debugging the code, and see where it bails out.

After conducting the due diligence, and checking the errata of course.

frackers
Senior
April 8, 2019

I've hit the same problem - anyone any ideas?

h2obrain
Associate II
November 4, 2019

I think the jpeg-codec in stm32[fh]7 does only support jpegs with baseline compression (and not progressive, 3rd paragraph in this wiki article).

At least my jpegs started to get parsed, when I saved it in GIMP with the progressive option unticked.