CarVac / librtprocess

A project to make RawTherapee's processing algorithms more readily available.
Other
51 stars 23 forks source link

rcd demosaic: speedup and reduced memory usage #60

Closed heckflosse closed 3 years ago

heckflosse commented 3 years ago

@butcherg @CarVac

Can you please test?

butcherg commented 3 years ago

I set up a special rawproc "test stand" for librtprocess, been meaning to do this for a while...

Added ,true to the rcd_demosaic() call. The rcd_speedup_new branch is running ~0.4sec slower than master:

glenn@bena:~/ImageStuff/rawproc-librtprocess/rawproc/build-linux$ time src/img -f "DSG_3111.NEF:rawdata=crop" demosaic:rcd foo.jpg
configuration file: /home/glenn/.rawproc/rawproc.conf
number of input files to be processed: 1

1/1: Loading file DSG_3111.NEF rawdata=crop... done. (0.519273sec)
Image size: 4948x3280
demosaic: rcd (24 threads, 0.208562sec)
Saving file foo.jpg ... done. (0.050079sec)

1 file processed.
glenn@bena:~/ImageStuff/rawproc10/rawproc/build-linux$ time src/img -f "/home/glenn/Photography/rawproc/DSG_3111.NEF:rawdata=crop" demosaic:rcd foo.jpg
configuration file: /home/glenn/ImageStuff/rawproc10/rawproc/build-linux/src/rawproc.conf
number of input files to be processed: 1

1/1: Loading file /home/glenn/Photography/rawproc/DSG_3111.NEF rawdata=crop... done. (0.519238sec)
Image size: 4948x3280
demosaic: rcd (24 threads, 0.167909sec)
Saving file foo.jpg ... done. (0.054967sec)

1 file processed.
heckflosse commented 3 years ago

@butcherg Thanks for testing. I will investigate...

heckflosse commented 3 years ago

@butcherg On my really old 8-core AMD FX8350 I measure ~300 ms for a 8280 x 5512 raw... strange...

butcherg commented 3 years ago

@heckflosse , did I need to compile librtprocess with -fopenmp?

heckflosse commented 3 years ago

@butcherg openmp is enabled by default

heckflosse commented 3 years ago

I compared processing time of RT rcd with librtprocess rcd. RT version is 25% faster, but I don't know why... Searching...