[SOLVED] Nanojpeg module example, video from Damien

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
shazz
Posts: 46
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

[SOLVED] Nanojpeg module example, video from Damien

Post by shazz » Sat May 18, 2019 4:38 pm

Hi,

I was watching the video from Damien: MicroPython Melbourne Meetup: Wrap C In MicroPython.
And I thought it would be cool to add the JPEG decoder to the Meowbit.
As Damien in the video, same issue, the programs allocates too much memory to fit in the STM32F4

I was wondering if somebody tried to patch the nano jpeg decoder library to use less memory.
8bits should be enough...

User avatar
shazz
Posts: 46
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

Re: [SOLVED] Nanojpeg module example, video from Damien

Post by shazz » Sun May 19, 2019 1:56 am

Ah, I found picojpeg, another JPEG decoder but optimized for MCU, only 2K of RAM used!
8bits should be enough...

User avatar
mattyt
Posts: 233
Joined: Mon Jan 23, 2017 6:39 am

Re: [SOLVED] Nanojpeg module example, video from Damien

Post by mattyt » Sun May 19, 2019 6:27 am

Would be very cool to see a module built around picojpeg! :)

Coincidentally the Melbourne MicroPython Meetup is on this Wednesday night - if you're able to get it working I'll let everyone know...

User avatar
shazz
Posts: 46
Joined: Tue Apr 30, 2019 6:35 pm
Contact:

Re: [SOLVED] Nanojpeg module example, video from Damien

Post by shazz » Sun May 19, 2019 12:59 pm

Hi mattyt,

It already works, at least on my Meowbit (STM32F4 + flash or sd + TFT7735), was not complicated:
https://github.com/shazz/micropython/bl ... modimage.c

this module relies on the Framebuf module somewhat modified to handle more modes (16 colors, 256 colors, rgr565...)

If any question, just ask :)
8bits should be enough...

Post Reply