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: Linux ASTC encoder  (Read 176 times)

rascalito

  • Newbie
  • *
  • Posts: 16
    • View Profile
Linux ASTC encoder
« on: July 16, 2022, 11:14:05 AM »

Hello!

I'm trying to make it easier to display bitmaps (i.e. without having to fetch width, height, data name, etc.. here and there).
I made a php script with Ubuntu (PHP8).
Basically I dump a bunch of files in a folder, run the script, and get all the corresponding .h and .cpp files with an option to copy
them directly in the bitmaps folder of my application. And I can call the bitmaps by name.
I'm using Linux' astc encoder (called astcenc), and here is the problem. There are quite a few parameters, a bit obscure to me.
Here is the result. It looks like the keyboard is splitted in two parts, there is a kind of interlace, etc. I'm sure there are people
here who know what happens and could help me.
There are myriads of parameters, and I can't try them one by one.
Does anybody know what parameters are used in EVE asset builder? The output name (the normal image below) is *RGBA_ASTC_8x8_KHR.
Any relation between KHR and LDR / HDR of the linux encoder?

Thanks for any hint!

R


Logged

Kaetemi

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Linux ASTC encoder
« Reply #1 on: July 19, 2022, 07:22:38 PM »

The ASTC blocks for EVE are arranged in a pattern of larger blocks. I'd recommend encoding an image with a number on each square block, and seeing where they end up. That's the easiest way to understand the pattern. :)
Logged

rascalito

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Linux ASTC encoder
« Reply #2 on: July 23, 2022, 06:09:55 AM »

Hello!

Thanks for your reply.
Quote
The ASTC blocks for EVE are arranged in a pattern of larger blocks.

Does it mean that it's not true ASTC?

Is there any documentation explaining how it's encoded from the regular ASTC encoding?

Quote
I'd recommend encoding an image with a number on each square block,

What do you mean? I'm using ASTC8x8 with option thorough.

Do you mean that I should subdivide into 8x8 blocks and write a number in each of these blocks?
8x8 is not very big for writing a number.
Or divide in some larger blocks? In this case which size?

Thanks,

R
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 586
    • View Profile
Re: Linux ASTC encoder
« Reply #3 on: July 25, 2022, 01:06:14 PM »

Hello,

The method we advise using utilises Eve Asset Builder’s (EAB) command line mode and should save you a lot of time.

After installing EAB, you can run the image converter from the installation folder, for example:

“eab_tools  img_cvt  -i C:/Users/Pictures/appleicon.png -f 20 -o C:/Users/Pictures/temp -e thorough -x "C:/Users/Public/Documents/EVE Asset Builder 2.6.0_3.0.0/tools/astcenc.exe" -g”

The input file is “appleicon” and output folder is “C:/Users/Pictures/temp”.

Best regards, BRT Community
Logged

rascalito

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Linux ASTC encoder
« Reply #4 on: July 27, 2022, 08:30:32 AM »

Hello!

What I would like to know is how to convert with Linux. Apparently you are also using a program named astcenc.
There is a program with a similar name on Linux. I have noticed that the linux version has a 16-byte header,
and the asset builder's raw format doesn't. What I would need to know s whether the asset builder is a regular
astcenc  like the one that can be found on GitHub, or whether it's a BridgeTek proprietary format.
For instance Linux' astc encoder does not have a -f option and -g either.

Thanks for any hint.

R

Hello,

The method we advise using utilises Eve Asset Builder’s (EAB) command line mode and should save you a lot of time.

After installing EAB, you can run the image converter from the installation folder, for example:

“eab_tools  img_cvt  -i C:/Users/Pictures/appleicon.png -f 20 -o C:/Users/Pictures/temp -e thorough -x "C:/Users/Public/Documents/EVE Asset Builder 2.6.0_3.0.0/tools/astcenc.exe" -g”

The input file is “appleicon” and output folder is “C:/Users/Pictures/temp”.

Best regards, BRT Community
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 586
    • View Profile
Re: Linux ASTC encoder
« Reply #5 on: July 28, 2022, 02:32:26 PM »

Hello,

1)   The astcenc in EVE Asset Builder (EAB) is a common one which can be found on Github.  It is a copy of ARM ASTC encoder.
2)   EAB did extra work on the output of astcenc , including but not limited to the stripe off of the 16-byte header.
3)   The option “-f” or “-g” are not ASTC specific so you can ignore them.
4)   The enclosed file is a python code which converts one PNG to ASTC raw file for EVE.  Refer to the function “convert()” and note the case of “num_cell == 1”.  The function tile2() shuttles the ASTC tiles for EVE purpose.

Best regards, BRT Community
Logged