[cairo] cairo Summer-of-code participant introduction
guofu85 at gmail.com
Tue Apr 22 20:02:15 PDT 2008
My name is Guofu Xie, a graduate student from Graduate University of Chinese
Academy of Sciences, Beijing, China. My major is Computer Graphics. This is
my first year for GSoC, thank you for giving me the chance.
My project is aim to implement support for HDR images in cairo. First I will
implement the scRGB color space, in which each color channel has 16 bit.
Second, I will extend the pixman library to support the new format of the
image surface. In addition, I will use some tone mapping algorithms to
represent HDR images on display media better.
My proposal is below and I hope you give me some advice.
High Dynamic Range (HDR) images exceed the visualization capabilities of
display and print media. It is widely used to capture a higher dynamic range
of the viewed scene, from the dark shadows all the way up to bright lights
or reflected highlights.
Current Cairo library does not provide the HDR image surface, and the
current color space can not represent the new image format. In order to
effectively utilize the display capabilities, I will use scRGB color space
to encode and compress the HDR image and extend the pixman library to
support the new format.
The following tasks are to be developed in the project:
1) Implement the scRGB color space
2) Extend the pixman library to support the new format
My efforts will actually be separate tasks to complete.
First, I will implement the scRGB color space. scRGB is an RGB (Red Green
Blue) color space created by Microsoft for use in its GDI+ API in Windows
Vista. It uses identical color primaries and white/black points as the sRGB
color space, but uses 16-bit floating point (half precision) linear values
instead of gamma compressed 8-bit integers. It allows values outside of the
[0..1] range, creating a much larger effective gamut. It also has greater
precision because the half-precision format has a 10-bit significand.
In my solution, the 16-bit floating-point data type is implemented as a C
struct, half, which is designed to behave as much as possible like the
standard floating-point data types built into the C language. half numbers
have 1 sign bit, 5 exponent bits, and 10 mantissa bits. The interpretation
of the sign, exponent and mantissa is analogous to IEEE-754 floating-point
numbers. half supports normalized and denormalized numbers, infinities and
NANs (Not A Number). The range of representable numbers is roughly 6.0×10-8
- 6.5×104; numbers smaller than 6.1×10-5 are denormalized. Conversions from
float to half round the mantissa to 10 bits; the 13 least significant bits
are lost. Conversions from half to float are lossless; all half numbers are
exactly representable as float values.
Second, I will add the member CAIRO_FORMAT_ARGB64 in enum variance
_cairo_format_t, which is used to identify the memory format of image data.
In the format, each pixel is a 64-bit quantity, with alpha in the upper 16
bits, then red, then green, then blue. The 64-bit quantities are stored
native-endian. Using function cairo_image_surface_create and
cairo_image_surface_create_for_data, the HDR image can be created. And then
I will modify the pixman library to support the new format of image surface.
In enum pixman_format_name_t, I will add the member
PIXMAN_FORMAT_NAME_ARGB64, and in function pixman_format_init, I will
process the PIXMAN_FORMAT_NAME_ARGB64 format.
One problem with HDR has always been in viewing the images. Mundane CRTs,
LCDs, prints, and other methods of displaying images only have a limited
dynamic range. Thus various methods of converting HDR images into a viewable
format have been developed, generally called "tone mapping". In the project,
I will research on how the human eye and visual cortex perceive a scene,
trying to show the whole dynamic range while retaining realistic color and
contrast. In the project, I will present an adaptive logarithmic mapping
approach, which was introduced in Drago et al. . Of course, if there is
enough time, I will implement other tone mapping algorithms, for example,
Fattal et al.  and Mantiuk et al. .
1) Publish my goals to the Cairo community and try to get some feedback and
suggestions on my plans. I will get familiar with the specific Cairo
internals that I require for my work. (Until mid of June)
2) Implement tasks in the order they are specified above. That means that I
will begin with the implementation of the scRGB, the new format of image
surface and HDR tone mapping algorithms. I will try to implement things so
that they can be used despite they are not completely finished. (Until
beginning or mid of August)
3) Testing tasks with the help of the Cairo community. This will begin as
soon as one component is finished and should be completed by the end of
I am a first year graduate student of Institute of Software, Chinese Academy
of Sciences (ISCAS). My major is Computer Graphics. I like it and feel it
very interesting and exciting. My experience in C/C++ is 5 years. Experience
in graphics development and research is almost 2 years.
I usually take part in Open Source activities and am vice-president of the
Open Source Association of my University. In the University, my major is
Software Engineering. I have led some projects, for example Chinese Chess,
AutoCAD secondary development, and student management system. Now I am
researching the fast Ray Tracing, GPU. I hope I can bring the new
development directions for Cairo based on my current research.
 scRGB color space
 Adaptive Logarithmic Mapping For Displaying High Contrast Scenes
 Gradient domain high dynamic range compression
 A Perceptual Framework for Contrast Processing of High Dynamic Range
CG Group, State Key Laboratory of Computer Science, Institute of Software,
Chinese Academy of Sciences(ISCAS)
Email: guofu85 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo