Giter Club home page Giter Club logo

Comments (8)

JonRobo avatar JonRobo commented on July 21, 2024

I discovered that using the ESP32SPI_DMA bus for the display and editing the MAX_TRANSFER_SZ in Arduino_ESP32SPI_DMA.h to (32*1024) from (480 * 2 * 9) had a big impact to gif playback speed. I'm fairly satisfied with the quality now.

I placed the SD card on a separate SPI bus using the HSPI pins (using pin 36 for MISO instead of Pin 12). The bottle neck seems to be on the display side

However now I'm noticing that high quality jpgs from the SD card are slow too haha. My test image is ~240*240 and 67K in size and you can see the image be filled in row by row. I'll be trying to optimize this next

from arduino_gfx.

moononournation avatar moononournation commented on July 21, 2024

from arduino_gfx.

JonRobo avatar JonRobo commented on July 21, 2024

Using the GC9A01 and and SD breakout board.
I noticed that for Gifs we can use writeIndexedPixels to display the whole frame right?

For Jpgs I see that we're writing row by row with draw16bitBeRGBBitmap.

Wouldn't it be possible to grab the jpg data in such a way that we can use it in the writeIndexedPixels and basically treat it like a frame of a gif?

from arduino_gfx.

moononournation avatar moononournation commented on July 21, 2024

4-bit SD_MMC can play 22050 MP3 + 320x240 MJPEG over 15 FPS, is it already good enough?
https://github.com/moononournation/ESP32-LCDKit/blob/master/Mjpeg_MP3_JPEGDEC_DMA/Mjpeg_MP3_JPEGDEC_DMA.ino

from arduino_gfx.

JonRobo avatar JonRobo commented on July 21, 2024

I found that by changing the JPG size and buff size to 4096 from 2048 in JPGDEC.h (bitbank2/JPEGDEC) library source code we get an enormous increase in speed to display jpgs. I now have only ~0.14 seconds to display a quality 240*240 jpg from an SD card. I tried larger sizes and had a very small difference in performance, so i found that 4096 is optimal. I know that these libraries are meant to run on as many microcontrollers as possible, but with the ESP32 there is an order of magnitude more RAM than most others and by utilizing it both GIF playback and image rendering can be improved substantially.
image

I'm now going to shift attention to custom animations such as displaying live sensor data as a graph

from arduino_gfx.

moononournation avatar moononournation commented on July 21, 2024

from arduino_gfx.

moononournation avatar moononournation commented on July 21, 2024

But I said I can play 320x240 MJPEG at 15 FPS with MP3 simultaneously, or 30 FPS without MP3, that means only 0.033 seconds a frame.

from arduino_gfx.

JonRobo avatar JonRobo commented on July 21, 2024

I'd like to test that example later on as well, does this use both cores to achieve 30 FPS? One to fill the buffer and the other core to display?

I'll mention this change to bitbank2 as well, my findings have all been surface level; I'm sure the author would know of some additional ways to improve performance for more capable controllers like the ESP32

from arduino_gfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.