PDA

View Full Version : which internal format should be use for 10bit img



pango
09-17-2008, 12:32 AM
my program download a 10bit image(called v210) to a texture,use a shader to unpack all pixels and write them into a another texture,then do some image process use Ping-Pong Rendering,finally repack it as 10bit image again and upload from GPU,I had some quesition about my program:

- To keep 10bit color precision,should I set the Ping-Pong Rendering texture's internal format as float one(GL_RGBA16F_ARB/GL_RGBA32F_ARB),can not be GL_RGBA?GL_RGBA only allocate 8bit for every component,so use it,the precision lose will be ineluctable,is it right?

- I prefered the GL_RGBA16F_ARB format,so any one can tell how much size it allocate for every component?I think it is 16bit,is it?

- Does "GL_RGBA16F_ARB" format can preserve 10bit precision?the minimum gray distance of 10bit image is 1/1024.

Jedimaster
02-11-2009, 05:17 AM
look at here http://ati.amd.com/products/pdf/10-Bit.pdf


- To keep 10bit color precision,should I set the Ping-Pong Rendering texture's internal format as float one(GL_RGBA16F_ARB/GL_RGBA32F_ARB),can not be GL_RGBA?GL_RGBA only allocate 8bit for every component,so use it,the precision lose will be ineluctable,is it right?

use RGB10 or RGBA10


- I prefered the GL_RGBA16F_ARB format,so any one can tell how much size it allocate for every component?I think it is 16bit,is it?

the size of FP16 equals to short, 2 bytes, so an RGBA pixels occupy 2x4=8 bytes. You should convert the 10bit integer to half floating format.


Does "GL_RGBA16F_ARB" format can preserve 10bit precision?the minimum gray distance of 10bit image is 1/1024.

Because it's a floating format, so it's much accuracy than integer format.

FP16 is from ILM OpenEXR, but in cinematic production people also use 10bit DPX file to hold color in log-space.

MalcolmB
02-11-2009, 10:08 AM
Because it's a floating format, so it's much accuracy than integer format.


This is not necessarily true. If all of your values are between 0 and 1, you have no use for the sign bit, and the 5-bits of exponent are mostly useless except for values close to 0.

So you have 10-bits of useful precision. Yes it'll work with 10-bit output, but it's not 'much more accurate'.

Brolingstanz
02-11-2009, 01:12 PM
won't be long before we have 30 bit displays for the masses

http://www.theinquirer.net/inquirer/news/651/1036651/hp-develops-billion-colour

Old news, but good news I thought.

MalcolmB
02-11-2009, 02:00 PM
Dell already has 30-bit displays for 400$ or so. Any of their UltraSharp series.
I've tested 30-bit OpenGL windows on them, works very well.

Bruce Wheaton
02-11-2009, 04:25 PM
Take a search for v210 - it's been discussed a few times. There isn't a widely used internal format that matches it (there is one, something like RGB1010102).

You will have to use 8-bit or 16-bit RGBA and then use a shader to extract the correct components.

Bruce

Bruce Wheaton
02-11-2009, 04:32 PM
Oh, also, good link that AMD thing, but it's only close to v210, not really a match (v210 is YUV, for a start). And to the original question, yes, I believe 16 bit floating point will be enough resolution to not cause any visible shift when passing through it. Remember though that v210 has a video transfer function, and Half is linear.

Bruce

Jedimaster
02-12-2009, 03:04 AM
Because it's a floating format, so it's much accuracy than integer format.


This is not necessarily true. If all of your values are between 0 and 1, you have no use for the sign bit, and the 5-bits of exponent are mostly useless except for values close to 0.

So you have 10-bits of useful precision. Yes it'll work with 10-bit output, but it's not 'much more accurate'.

Ja, I forgot to add a word "keep numeric precision"