Recent comments

Reply to: Copyright metadata   1 year 2 months ago

Thanks. I will try using EXIF callback. I come here again if I can't make it work.
Regards

Reply to: Copyright metadata   1 year 2 months ago

Followup: but one may use exif callback and parse/retrieve all EXIF tags: https://www.libraw.org/docs/API-datastruct-eng.html#libraw_callbacks_t

Reply to: Copyright metadata   1 year 2 months ago

Exif tag 0x8298 is not parsed by LibRaw

Reply to: Are the forums searchable?   1 year 2 months ago

Please use google with site: specifier

Reply to: libraw-0.21.1\libraw\libraw_datastream.h(183) : error C3861: 'data': identifier not found   1 year 2 months ago

Thanks - this was a helpful clue. I tried compiling it using a slightly less old version of Visual Studio - VS 2013 - and it worked perfectly.

Thanks for your help and for your excellent library. Stay safe.

:Jack

Reply to: libraw-0.21.1\libraw\libraw_datastream.h(183) : error C3861: 'data': identifier not found   1 year 2 months ago

return this->operator[](_fpos - _bstart);

Reply to: libraw-0.21.1\libraw\libraw_datastream.h(183) : error C3861: 'data': identifier not found   1 year 2 months ago

We compile 32-bit libraw for 32-bit RawDigger using MSVC 2010 with no such problem.

data() member is listed for std::vector since C++11

Reply to: Using Unicode   1 year 2 months ago

We are happy to accept additions if they do not violate the general ideology of the library and solve a problem of interest to more than one user.
Please use github pull requests for such a contributions.

Delphi/other language wrappers are out of our interest because we'll unable to support such improvements.

Reply to: Using Unicode   1 year 2 months ago

OK, I understand. Sorry, I'm new to LibRaw.
If I do the changes/additions, will it be merged in the distribution for next revision?

My current work is to create a Delphi wrapper so that LibRaw can be easily used by Delphi developers. This wrapper will be open-source and made available in a GitHub repository (Or even better - if it is possible directly - in the LibRaw repository).

Reply to: Using Unicode   1 year 2 months ago

> LibRaw should....

LibRaw is open-source, we welcome contributions from other developers

Reply to: Using Unicode   1 year 2 months ago

The problem is that I use the LibRaw.dll and his C API (My code is written with Delphi). And there is no access [as far as I can see] to the data structure required to implement a tiff writer. So I have to implement it is C++ and expose the function in the C API dll. The final effect is that my application will have to use a special DLL. I don't like the idea.

IMO LibRaw should expose a complete unicode API which is standard nowadays.

Reply to: Using Unicode   1 year 2 months ago

Yes, ppm_tiff_writer is a sample code only to allow LibRaw samples to write output files.

You may re-implement it, or use dcraw_mem_image() to create in-memory bitmap and save it using your own code.

Reply to: Using Unicode   1 year 2 months ago

LibRaw::open_file(wchar_t *) has to be used to open a file having Unicode filename. But LibRaw::dcraw_ppm_tiff_writer has no unicode version. Am I supposed to write my own or is there a work around?

BTW: I am working under Windows and all filenames are Unicode.

Reply to: Using Unicode   1 year 3 months ago

Thank you.

Reply to: Using Unicode   1 year 3 months ago

Windows: use LibRaw::open_file(wchar_t *)
macOS: LibRaw::open_file(char*) accepts UTF-8 filenames.

Other operating system: do not know :), you probably may need to implement own LibRaw datastream.

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

Yes, this is expected speed-up for huffman compressed files.

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

Managed to turned off sanitizer and RawSpeed 3 is about 20-40+% faster than RawSpeed v1. Sony A7RM4 RAW decode speed is like 2x.

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

Huffman decoder is faster.

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

Address sanitizer is still on. I need to find ways to disable it in the RawSpeed3 source code (not sure how right now).

Do you see speed improvements with RAWSpeed 3 in general? Is it faster than the original RAWSpeed or does it simply offer more RAW file decode for different camera brands?

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

I'm also unsure. Do you still use address sanitizer?

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

I recompiled without USE_RAWSPEED_BITS and RawSpeed3 appeared to have been called when I decode a certain Sony ARW images.

But performance is terrible. Like 4.5x slower.

Not sure what is going on.

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

1) Sorry, we do not offer advice on building RawSpeed3 as mentioned in the provided README
It is definitely possible to build it w/o address sanitizer.
We're not Cmake users, so I do not know what is 'target_sources(rawspeed_get_number_of_processor_cores....' message

2) LIBRAW_DECODER_TRYRAWSPEED3 bit is set in get_decoder_info() code. There is no way to change it from your app and no need for that.

LIBRAW_DECODER_TRYRAWSPEED3 bit is set only for decoders that are definitely faster in RawSpeed3, not for all decoders provided by the library (for example, it is mostly useless to decode unpacked/uncompressed data via RawSpeed3: it uses additional memory buffer for the decoded file with little or no benefit)

3) If you compile LibRaw with USE_RAWSPEED_BITS define, you need to set LIBRAW_RAWSPEEDV3_USE bit in imgdata.rawparams.use_rawspeed
If you compile LibRaw with just USE_RAWSPEED3 define, imgdata.rawparams.use_rawspeed=1 is enough.

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

It was actually step 2 on how to add the files.

Anyway, I've it figured out so it is now compiled correctly. There was an error in the 01. patch, it should remove 'final' from CameraMetaData, and not adding to it.

There is also another error in CMakeLists.txt in RawSpeed-v3/src/librawspeed/common:

target_sources(rawspeed_get_number_of_processor_cores should be set to PUBLIC not PRIVATE. Or else it libraw would not link (can't find rawspeed_get_number_of_processor_cores).

There is one addition error in converting the cameras.xml file to cameras.cpp file. A null character was added in the last line of the cpp file. It won't compile unless it is removed. The null char was preceding the last line "";

I also need to add -fsanitize=address compile option to Makefile.dist, as RawSpeed3 source code automatically detect and enable -fsanitize=address compile flag, and it'll not link unless the same is specified in libraw and my code.

Now that I got it to compile and link, how do I specify RawSpeed3 during runtime?

I set imgdata.rawparams.use_rawspeed = 1 and for all the RAW files I tried, it doesn't decode them with RawSpeed3, including Sony ARW files or Nikon Z camera RAW files.

The doc mentioned about:

RawSpeed-v3 support is controlled via libraw_decoder_info.t->flags (LIBRAW_DECODER_TRYRAWSPEED3 bit).

First of all, there is no libraw_decoder_info.t->flags, but there is libraw_decoder_info_t->decoder_flags.

I assume you're referring to this decoder_flags?

I can assign decoder_flags = LIBRAW_DECODER_TRYRAWSPEED3, but how do I pass the libraw_decoder_info_t data structure to the raw processor so that it knows I want it to try RawSpeed3?

There is a get_decoder_info() function, but not a set_decoder_info().

Reply to: LibRaw 0.21.1 and RawSpeed v3   1 year 3 months ago

Quote from RawSpeed3/README.md:

1.
To make a file with camera definitions, run the command (you can add it to the build system): sh ./rawspeed3_c_api/rsxml2c.sh < path/to/RawSpeed/data/cameras.xml > rawspeed3_c_api/cameras.cpp

The rsxml2c.sh script requires cat, tr, and sed unix command-line utilities installed, there is no specific version requirements.

2.
Add the resulting file (LibRaw/RawSpeed3/rawspeed3_c_api/cameras.cpp) and LibRaw/RawSpeed3/rawspeed3_c_api/rawspeed3_capi.cpp, to the build of the RawSpeed-v3 (dynamic) library, which you learned to build in the previous step. If building Windows DLL: rawspeed3_capi.cpp should be compiled with -DRAWSPEED_BUILDLIB to create dll export entries automatically.

3.
To check that everything works, you can use the LibRaw/RawSpeed3/rawspeed3_c_api/rawspeed3_capi_test.cpp test program, it should be possible to build it and link with RawSpeed-v3 (+ C-API); and after that this test program should be ready to decode RAW files passed to it from command line.

Please clarify what is not clear in the steps quoted above.

Pages