-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Update C-array images in demos/examples #5205
Comments
We can move the PNGs to a single folder but the result images shall be stored in their own demo folder. So finally I would keep the PNGs and C together. Would it be possible to make the converter script recursively traverse the demos and examples folders and convert all images starting with lv_demo_image_..._argb8888.png; //convert to argb8888
lv_demo_image_..._rgb.png; //convert to LV_COLOR_FORMAT_NATIVE
lv_demo_image_..._argb.png; //convert to LV_COLOR_FORMAT_NATIVE_ALPHA I need to mention that it will be a larger work to unify the names of all images but I can help with that. |
We need some feedback on this issue. Now we mark this as "stale" because there was no activity here for 14 days. Remove the "stale" label or comment else this will be closed in 7 days. |
Not stale. Needed by #5471 |
We need some feedback on this issue. Now we mark this as "stale" because there was no activity here for 14 days. Remove the "stale" label or comment else this will be closed in 7 days. |
Not stale. |
We need some feedback on this issue. Now we mark this as "stale" because there was no activity here for 14 days. Remove the "stale" label or comment else this will be closed in 7 days. |
As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time. So feel free to comment if you have remarks or ideas on this topic. |
Can we reopen this issue? It has to be fixed. |
It should be already added in #5608 |
OK, I see. This ticket is only about data_size field. I thought it will fix the stride too. E.G. all the images will need to be padded until stride is aligned to 64. |
As they are right now upstream, all the assets (C array files) can not be processed by the GPU. |
It can be done in run time by calling image_decoder_open with args bool lv_vg_lite_buffer_open_image(vg_lite_buffer_t * buffer, lv_image_decoder_dsc_t * decoder_dsc, const void * src,
bool no_cache)
{
LV_ASSERT_NULL(buffer);
LV_ASSERT_NULL(decoder_dsc);
LV_ASSERT_NULL(src);
lv_image_decoder_args_t args;
lv_memzero(&args, sizeof(lv_image_decoder_args_t));
args.premultiply = !lv_vg_lite_support_blend_normal();
args.stride_align = true;
args.use_indexed = true;
args.no_cache = no_cache; |
Recomposing the image is inefficient. My approach is that all image files (c array files) to be already aligned to a stride (we can chose 64 bytes to comply with any GPU) so that those images can be processed right away. https://lvgl.io/tools/imageconverter_v9 Is it this one? The clients are aware of the stride alignment requirements and they should pick images to satisfy this need. |
Yes, this is the script to generate images meet GPU, you need to specify the align parameter in command line.
I haven't done this because for software renderer, alignment is not needed. For performance evaluation, we internally create real scene for them using correct aligned images. |
We have as well internal images to test the GPU. But we want to have the possibility to run the benchmark out of the box. It should be doable. |
Introduce the problem
Current C-array image resources don't have
data_size
filed set, thus caused issues mentioned in below PR, where it's used to invalidate cache. It could also be used to make draw buffer stride alignment etc.#5200 (comment)
Proposal
Ideally all PNGs should be put into a directory, simply re-run image converter script can update them all.
The text was updated successfully, but these errors were encountered: