1
edit
Changes
Nameless
,→Progress
As well as the call graph diagram:
[[File:Call.jpg]]
<u>'''Yiqi's Findings'''</u>
* The subject: RAW photo processing using the (commonly used) open source DCRaw library by Dave Coffin
* Library/program source file web page: https://www.cybercom.net/~dcoffin/dcraw/dcraw.c
* The script runProfile.sh in the submitted zip file executes the make command, run the profiling, and display the result
* Findings: the hot spot of the dcraw library is the ahd_interpolate() function, which contains large amount of loops, thus should be suitable of parallelization using GPU
* Although the time to process an individual image is not really long, for a batch of images, the time saving could be significant
* Here is the profiling result:
<pre>
real 0m15.020s
user 0m13.653s
sys 0m1.016s
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
30.34 3.68 3.68 ahd_interpolate()
26.71 6.92 3.24 45411856 0.00 0.00 cielab(unsigned short*, short*)
9.40 8.06 1.14 convert_to_rgb()
8.74 9.12 1.06 write_ppm_tiff()
8.57 10.16 1.04 lossless_jpeg_load_raw()
4.29 10.68 0.52 scale_colors()
3.54 11.11 0.43 crop_masked_pixels()
3.22 11.50 0.39 23384000 0.00 0.00 getbithuff(int, unsigned short*)
3.13 11.88 0.38 3950 0.10 0.24 ljpeg_row(int, jhead*)
1.48 12.06 0.18 23384000 0.00 0.00 kodak_c603_load_raw()
0.49 12.12 0.06 pre_interpolate()
0.08 12.13 0.01 1 10.00 10.00 border_interpolate(int)
0.00 12.13 0.00 42 0.00 0.00 tiff_get(unsigned int, unsigned int*, unsigned int*, unsigned int*, unsigned int*)
0.00 12.13 0.00 26 0.00 0.00 get2()
0.00 12.13 0.00 26 0.00 0.00 get4()
0.00 12.13 0.00 5 0.00 0.00 getreal(int)
0.00 12.13 0.00 4 0.00 0.00 parse_tiff_ifd(int)
0.00 12.13 0.00 3 0.00 0.00 parse_tiff(int)
0.00 12.13 0.00 3 0.00 0.00 ljpeg_start(jhead*, int)
0.00 12.13 0.00 2 0.00 0.00 make_decoder_ref(unsigned char const**)
0.00 12.13 0.00 1 0.00 0.00 apply_tiff()
0.00 12.13 0.00 1 0.00 0.00 parse_exif(int)
0.00 12.13 0.00 1 0.00 0.00 adobe_coeff(char const*, char const*)
0.00 12.13 0.00 1 0.00 0.00 cam_xyz_coeff(float (*) [4], double (*) [3])
0.00 12.13 0.00 1 0.00 0.00 pseudoinverse(double (*) [3], double (*) [3], int)
0.00 12.13 0.00 1 0.00 0.00 parse_makernote(int, int)
0.00 12.13 0.00 1 0.00 0.00 parse_gps(int)
</pre>
=== Assignment 2 ===
=== Assignment 3 ===