Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • treboJanuary 24, 2008 12:48 AM PST   
    ijl15 vs ijl20 vs IPP jpeg decode performance

    Hi,

    We have been using ijl15 for decoding jpeg images for quite a while.
    We have now upgraded to IPP 5.3 and ijl20 and we are noticing a performance slowdown in decoding jpeg images.

    The versions of the ijl are:
    ijl15 - 1.5.4.36
    ijl20 - 2.0.18.50

    What we do is basically:

    JPEG_CORE_PROPERTIES m_jcp;
    BYTE* m_pData;
    ijlInit(&m_jcp);
    ijlRead(&m_jcp, IJL_JBUFF_READPARAMS);
    m_pData = (BYTE*)ippMalloc(dwSize);
    m_jcp.JPGBytes = pPicData;
    m_jcp.JPGSizeBytes = dwPicDataSize;
    m_jcp.DIBBytes = m_pData;
    ijlRead(&m_jcp, IJL_JBUFF_READWHOLEIMAGE);

    And this is the performance I get with exactly the same code for ijl15 and ijl20:

    Using ijl15
    0.896MP-0.20MB-1152x778.JPG
    Reading 100 JPEG pics in: 1125 ms
    Average: 11.250000 ms per pic
    Average: 1.255222 ms per 100.000 pixels
    Average: 5.498104 ms per 100.000 bytes

    Using ijl20
    0.896MP-0.20MB-1152x778.JPG
    Reading 100 JPEG pics in: 1219 ms
    Average: 12.190000 ms per pic
    Average: 1.360102 ms per 100.000 pixels
    Average: 5.957501 ms per 100.000 bytes


    Is this a known issue? Can I do something to get better performance with ijl20?

    Br,
    Robert

     



    Vladimir Dudnik (Intel)January 24, 2008 3:40 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi Robert,

    Could you please tell us what is your operating system and hardware platform you are working on?

    By the way, IJL is depricated library. We now propose to move your code to IPP JPEG codec, which is part of JPEGView sample (in IPP image-codecs sample package). This IPP JPEG codec is the fastest JPEG codec, to achive its excellent performance it utilizes additional processor cores if available in system, it also provide support for lossless mode operations (both encoding and decoding) and support 16-bit per color channel images.

    Regards,
      Vladimir



    treboJanuary 24, 2008 3:57 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi Vladimir,

    Thanks for your quick answer!

    OS:
    MS Win XP Pro V.2002, SP 2 (5.1 build 2600)

    Platform:
    Intel Pentium D CPU 3.40 GHz (2 CPUs), 2 GB RAM


    We will investigate using IPP JPEG codec as well!

    Br,
    Robert



    treboJanuary 24, 2008 7:34 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi again,

    We have now done some testing with the IPP JPEG codec. However, we have not been able to improve performance. On the contrary it got slightly worse!

    Using IPP JPEG codec version 5.3.1.064
    0.896MP-0.20MB-1152x778.JPG
    Reading 100 JPEG pics in: 1375 ms
    Average: 13.750000 ms per pic

    Compare this to the ijl results:

    Using ijl15
    0.896MP-0.20MB-1152x778.JPG
    Reading 100 JPEG pics in: 1266 ms
    Average: 12.660000 ms per pic

    Using ijl20
    0.896MP-0.20MB-1152x778.JPG
    Reading 100 JPEG pics in: 1344 ms
    Average: 13.440000 ms per pic


    The code is taken from the sample app JPEGView and looks like follows:

    void GetImageFromJPEG()
    {
    CIppImage m_image;
    PARAMS_JPEG m_param_jpeg;
    Ipp8u* pJPEG = 0;
    int JPEGSize;
    JERRCODE jerr;
    CMemBuffInput in;
    CFile jpeg;

    printf("Using IPP JPEG codec version 5.3.1.064 ");
    printf(
    "0.896MP-0.20MB-1152x778.JPG ");
    jpeg.Open(
    "Pics.896MP-0.20MB-1152x778.JPG", CFile::modeRead|CFile::typeBinary);

    JPEGSize = (int)jpeg.GetLength();
    pJPEG = (Ipp8u*)ippMalloc(JPEGSize);
    jpeg.Read(pJPEG,JPEGSize);
    jpeg.Close();
    jerr = in.Open(pJPEG,JPEGSize);
    m_image.Color(JC_UNKNOWN);

    int iterations = 100;
    DWORD dwStartTick = GetTickCount();
    long pos = 0;

    for(int i=0; i<iterations; i++)
    {
        jerr = ReadImageJPEG(&in,&m_param_jpeg,&m_image);
        in.TellPos(&pos);
        jerr = in.Seek(pos*-1, 1);
    }

    DWORD dwEndTick = GetTickCount();
    printf(
    "Reading %d JPEG pics in: %lu ms ", iterations, dwEndTick - dwStartTick);
    printf(
    "Average: %f ms per pic ", (double)(dwEndTick-dwStartTick) / iterations);
    }

    Any ideas of why we don't get better performance with IPP JPEG codec than with ijl15 and ijl20?
    As stated above, we are using IPP version 5.3.1.064

    Br,
    Robert



    Vladimir Dudnik (Intel)January 24, 2008 12:22 PM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    That look strange.

    For ReadImageFromJPEG() you need to initialize m_param_jpeg struct, there are some parameters which control decoder behaviour.

    If you link with IPP static libraries, please make sure you call ippStaticInit function at the beginning of your application (it is not necessary in case of DLLs).

    Vladimir



    treboJanuary 25, 2008 5:42 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    I have tried with different values for m_param_jpeg. now. However, the only parameter improving the speed is m_param_jpeg.dct_scale.

    When I increase this from JD_1_1 it gets faster:
    JD_1_1 - 1750 ms
    JD_1_2 - 1620 ms
    JD_1_4 - 1320 ms
    JD_1_8 - 1030 ms

    With ijl15 it takes about 12 ms to decode one image, but then this is still full size and not scaled down as the case is when JD differs from 1_1.

    And I am using DLLs, so this shouldn't be the matter either...

    Any other suggestions?

    Br,
    Robert



    Vladimir Dudnik (Intel)January 25, 2008 6:02 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi Robert,

    could you please attach here problem image files which demonstrate that issue? Our testing show that IPP JPEG codec outperform old IJL library on Core2 system with different factors, depending on image compression mode.

    Regards,
      Vladimir



    treboJanuary 28, 2008 4:47 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi Vladimir,

    Thanks for looking into this issue. We really appreciate it!

    I've attached the picture with which we've done the testing.

    Br,
    Robert


     Attachments 

    treboFebruary 20, 2008 4:10 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi again,

    Did you have any chance to look into the issue?

    Do you need any other information from me?

    Br,
    Robert



    Vladimir Dudnik (Intel)February 20, 2008 6:38 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi Robert,

    we were not able to reproduce performance issue with your image. Could you please provide your test project to see what can be the reason? 

    Regards,
      Vladimir



    treboFebruary 21, 2008 6:25 AM PST
    Rate
     
    Re: ijl15 versus ijl20 performance

    Hi Vladimir,

    I attach my test projects for you to look into.

    The project "IPP-JPEGdecode" uses IPP 5.3 JPEG codec.
    I have also provided the executable: IPP-JPEGdecode.exe.

    The project "IPP-IJL15-20-compare" uses IJL15 or IJL20.
    I have also provided the executables: IPP-IJL15.exe and IPP-IJL20.exe

    I have also provided the test image.
    I have not provided any Intel files. If you need any of them just let me know.

    I have tested on three different computers with about the same setup:
    OS: MS Win XP Pro V.2002, SP 2 (5.1 build 2600)
    Platform: Intel Pentium D CPU 3.40 GHz (2 CPUs), 2 GB RAM

    The result is the same on all machines. IJL15 is fastest and JPEG codec is slowest:
    IJL15: 13.5 ms per picture (50% CPU usage, 100% of one core)
    IJL20: 14.5 ms per picture (50% CPU usage, 100% of one core)
    JPEG codec: 20 ms per picture (100% CPU usage, 100% of each core)

    So, in my test "JPEG codec" is actually much slower since it uses 100% of two cores, while IJL only uses 100% of one core...!

    Also, the colors is inverted or something in the images produced by the IPP JPEG Codec. Maybe this is a hint to what's wrong!?

    Please let me know if you need anything else from me!

    Br,
    Robert


     Attachments 

Forum jump:  

Intel Software Network Forums Statistics

16,369 users have contributed to 46,341 threads and 163,954 posts to date.

In the past 24 hours, we have 18 new thread(s) 102 new posts(s), and 67 new user(s).

In the past 3 days, the most popular thread for everyone has been Formula for the intersection of straight lines The most posts were made to Take a look at John Burkhard&# The post with the most views is \"-check none\" generates error

Please welcome our newest member bikerepair8


For more complete information about compiler optimizations, see our Optimization Notice.