team-charls / charls

CharLS, a C++ JPEG-LS library implementation
BSD 3-Clause "New" or "Revised" License
186 stars 73 forks source link

Where are the test files? #32

Closed anders9ustafsson closed 7 years ago

anders9ustafsson commented 7 years ago

In performance.cpp, TestLargeImagePerformance and DecodePerformanceTests functions, some data files are referenced that are not included in the repository. From where can these images/data files be obtained?

vbaderks commented 7 years ago

Hi,

You can download these images from: http://imagecompression.info/test_images/ Because they are very large they are not included in the repository. I will make a note to add some comment in the source code, where these images can be found.

DecodePerformanceTests is a helper method that can be used to analyze CharLS in a profiler or to compare it's decoding speed to other implementations. Just rename any .jls file into decodetest.jls and execute the method.

anders9ustafsson commented 7 years ago

Many thanks, @vbaderks! I Googled for them, but never got a good enough match. I can see why they are not included in the repository :-)

The reason why I am asking is because I have attempted to convert CharLS into C#, and I wanted to make as complete a test suite as possible. Currently, byte array based decoding seem to work very well. Byte array based encoding still have some flaws which I am trying to sort out. Stream based decoding/encoding is currently non-functional.

I have tried to mimic the C++ code as much as possible right now, so the code is not yet optimized. Thus, it is considerably slower than the C++ implementation at this moment. Once the encoding and decoding produces correct results I will of course also look at performance optimization.

If you are interested in what I have done so far my fork is here, the managed branch and folder. I have published a very early release to NuGet in order to be able to try it out together with the DICOM repository I am managing, fo-dicom.

vbaderks commented 7 years ago

Hi Anders,

Great to hear that you are porting this library to a native C# implementation. I always wondered what would be the performance difference between a C++ implementation and a managed (C#, Java) implementation. I know that many people would prefer a pure C# or pure Java implementation when the performance difference are not too big. It makes the library much easier to integrate in their DICOM frameworks. When I have time I might play with your implementation.

Victor