4 ms·
> The vast majority of images are jpegs, which are internally 420 YUV, but they get converted to 32 bit RGB for use in apps. Using native YUV formats would sav
by lnanek2 5y ago
> The vast majority of images are jpegs, which are internally 420 YUV, but they get converted to 32 bit RGB for use in apps. Using native YUV formats would save
...
> You can do it today, but you need to do the color conversion manually in a shader, which can be a big ask for some devs
Where the perf. really matters, and shaders are involved, doesn't everyone use texture compression formats like ETC1 and PVRTC?
https://developer.android.com/guide/playcore/asset-delivery/texture-compression https://developer.android.com/guide/playcore/asset-delivery/...
- cornstalks 5y agoETC1/PVRTC are lossy. If your source material is 4:2:0 then it's best to just stay with it. If you convert to RGB and then compress you don't really gain anything except a slight reduction in quality.
- vardump 5y ago> and shaders are involved, doesn't everyone use texture compression formats like ETC1 and PVRTC? Yes, when they can pay the computational price for compression beforehand. Not going to work, if you had to compress in realtime.
- corysama 5y agoThey are used widely in games. But, not so much elsewhere. Non-game-app designers get upset by the artifacts. I've shipped games using them for UI. We were hapy to tolerate the artifacts in exchange for the 8X memory usage & memory bandwidth reduction (RGBA8888 vs. PVTRC4). However, I've heard that Netflix was one of the first sponsors of https://github.com/BinomialLLC/basis_universal https://github.com/BinomialLLC/basis_universal They are shipping innumerable images to a huge variety of underpowered set top boxes. Totally worth investing in a giant-leap memory optimization.