Loading Cineon DPX Image Into OpenGL

DPX是一种主要用于电影制作的格式,将胶片扫描成数码位图的时候设备可以直接生成这种对数空间的位图格式,用于保留阴影部分的动态范围,加入输入输出设备的属性提供给软件进行转换与处理。目前DPX格式还没有完全被OpenEXR格式所取代,例如Shake等后期软件还是原生支持这种格式的。DPX支持1、8、10、12、16位整数以及FP32、FP64的浮点数字格式,其中10bit使用最为广泛。10bit DPX的每个像素对应于OpenGL的GL_RGB10_A2的纹理内部格式(Texture Internal Format),而相应的纹理数据格式(Texture Data Type)则是GL_UNSIGNED_INT_10_10_10_2_EXT。将10bit数字转换到浮点数字需要除以1023,然后再转换回到线性空间中。但是需要注意的是为了在显示器上获得精确的预览结果必须用GPU Shader完成转换与色彩管理,也就是需要将图像转换成和本地预览设备的色彩空间相匹配,比如sRGB、Adobe RGB,甚至HDTV。

DPX is the format mainly designed for film scanning, it convert the density of negetive film to log space, keep the dynamics range of shadow part. But the DPX format has not been replaced by OpenEXR, post production software such as Shake support this format very well. We can use 1,8,10,12,16 fixed point number or FP32,FP64 floating number in it. The most widely used is the 10bit format. For loading it in OpenGL we have to use GL_RGB10_A2 internal format and GL_UNSIGNED_INT_10_10_10_2_EXT data format. Warning, to preview correctly, we must make a color management by a GPU shader which can convert the pixels data up to color space of local device such as sRGB, Adobe RGB, even HDTV.

posted on 2009-02-12 00:48  Bo Schwarzstein  阅读(1203)  评论(0编辑  收藏  举报