3 ms·
As this is the number 1 story on HN now: can someone explain what kind of improvements we will see in day to day use from this?
by janvdberg 12y ago
As this is the number 1 story on HN now: can someone explain what kind of improvements we will see in day to day use from this?
- ams6110 12y agoFrom the story.... 1. Image conversion (RGB structure to some other) 2. N-dimentional coordinates. (Normalize array of XYZ points) 3. Multiplication of vectors by constant matrix
- azraai 12y agoFaster multi dimensional loops. Quicker raw image compression. That are few things that came across my mind.
- _wmd 12y agoThe article mentions two: unpacking 24 bit values and matrix multiplication, both might be something you'd find in a software video (de)compressor or a computer game
- vinkelhake 12y agoWhere did you get 24 from? It's about vectorizing loads of 3 elements. The elements don't have to be 8-bit. The second example uses floats.
- cwp 12y agoYeah, but 24-bit values (RBG) are what you'd find in video and gaming applications.
- vardump 12y agoGames, at least what I've seen, usually just don't use 3x(8|16|32) bits per pixel, if it's not needed as alpha. It's pretty rare to pack 24/48/96-bit pixels in memory. Traditionally, unaligned loads are just not worth it. Sometimes packed formats were worth it. I remember doing RLE schemes for fast "alpha blending" (anti-aliased blitting really!) back in 2000 or so, before MMX or GPUs were common. The scheme I used had three different types of run lengths. Completely transparent, pre-multiplied alpha blended and completely opaque. 16-bit pre-multiplied values were in memory in 32-bit format like this: URGBU00A. Groups of 5 bits, except U denotes unused single bit. Frame buffer in RAM was in 15 bit format, 0RRRRRGGGGGBBBBB. With this scheme, alpha-blending needed totally just one multiply per pixel [1], compared to three with usual pre-multiplied alpha or six with normal alpha without pre-multiplication. [1]: Frame buffer pixels were masked and shifted into 000000GGGGG000000RRRRR00000BBBBB, multiplied by A and shifted back in place. Because all values were 5 bit entities, no overflow (overlap) could occur in multiply, thus one multiply yielded 3 multiplied frame buffer pixel values, for R, G and B!
- kayamon 12y agoPresumably loading a 3D vector would be a good use-case?