opencl - Meaning of CL_UNORM_INT8 for cl_image_format.image_channel_data_type, and its diffrence with other data types -
everyone! i'm not clear meaning of cl_unorm_int8, 1 of available choice of value of cl_image_format.image_channel_data_type; what's specific type, , what's difference cl_unsigned_int8?
as far storage concerned, these types identical. in both cases, each pixel channel value stored 8-bit integer, values in range 0-255. difference comes when reading/writing image kernel.
for cl_unsigned_int8
type, use read_imageui
, write_imageui
functions access image. these functions return (or accept) unsigned integer, values in same range storage type.
for cl_unorm_int8
type, use read_imagef
, write_imagef
functions access image. these functions return (or accept) normalised floating point value, in range 0.0f
- 1.0f
. devices (e.g. gpus) have hardware support normalising texture values, conversion between integer , normalised floating point values efficient.
Comments
Post a Comment