Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(demos): align images used in benchmark to stride 64 #5925

Conversation

cristian-stoica
Copy link
Contributor

Description of the feature or fix

A clear and concise description of what the bug or new feature is.

Notes

@cristian-stoica cristian-stoica force-pushed the update-image-assets-to-satisfy-stride_64 branch 4 times, most recently from 4a5b25a to eb69fce Compare March 21, 2024 11:52
XuNeo
XuNeo previously approved these changes Mar 21, 2024
#endif

#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB
#define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB
#ifndef LV_ATTRIBUTE_IMG_DUST
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called DUST?

Copy link
Contributor

@nicusorcitu nicusorcitu Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anaGrad I see all the files have been changed with this define.
I suppose this is a python script effect, please have it fixed all over.
Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any convention on the naming of the images?

  • I notice there is an inconsistency in the names (for example, in the assets of widgets, some images have widget in the name, others don't).
    image

  • The names of the .c files is different from that of the .png file (for example in benchmark/assets).
    image

  • There are multiple pngs with different names in different folders for what looks like the same image and I was wondering why is it like that (example: lvgl logo in demo/render vs demo/widgets)
    image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand neither. It's used in all old .c images and I simply copied the original headers as template to python script.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the image should be used in the ATTRIBUTE name. See this from v8.3.

The names are really not consistent now. We can work on that too in an other PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that ATTRIBUTE has been fixed.

We will address separately the naming files .png vs .c It really has to be a consistency and avoid duplication.

@nicusorcitu
Copy link
Contributor

@XuNeo What is the endians rule for this script for index formats?
https://github.com/lvgl/lvgl/blob/master/scripts/LVGLImage.py

As a matter of fact, LVGL is all over little endian fashion, right? So it should be the script acting.

@XuNeo
Copy link
Collaborator

XuNeo commented Apr 1, 2024

@nicusorcitu
Copy link
Contributor

My question is inside the byte, what is the order for index format type?
The VGLite can have these:
image

@XuNeo
Copy link
Collaborator

XuNeo commented Apr 1, 2024

For indexed image, it's also little endian(Edit, for each byte, there's no the term of endianness), differ from early VG-Lite can do. The highest bit is the first pixel.

for(i = 0; i < w_px; i ) {
uint8_t val_act = (*in >> shift) & mask;
out[i] = palette[val_act];
shift -= px_size;
if(shift < 0) {
shift = 8 - px_size;
in ;
}

The LVGLImage.py uses pypng, it outputs the exact same format.

@nicusorcitu
Copy link
Contributor

OK, so according to this picture the python script generate a VG_LITE_INDEX_ENDIAN_BIG_ENDIAN.
318411835-4d56540b-0caf-42e6-8960-99149ef0d755

@nicusorcitu
Copy link
Contributor

The endianes format for index format can be addressed later, if everything is fine with the c array files, you can merge them to master.
Thanks.

@FASTSHIFT FASTSHIFT changed the title Align images used in benchmark to stride 64 feat(demos): align images used in benchmark to stride 64 Apr 5, 2024
Copy link
Collaborator

@XuNeo XuNeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you modified the python script to generate correct macros using image file name? Please upload it too.

@nicusorcitu
Copy link
Contributor

There was no python script changes. Just the new images aligned.

@kisvegabor
Copy link
Member

There was no python script changes. Just the new images aligned.

Let's update the script separately than.

@kisvegabor kisvegabor merged commit 01a98d9 into lvgl:master Apr 18, 2024
16 checks passed
@cristian-stoica cristian-stoica deleted the update-image-assets-to-satisfy-stride_64 branch May 20, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants