lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 156 forks source link

Update LVGL and fix binding for multi-instance and parallel rendering architecture changes #292

Closed PGNetHun closed 9 months ago

PGNetHun commented 9 months ago

Fix MicroPython binding to use latest LVGL multi-instance and parallel rendering architecture changes.

Based on previous lv_conf.h configuration and feat/multi-instance branch, and LVGL's lv_conf_template.h config.

PGNetHun commented 9 months ago

Something still does not work as expected, for example JPEG rendering shows small boxes for some JPEGs: image This JPEG is 2x2 subsampled.

Other, not subsampled JPEG image is shown without problem.

kisvegabor commented 9 months ago

Thank you!

Do we really need to target master with this change or rather feat/parallel-rendering? Right now we use the feat/parallel-rendering branch of this repo with LVGL master.

BTW, we are looking for maintainers for the MicroPython binding. I wonder if you would be interested in it. If so I can tell more about the current topics and planned changes.

This JPEG is 2x2 subsampled. Other, not subsampled JPEG image is shown without problem.

The current JPEG decoder is really limited. But if you can send me the original image I can check it out. Maybe it can be easily fixed .

PGNetHun commented 9 months ago

Thank you!

Do we really need to target master with this change or rather feat/parallel-rendering? Right now we use the feat/parallel-rendering branch of this repo with LVGL master.

I've created a new PR (https://github.com/lvgl/lv_binding_micropython/pull/293), but for feat/multi-instance , because that contains most recent changes from LVGL.

BTW, we are looking for maintainers for the MicroPython binding. I wonder if you would be interested in it. If so I can tell more about the current topics and planned changes.

Thank you for the offer, but I'm not (embedded) C developer, I can help only with small changes/bugfixes (when I face issues in my MicroPython hobby project). (so I don't want to tell confidently, that I can (want to) be a maintainer... first I want to update successfully lv_micropython repo from micropython)

This JPEG is 2x2 subsampled. Other, not subsampled JPEG image is shown without problem.

The current JPEG decoder is really limited. But if you can send me the original image I can check it out. Maybe it can be easily fixed .

Before the parallel rendering changes the same jpeg decoder (TJPGD) has shown this baseline image correctly (with the color format fix mentioned in https://github.com/lvgl/lvgl/pull/4473 ). I converted (with Paint.NET, see screenshot below) the image to 4:4:4, 4:4:0, 4:2:2, 4:2:0 subsamplings, and only 4:4:4 is shown in MicroPython app fully. Here are the converted JPEG files: jpeg-subsampling-tests.zip

Convert with Paint.NET ( https://www.getpaint.net/ ): image

Online tool to check JPEG subsampling: https://jimpl.com/ After uploading the file, search row YCbCrSubSampling.

PGNetHun commented 9 months ago

I close this PR due to new PR is created to other branch: https://github.com/lvgl/lv_binding_micropython/pull/293

kisvegabor commented 9 months ago

I've fixed the JPG decoder. All work except "440", but it fails early in the decoder so I believe it wasn't working earlier either.

PGNetHun commented 9 months ago

I've fixed the JPG decoder. All work except "440", but it fails early in the decoder so I believe it wasn't working earlier either.

Thank you, I will test it. and you are right, I think I have not used any 4:4:0 JPEG images, only 4:2:2 :)