BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: EVE4 1024 x 600 resolution with EVE Asset Builder Image Convert  (Read 10235 times)

vdc

  • Newbie
  • *
  • Posts: 35
    • View Profile

Hi all.

I just got a new EVE4 from Riverdi (RVT70HSBNWC00-B) with 1024 x 600 resolution.

I tried to convert an image to RGB565 bitmap with EVE Asset Builder and I got message that the size of the .raw file from the 1024x600 images is exceeds 1MB. I guess because the RAM_G only have 1MB.

Is there any possible way to convert 1024x600 image file to bitmap that less than 1MB so it can be able to use Gpu_CoCmd_FlashRead to display an image from the flash with this resolution.

I think about other format like PALETTED565 but I found that the RGB565 give the best resolution on my project.

RGB565 is good because it easy to run on MCU code

---------------------------------------------------
Screen_PreCode();

Gpu_CoCmd_FlashRead(phost, RAM_G, 4096, 768000);
Gpu_CoCmd_SetBitmap(phost, RAM_G, RGB565, 800, 480);
App_WrCoCmd_Buffer(phost, BEGIN(BITMAPS));
App_WrCoCmd_Buffer(phost, VERTEX2II(0, 0, 0, 0));
App_WrCoCmd_Buffer(phost, END());

Screen_PostCode();
---------------------------------------------------

This code work perfect for 800x480 since the image I converted to bitmap is less than 1MB.

Any suggestion for 1024x600 resolution? I do see Riverdi also released an 1280x800 resolution on EVE4.



Best regards,
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: EVE4 1024 x 600 resolution with EVE Asset Builder Image Convert
« Reply #1 on: March 19, 2021, 02:21:55 PM »

You already got one? Nice.

Yes, RAM_G is the issue, use ASTC format, 8x8 for example.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 743
    • View Profile
Re: EVE4 1024 x 600 resolution with EVE Asset Builder Image Convert
« Reply #2 on: March 19, 2021, 03:08:42 PM »

Hi,

Yes, as you mentioned Rudolph, you can display from flash as ASTC format or you could use a lower quality image format in RAM_G   (for example RGB565 uses two bytes per pixel whereas RGB332 uses only 1 and so is half the size but the color depth wont be as good)

Best Regards, BRT Community
Logged

vdc

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: EVE4 1024 x 600 resolution with EVE Asset Builder Image Convert
« Reply #3 on: March 19, 2021, 03:40:00 PM »

Hi,

I used COMPRESSED_RGBA_ASTC_4x4_KHR and I do see some lost of quality. Is there any other option that can keep the quality as same as RGB565?

Thanks,
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: EVE4 1024 x 600 resolution with EVE Asset Builder Image Convert
« Reply #4 on: March 22, 2021, 10:15:00 PM »

What kind of image are you using that you see a loss of quality with ASTC 4x4?

I converted a close-up shot of a cat down to 1296x728 and converted this to 8 different
ASTC versions: 4x4, 5x4, 5x5, 6x5, 6x6, 8x5, 8x6 and 8x8.

The display I am testing with is an EVE3-50G, it "only" has a 800x480 screen with 5" and "only" a BT815.
The eight ASTC images just fit in the 4MB flash on the display - hence the resolution.

The map file looks like this:
unified.blob                                                   : 0       : 4096
cat-2969932_1296x728_1296x728_COMPRESSED_RGBA_ASTC_4x4_KHR.raw : 4096    : 943488
cat-2969932_1296x728_1300x728_COMPRESSED_RGBA_ASTC_5x4_KHR.raw : 947584  : 757120
cat-2969932_1296x728_1300x730_COMPRESSED_RGBA_ASTC_5x5_KHR.raw : 1704704 : 607360
cat-2969932_1296x728_1296x730_COMPRESSED_RGBA_ASTC_6x5_KHR.raw : 2312064 : 504576
cat-2969932_1296x728_1296x732_COMPRESSED_RGBA_ASTC_6x6_KHR.raw : 2816640 : 421632
cat-2969932_1296x728_1296x730_COMPRESSED_RGBA_ASTC_8x5_KHR.raw : 3238272 : 378432
cat-2969932_1296x728_1296x732_COMPRESSED_RGBA_ASTC_8x6_KHR.raw : 3616704 : 316224
cat-2969932_1296x728_1296x728_COMPRESSED_RGBA_ASTC_8x8_KHR.raw : 3932928 : 235904

On a touch-event my code loads the next image from flash to RAM_G:
Code: [Select]
case 10:
if(toggle_lock == 0)
{
toggle_lock = 42;
image++;
image &= 0x07;

switch(image)
{
case 0:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 4096, 943488);
break;
case 1:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 947584, 757120);
break;
case 2:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 1704704, 607360);
break;
case 3:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 2312064, 504576);
break;
case 4:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 2816640, 421632);
break;
case 5:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 3238272, 378432);
break;
case 6:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 3616704, 316224);
break;
case 7:
EVE_cmd_memzero(0, 950000);
EVE_cmd_flashread(0, 3932928, 235904);
break;
}
}
break;

And to display the image I am using this:
Code: [Select]
switch(image)
{
case 0:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_4x4_KHR, 1296, 728);
break;
case 1:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_5x4_KHR, 1296, 728);
break;
case 2:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_5x5_KHR, 1296, 728);
break;
case 3:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_6x5_KHR, 1296, 728);
break;
case 4:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_6x6_KHR, 1296, 728);
break;
case 5:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_8x5_KHR, 1296, 728);
break;
case 6:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_8x6_KHR, 1296, 728);
break;
case 7:
EVE_cmd_setbitmap_burst(0, EVE_COMPRESSED_RGBA_ASTC_8x8_KHR, 1296, 728);
break;
}

EVE_cmd_dl_burst(DL_BEGIN | EVE_BITMAPS);
EVE_cmd_dl_burst(VERTEX2F(0, 0));
EVE_cmd_dl_burst(DL_END);

Plus I print out the number stored in the variable "image" on the screen.

Now for some unknown reason I can not get 4x4, 5x4 and 5x5 to display properly.
And yes, I have seen that the image converter noted a different resolution for 5x4 and 5x5.
But when I play with the resolution all I get is pixel trash.

The other 5 work just fine though.
And I have to say, I do not see any difference between 6x5, 6x6, 8x5, 8x6 and 8x8.
Not even under a magnifying glas.

The image I am using is this one:
https://pixabay.com/de/photos/katze-fl%C3%BCge-augen-hautnah-tier-2969932/
I downloaded the 1920x1080 version, scaled it and saved it again as .jpg with 90% quality.

And it's just brilliant, the eyes, the hairs, a myriad of details and no compression fragments.
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: EVE4 1024 x 600 resolution with EVE Asset Builder Image Convert
« Reply #5 on: April 02, 2021, 03:57:59 PM »

I am just preparing a new test and noticed that the ASTC table in the programming guide  is partially wrong.

Table 12, page 58:
COMPRESSED_RGBA_ASTC_8x8_KHR 37815 2.56
COMPRESSED_RGBA_ASTC_10x5_KHR 37816 2.13
COMPRESSED_RGBA_ASTC_10x6_KHR 37817 2.00

This would be correct:
COMPRESSED_RGBA_ASTC_8x8_KHR 37815 2.00
COMPRESSED_RGBA_ASTC_10x5_KHR 37816 2.56
COMPRESSED_RGBA_ASTC_10x6_KHR 37817 2.13

See https://developer.nvidia.com/astc-texture-compression-for-game-assets for example.
But this is also confirmed by the resulting file-sizes.


Edit: https://github.com/RudolphRiedel/EVE_ASTC_Test_Arduino_PlatformIO

« Last Edit: April 02, 2021, 07:14:20 PM by Rudolph »
Logged