Recent comments

Reply to: RAW data processing   11 years 10 months ago

Is the content of the DNG payload a 16bit/sample stream? Or the unpacked data must be packed somehow after the processing?

Reply to: dcraw_make_mem_thumb   11 years 11 months ago

Could you please specify camera model you use? In most cases thumbnails are JPEG, the RGB case is very rare.
It is possible that somewhat is broken, so I should test with your sample.

Reply to: dcraw_make_mem_thumb   11 years 11 months ago

dcraw_make_mem_thumb() return thumbnail 'as is', no processing is done.
Most RAW formats stores thumbnail in JPEG format.

Reply to: RAW data processing   11 years 11 months ago

The only common way to write RAW files is to write DNG format ones. Adobe DNG SDK can be used for this task.

Reply to: Skipped lines in Raw-Processing   11 years 11 months ago

This issue should be fixed in 0.15-Beta2 and later:

#if defined(WIN32) && !defined(__MINGW32__)
	virtual const wchar_t* wfname(){ return NULL;};
	virtual int         subfile_open(const wchar_t*) { return -1;}
#endif
Reply to: Skipped lines in Raw-Processing   11 years 11 months ago

LightRoom 'fast load' DNGs are supported only in LibRaw 0.15

Reply to: Skipped lines in Raw-Processing   11 years 11 months ago

Found out this is an issue with <=0.14-7 and is fixed since 0.15-alpha1 because of using the 9.17th version of dcraw..

Also kind of fixed my mingw compiling issue with 0.15-beta2: MinGw also defines the WIN32 flag resulting in using the not existing wchar_t type. I had to throw out theese defines in like 5 source files to fix this but now it works.. so what i basically would advice is to change the check if WIN32 is defined into ( WIN32 && !MINGW ).. then it should compile without issues..

Reply to: Skipped lines in Raw-Processing   11 years 11 months ago

I investigated the issue further and dumped the raw bayer values from .imgdata.rawdata.raw_image. The issue i described above is already present in the bayer data itself, so i assume the problem lies in the unpack function and not in the furthor processing.

Reply to: libraw_iparams_t read struct   11 years 11 months ago

These parameters are accessible via imgdata.idata sub-structure.

Reply to: Fatal signal 11 (SIGSEGV)   11 years 11 months ago

Fixed everything and it was completely user error. The calls were threaded and hence the logging was misleading as to where the crashing occurred.

Taught myself coding mainly in Java/C#, so memory issues in c are over my head. Sorry to bother you with silly issues.

Now that it's working however I just wanted to say it's running great and extremely fast. Previously I was running threads off separate dcraw library builds (ghetto, but it let me thread). This is much much cleaner and faster to boot. Thanks!!!

Reply to: Fatal signal 11 (SIGSEGV)   11 years 11 months ago

You may call LibRaw::recycle()
You don't *need* to do this because recycle() is called in the beginning of each open_buffer().

Reply to: Fatal signal 11 (SIGSEGV)   11 years 11 months ago

Thanks for the quick response. In the case of the second segment of code, I was trying to create a "canDecode" method to test with. I was still getting the memory error there. Is there anything I must do to clean up after an open_buffer call fails?

Reply to: Fatal signal 11 (SIGSEGV)   11 years 11 months ago

For non-image file LibRaw will return LIBRAW_FILE_UNSUPPORTED return code.
This error is not 'fatal', so LIBRAW_FATAL_ERROR is 'false' for this return code.

It is better to compare return code with LIBRAW_SUCCESS.

dcraw_make_mem_thumb() will return NULL pointer to image variable, so image->data_size will result to memory access error.

Reply to: Fatal signal 11 (SIGSEGV)   11 years 11 months ago

I've also created a test with various releases for the byte array data, but always the same error on non image files:

	LibRaw RawProcessor;
	jsize len = env->GetArrayLength(bufferBytes);
	//jbyte* buffer = env->GetByteArrayElements(bufferBytes, 0);
	jbyte* buffer;
	env->GetByteArrayRegion(bufferBytes, 0, len, buffer);
	int result = RawProcessor.open_buffer(buffer, len);
	//env->ReleaseByteArrayElements(bufferBytes, buffer, 0);
	if (result == 0)
		RawProcessor.recycle();
Reply to: LibRaw 0.15.0-Beta 1 Compile error with mingw   11 years 11 months ago

wchar_t* interface is disabled for MinGW in 0.15 Beta2

Reply to: Segmentation fault when called subtract_black() version LibRaw-0.15.0-Beta1   11 years 11 months ago

And it is now in 0.15-Beta2: return type of subtract_black() is changed to int, returns according to LibRaw convention (0 on success, error code on error)

Reply to: Segmentation fault when called subtract_black() version LibRaw-0.15.0-Beta1   12 years 14 hours ago

BTW, thanks for bugreport. I'll add new processing stage to internals and subtract_black() will check that raw2image is called.

Reply to: Segmentation fault when called subtract_black() version LibRaw-0.15.0-Beta1   12 years 14 hours ago

LibRaw::raw2image() allocates imgdata.image[] array and copies data from internal storage (different for Bayer and non-bayer images) to this array.
No demosaic, no black subtration, this is for developers who want to do processing by hand.

So, three ways exists:
- unpack() + raw2image() - this produce internal data compatible with old LibRaw (0.9-0.13)
- unpack + dcraw_process() - for full processing
- only unpack() but you need to know LibRaw internals, because different data types (bayer vs non-bayer) are stored in different way.

Sure, internals may change in future LibRaw releases, so it is safer to use unpack() + raw2image, although it requires extra RAM.

Reply to: Segmentation fault when called subtract_black() version LibRaw-0.15.0-Beta1   12 years 15 hours ago

No, I try only call unpack(), the application works directly over raw data.

substract_black() works only over demosaicing data ?

Thank's a lot.

Reply to: LibRaw 0.15.0-Beta 1 Compile error with mingw   12 years 20 hours ago

It looks like wchar_t strings are not supported in MinGW's libstdc++. I'll try to reproduce before next beta wiil be released.

Reply to: Problem with mingw   12 years 20 hours ago

This is LibRaw calls. So, it looks like you do not properly link with LibRaw

Reply to: Cannot figure out correct color conversion   12 years 20 hours ago

1) Black should be subtracted before demosaic
2) Look into convert_to_rgb code:
to get output matrix, the rgb_cam matrix is multiplied to color space matrix. The rgb_cam is produced by cam_xyz_coeff() call

Reply to: Will be possible to change name of struct tiff_tag into libraw_internal.h ?   12 years 20 hours ago

Thank you for your proposal, sure it is possible

Reply to: Segmentation fault when called subtract_black() version LibRaw-0.15.0-Beta1   12 years 20 hours ago

Do you called raw2image() before calling subtract_black() ?

Reply to: LibRaw 0.15.0-Alpha4   12 years 1 month ago

Thanks! I'll check it out.

Pages