[CinePaint-dev] 10 bit? why not 16?
Deep paint and stop-motion animation software
Brought to you by:
robinrowe
From: Greg B. <j.g...@gm...> - 2008-10-24 15:32:18
|
Using OpenGL, it is so easy to use GL_UNSIGNED_INT_2_10_10_10_REV for 10 bit but just as easy to use GL_RGBA with GL_UNSIGNED_SHORT or GL_FLOAT for 16 or 32 bit support. Using GL_RGBA in place of GL_UNSIGNED_INT_2_10_10_10_REV avoids all those slow bit shifting and masking operations. Instead of using something like typedef {unsigned short r:10, g:10, b:10, a:2} pix10bit; use typedef {unsigned short r, g, b, a} pix16bit; Look at the assembler code generated with both methods and you with see the nasty bit shift and mask operations with the pix10bit approach. Benchmarking, pix10bit is several time slower compared to pix16bit. Greg Blair -- Please update your address book. My email address has changed. |