Changing parameters without reloading/unpack()

Hi.

I wonder if it is possible to first call:
open_file(...)
unpack()

And then to call several times dcraw_process() -after changing pre_mul for example- without calling recycle(), open_file(...) and unpack() again?

Would memcpying imgdata.image after unpack and back do the trick?

Thanks,

Sylvain.

Forums: 

You can call dcraw_process()

You can call dcraw_process() multiple times, no additional data move needed.

-- Alex Tutubalin @LibRaw LLC

I thought that unpack() was

I thought that unpack() was filling imgdata.image with non demosaiced data (only one component per pixel on Bayer layouts), and that dcraw_process() was reading those values and filling the missing components in the same buffer using its demosaicing algorithm...

Is dcraw_process() reading it's non demosaiced data from another buffer than imgdata.image?

Ok. I was confused with

Ok. I was confused with raw2image().
So after unpack(), an unaltered version of the unpacked data is kept elsewhere than imgdata.image.... Thank you... :)

Well, I've done tests about

Well, I've done tests about this, which didn't work.
Here is my workflow:

open_file
set pre_mul
unpack
dcraw_process(1)
change pre_mul
dcraw process(2)

Change pre_mul gets ignored.
I've tried with adding unpack just before dcraw_process(2), but change pre_mul is still ignored.

That's no big deal for me, I simply recycle() and (re)opent(). I just wanted to keep you posted... ;)
Sylvain.

Thank you! I had missed that

Thank you! I had missed that one!

Is user_mul being used in unpack() or just in dcraw_process()?
In other terms, do I have to:

change user_mul
unpack()
dcraw_process()

or is it enougth to:

change user_mul
dcraw_process()?

Sylvain.