Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

UIC decoding: questions, problems, etc...

levicki
Valued Contributor I
1,013 Views

I have some questions regarding UIC.

1. I tried including #include "uic_dds_dec.h" and it complains about the lack of DDS namespace. It seems that the uic_dds_dec.h should include it (or what should be included should be described in more detail):

#ifndef __UIC_DDS_H__
#include "uic_dds.h"
#endif

2. Microsoft compiler is throwing C4291 on uic_new.h:

uic\\src\\core\\uic\\include\\uic_new.h(50) : warning C4291: 'void *operator new(size_t,const UIC::NewBuffer &)' : no matching operator delete found; memory will not be freed if initialization throws an exception

Is it safe to ignore that warning (I presume not)?

3. Are those DLL files compiled with CPU dispatching, if so for what CPUs?

4. Are those DLL files standalone or do they require IPP (or compiler) DLLs? If so, which ones?

5. Can UIC be used statically and if so how?

6. I am writing image viewing application and I intend to support BMP, DDS, JPEG, and PNG image formats. I have a single user Parallel Studio license. What are the terms for redistributing the binary files needed for my application to run?

Regards,
Igor

0 Kudos
28 Replies
levicki
Valued Contributor I
251 Views
I know you didn't but your response implied that better BMP support involves a lot of work while it is something a single developer can do in one afternoon.

If you are interested, I can give you my BMP decoder source code to use it as a basis for a proper BMP support in the future.

In the meantime I have more oddities to report:

1. JPEG decoder supports decoding to BGR format, PNG decoder does not -- I have to manually swap channels to get the format I need.

2. PNG decoder RGBA support seems not to be done properly -- if I understand PNG specification correctly, alpha compositing should be done with linear image samples, not with gamma corrected ones.

As far as I know, PNGDecoder::ReadHeader() does not provide gamma information so I cannot undo gamma correction on my own before alpha compositing.

Therefore, compositing should be part of the decoding process which means decoding function should have a parameter which specifies background image for compositing.

3. PNG decoder is slow -- 1,014ms for 6000 x 4711 px truecolor image is too much on a 3.3GHz quad-core Nehalem. PNGDecoder::SetNOfThreads(4) has no effect, PNGDecoder::NOfThreads() always returns 1.

4. JPEG decoder CMYK processing results in wrong, over-saturated colors. You can compare that by looking at the same CMYK image in Photoshop and in Picnic:



Photoshop (correct) rendition is on the LEFT, UIC::JPEGDecoder on the RIGHT.

I have added sample CMYK JPEG image as an attachment. If you load it into Picnic, the left side will look like the right side on the image above, while the right side will be degraded further. If you load it into Photoshop it will look exactly like the image above.

5. PNGDecoder -- 8-bit color images are always decoded as 3 channel images. I don't mind, but I am not sure it is mentioned anywhere in the UIC documentation.

6. JPEGDecoder (I told Jennifer about this) -- if system locale is set to anything other than English (1033) JPEG decoder (or libiomp5md.dll to which it links) opens a console window and prints a warning message. I can't stress enough how broken such behavior is for a dynamically linked library.

If I find more problems I will let you know.
0 Kudos
Vladimir_Dudnik
Employee
251 Views
There is difference between what single developer can do for fun and what becames a feature of product. And again, we did not extended BMP support because it was enough for our first priority goals. Now, you have submitted feature request and that will be considered for implementation in future versions.

The good thing of UIC is that you can derive from UIC base classes your own implementation of BMP format processor and satisfy your needs before similar functinality will be introduced in UIC.

Vladimir
0 Kudos
levicki
Valued Contributor I
251 Views
Vladimir,

I was not writing BMP decoder for fun, but because I needed it for my application.

Please take a look at the updated post above, I added a few issues I found during development with UIC.
0 Kudos
Vladimir_Dudnik
Employee
251 Views
Thanks again, there are some points I agree with you, they need to be corrected. Was surprized to read about command line window thrown from DLL, never saw such behavior, we will investigate that and I will provide additional info here sometime later.

Vladimir
0 Kudos
levicki
Valued Contributor I
251 Views
Vladimir,

Should I create issues with Premier Support for the problems I found and listed in the previous post or is posting them here good enough?

I would really like to have some feedback on whether those issues will be fixed and when.
0 Kudos
Vladimir_Dudnik
Employee
251 Views
Please feel free to submit issues to Premier Support, especially when you have several ones discussed in single forum thread.

Regards,
Vladimir
0 Kudos
prabha_joseph
Beginner
251 Views
Hi Vadimir,
I would like to know if there is any functions in UIC to get the image attributs like width, height, image size, compression, bitcount etc. Hope you can help me on this.
Regards,
Prabha
0 Kudos
Anmol_M_
Beginner
251 Views

Hi Vladimir -

I agree with this request -

Support for Adobe DNG wouldn't hurt either.

 

Is it possible to add support for compressed DNG - its a part of the DNG standard. Also, DNG can be easily derived from the tiff API - and you already have some compression algorithms.

Compressed DNG would be invaluable for my application!

0 Kudos
Reply