Author Topic: Pre-etc1-compressed texture  (Read 1117 times)

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Pre-etc1-compressed texture
« on: November 02, 2014, 01:01:41 pm »
Hi Egon,

It seems like compressing texture takes a big amount of time to process. According to log, it takes around ~2306ms just to compress all textures. It would be great if we can provide the pre-compressed texture so it would be faster to process and we can save more battery. In my case, user will check how much battery my live wallpaper will consume in the phone settings. If users open and close the live wallpaper for multiple times, the battery consumption shoots really high because of the app initialization, which they will start complaining about the app.

For reference, here's the log during texture compression (Tested on Samsung Galaxy S4 with octa cores):
Code: [Select]
11-02 19:25:22.366: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.366: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:22.366: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:22.401: I/jPCT-AE(32481): ...done in 35/31ms
11-02 19:25:22.401: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:22.401: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:22.416: I/jPCT-AE(32481): ...done in 13/11ms
11-02 19:25:22.416: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:22.416: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 3/3ms
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.421: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:22.421: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:22.421: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:22.421: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:22.426: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.426: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:22.426: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:22.426: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.436: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.436: I/jPCT-AE(32481): Compressing texture (256*256) to ETC1...
11-02 19:25:22.436: I/jPCT-AE(32481): Creating byte buffer of size 196608
11-02 19:25:22.576: I/jPCT-AE(32481): ...done in 137/113ms
11-02 19:25:22.576: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:22.576: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:22.611: I/jPCT-AE(32481): ...done in 33/28ms
11-02 19:25:22.611: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:22.611: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:22.621: I/jPCT-AE(32481): ...done in 10/7ms
11-02 19:25:22.621: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:22.621: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:22.621: I/jPCT-AE(32481): ...done in 3/2ms
11-02 19:25:22.621: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:22.621: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:22.626: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:22.626: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:22.626: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:22.626: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:22.626: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:22.626: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:22.626: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.626: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:22.626: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:22.626: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.626: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:22.626: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:22.626: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.636: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.646: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.646: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:22.646: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:22.681: I/jPCT-AE(32481): ...done in 34/29ms
11-02 19:25:22.681: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:22.681: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:22.691: I/jPCT-AE(32481): ...done in 10/7ms
11-02 19:25:22.691: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:22.691: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:22.691: I/jPCT-AE(32481): ...done in 3/2ms
11-02 19:25:22.691: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:22.691: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:22.696: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:22.696: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:22.696: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:22.696: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:22.696: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:22.696: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:22.696: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.696: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:22.696: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:22.696: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:22.696: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:22.696: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:22.696: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.706: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.741: D/dalvikvm(32481): GC_FOR_ALLOC freed 8063K, 34% free 28251K/42784K, paused 36ms, total 36ms
11-02 19:25:22.746: I/jPCT-AE(32481): Compressing texture (256*256) to ETC1...
11-02 19:25:22.746: I/jPCT-AE(32481): Creating byte buffer of size 196608
11-02 19:25:22.871: I/jPCT-AE(32481): ...done in 128/107ms
11-02 19:25:22.876: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:22.876: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:22.906: I/jPCT-AE(32481): ...done in 32/27ms
11-02 19:25:22.906: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:22.906: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:22.916: I/jPCT-AE(32481): ...done in 9/7ms
11-02 19:25:22.916: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:22.916: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:22.916: I/jPCT-AE(32481): ...done in 2/1ms
11-02 19:25:22.921: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:22.921: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:22.921: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:22.921: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:22.921: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:22.921: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:22.921: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:22.921: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:22.921: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.921: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:22.921: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:22.921: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.921: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:22.921: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:22.921: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:22.931: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.941: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:22.946: I/jPCT-AE(32481): Compressing texture (256*256) to ETC1...
11-02 19:25:22.946: I/jPCT-AE(32481): Creating byte buffer of size 196608
11-02 19:25:23.081: I/jPCT-AE(32481): ...done in 132/112ms
11-02 19:25:23.081: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:23.081: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:23.126: D/dalvikvm(32481): GC_FOR_ALLOC freed 3452K, 27% free 28635K/38908K, paused 44ms, total 44ms
11-02 19:25:23.161: I/jPCT-AE(32481): ...done in 81/31ms
11-02 19:25:23.166: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:23.166: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:23.176: I/jPCT-AE(32481): ...done in 10/7ms
11-02 19:25:23.176: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:23.176: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:23.176: I/jPCT-AE(32481): ...done in 2/2ms
11-02 19:25:23.176: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:23.176: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:23.181: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:23.181: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:23.181: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:23.181: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.181: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:23.181: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:23.181: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.181: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:23.181: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:23.181: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.181: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:23.181: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:23.181: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.191: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:23.201: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:23.201: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:23.201: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:23.231: I/jPCT-AE(32481): ...done in 32/27ms
11-02 19:25:23.236: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:23.236: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:23.241: I/jPCT-AE(32481): ...done in 10/7ms
11-02 19:25:23.246: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:23.246: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:23.246: I/jPCT-AE(32481): ...done in 3/2ms
11-02 19:25:23.246: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:23.246: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:23.246: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:23.246: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:23.246: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:23.246: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:23.246: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:23.246: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:23.251: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.251: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:23.251: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:23.251: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.251: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:23.251: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:23.251: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.251: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:23.256: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:23.291: D/dalvikvm(32481): GC_FOR_ALLOC freed 3336K, 29% free 27742K/38908K, paused 34ms, total 34ms
11-02 19:25:23.321: D/dalvikvm(32481): GC_FOR_ALLOC freed <1K, 26% free 29790K/39936K, paused 21ms, total 21ms
11-02 19:25:23.336: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:23.346: I/jPCT-AE(32481): Compressing texture (512*512) to ETC1...
11-02 19:25:23.346: I/jPCT-AE(32481): Creating byte buffer of size 786432
11-02 19:25:23.801: I/jPCT-AE(32481): ...done in 458/392ms
11-02 19:25:23.811: I/jPCT-AE(32481): Compressing texture (256*256) to ETC1...
11-02 19:25:23.811: I/jPCT-AE(32481): Creating byte buffer of size 196608
11-02 19:25:23.931: I/jPCT-AE(32481): ...done in 123/105ms
11-02 19:25:23.936: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:23.936: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:23.971: I/jPCT-AE(32481): ...done in 33/26ms
11-02 19:25:23.971: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:23.971: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:23.981: I/jPCT-AE(32481): ...done in 9/6ms
11-02 19:25:23.981: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:23.981: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:23.981: I/jPCT-AE(32481): ...done in 2/2ms
11-02 19:25:23.981: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:23.981: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:23.981: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:23.981: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:23.981: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:23.981: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:23.986: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:23.986: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:23.986: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:23.986: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:23.986: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:23.986: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:23.986: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:23.986: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:23.986: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:24.021: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:24.061: D/dalvikvm(32481): GC_FOR_ALLOC freed 9067K, 38% free 29788K/47904K, paused 39ms, total 39ms
11-02 19:25:24.071: I/jPCT-AE(32481): Compressing texture (512*512) to ETC1...
11-02 19:25:24.076: I/jPCT-AE(32481): Creating byte buffer of size 786432
11-02 19:25:24.611: I/jPCT-AE(32481): ...done in 539/446ms
11-02 19:25:24.621: I/jPCT-AE(32481): Compressing texture (256*256) to ETC1...
11-02 19:25:24.621: I/jPCT-AE(32481): Creating byte buffer of size 196608
11-02 19:25:24.776: I/jPCT-AE(32481): ...done in 156/110ms
11-02 19:25:24.781: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:24.781: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:24.811: I/jPCT-AE(32481): ...done in 34/28ms
11-02 19:25:24.811: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:24.811: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:24.821: I/jPCT-AE(32481): ...done in 9/7ms
11-02 19:25:24.821: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:24.821: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:24.826: I/jPCT-AE(32481): ...done in 3/2ms
11-02 19:25:24.826: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:24.826: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:24.826: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:24.826: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:24.826: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:24.826: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:24.826: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:24.826: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:24.826: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:24.826: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:24.826: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:24.826: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:24.826: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:24.826: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:24.826: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:24.826: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:24.831: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:24.841: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:24.881: D/dalvikvm(32481): GC_FOR_ALLOC freed 5811K, 28% free 28253K/38908K, paused 39ms, total 39ms
11-02 19:25:24.931: D/dalvikvm(32481): GC_FOR_ALLOC freed 769K, 27% free 28767K/38908K, paused 34ms, total 34ms
11-02 19:25:24.931: I/dalvikvm-heap(32481): Grow heap (frag case) to 31.087MB for 1048592-byte allocation
11-02 19:25:24.971: D/dalvikvm(32481): GC_FOR_ALLOC freed 0K, 26% free 29791K/39936K, paused 39ms, total 39ms
11-02 19:25:24.986: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:25.006: I/jPCT-AE(32481): Compressing texture (512*512) to ETC1...
11-02 19:25:25.006: I/jPCT-AE(32481): Creating byte buffer of size 786432
11-02 19:25:25.546: I/jPCT-AE(32481): ...done in 539/444ms
11-02 19:25:25.551: I/jPCT-AE(32481): Compressing texture (256*256) to ETC1...
11-02 19:25:25.551: I/jPCT-AE(32481): Creating byte buffer of size 196608
11-02 19:25:25.671: I/jPCT-AE(32481): ...done in 120/101ms
11-02 19:25:25.676: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:25.676: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:25.706: I/jPCT-AE(32481): ...done in 30/25ms
11-02 19:25:25.706: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:25.706: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:25.716: I/jPCT-AE(32481): ...done in 8/6ms
11-02 19:25:25.716: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:25.716: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:25.716: I/jPCT-AE(32481): ...done in 3/2ms
11-02 19:25:25.716: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:25.716: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:25.716: I/jPCT-AE(32481): ...done in 1/1ms
11-02 19:25:25.721: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:25.721: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:25.721: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:25.721: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:25.721: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:25.721: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:25.721: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:25.721: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:25.721: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:25.721: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:25.721: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:25.721: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:25.726: I/jPCT-AE(32481): Retrieved texture data from disk!
11-02 19:25:25.726: I/jPCT-AE(32481): Compressing texture (128*128) to ETC1...
11-02 19:25:25.726: I/jPCT-AE(32481): Creating byte buffer of size 49152
11-02 19:25:25.756: I/jPCT-AE(32481): ...done in 28/23ms
11-02 19:25:25.756: I/jPCT-AE(32481): Compressing texture (64*64) to ETC1...
11-02 19:25:25.756: I/jPCT-AE(32481): Creating byte buffer of size 12288
11-02 19:25:25.761: I/jPCT-AE(32481): ...done in 8/6ms
11-02 19:25:25.761: I/jPCT-AE(32481): Compressing texture (32*32) to ETC1...
11-02 19:25:25.761: I/jPCT-AE(32481): Creating byte buffer of size 3072
11-02 19:25:25.766: I/jPCT-AE(32481): ...done in 2/2ms
11-02 19:25:25.766: I/jPCT-AE(32481): Compressing texture (16*16) to ETC1...
11-02 19:25:25.766: I/jPCT-AE(32481): Creating byte buffer of size 768
11-02 19:25:25.766: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:25.766: I/jPCT-AE(32481): Compressing texture (8*8) to ETC1...
11-02 19:25:25.766: I/jPCT-AE(32481): Creating byte buffer of size 192
11-02 19:25:25.766: I/jPCT-AE(32481): ...done in 1/0ms
11-02 19:25:25.766: I/jPCT-AE(32481): Compressing texture (4*4) to ETC1...
11-02 19:25:25.766: I/jPCT-AE(32481): Creating byte buffer of size 48
11-02 19:25:25.766: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:25.766: I/jPCT-AE(32481): Compressing texture (2*2) to ETC1...
11-02 19:25:25.766: I/jPCT-AE(32481): Creating byte buffer of size 12
11-02 19:25:25.766: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:25.766: I/jPCT-AE(32481): Compressing texture (1*1) to ETC1...
11-02 19:25:25.766: I/jPCT-AE(32481): Creating byte buffer of size 3
11-02 19:25:25.771: I/jPCT-AE(32481): ...done in 0/0ms
11-02 19:25:25.771: I/jPCT-AE(32481): Pre-warming done!
« Last Edit: November 02, 2014, 01:12:15 pm by kkl »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Pre-etc1-compressed texture
« Reply #1 on: November 02, 2014, 01:52:34 pm »
jPCT-AE doesn't support pre-compressed textures ATM for various reasons. But you should be able to cache them to avoid this additional step on each context change: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#cacheCompressedTextures. Maybe that helps.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Pre-etc1-compressed texture
« Reply #2 on: November 02, 2014, 01:54:23 pm »

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Pre-etc1-compressed texture
« Reply #3 on: November 02, 2014, 02:58:41 pm »
Wao, it's 2x faster now! But only for subsequent use. It's alot slower for the 1st time. I guess I could stick with this for now. Are you planning to support pre-compressed texture anytime soon, or it's long way to go?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Pre-etc1-compressed texture
« Reply #4 on: November 02, 2014, 03:16:43 pm »
Using pre-compressed textures doesn't really fit well into the engine's texture pipeline and for now, i don't really think that the benefits are greater than the drawbacks, so i have no plans to support them any time soon.

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Pre-etc1-compressed texture
« Reply #5 on: November 03, 2014, 03:23:36 pm »
That's too bad~ Really hope JPCT would support pre-compressed texture some day in the future ; )

Just another humble suggestion, how about if we have Texture class to have input from android.R.drawable as id. We can add one setting to determine we should grab the texels on demand. In that case, we can skip the virtualization part and save storage and processing power, bcause I notice storing texels can take some times too.

For illustration example:
Code: [Select]
Config.shouldVirtualizeTexture = true;
Texture t = new Texture(R.drawable.texture1);
//At this point, no texels are grabbed yet, but drawable id is saved.

//1. Later in uploading textures, grab bitmap from android.R.drawable and texels from the bitmap after that in Texture class.
//2. Upload the texels to GPU.
//3. Then dispose the texels and move to next textures.

What do you think? Is it going to be faster in this case? : )

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Pre-etc1-compressed texture
« Reply #6 on: November 03, 2014, 04:44:46 pm »
I don't see why this should be any faster. The time that this would take will be exactly the same plus you would have to reload everything on each context change (i.e. pause/resume). The reason why each Texture instance keeps the texel data is not that it's loaded too early to upload it directly but because it needs this data again to recover from a GL context change.

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Pre-etc1-compressed texture
« Reply #7 on: November 04, 2014, 01:25:08 pm »
You were right.. I tested getting the texels from disk using virtualizer and it's alot faster than getting bitmap using android.R. I guess jpct is still having the best solution so far. Thanks alot egon.