Quantcast
Channel: Intel® Integrated Performance Primitives
Viewing all 1294 articles
Browse latest View live

Custom DLL Linking Issue

$
0
0

We are struggling with strange issue related to IPP lib linking.

We have one .Net Exe which uses managed (C#) DLL which interns calls intel custom DLL (C++ unmanaged) through pInvoke.

If we use intel custom DLL with ‘Multi-thread Static Lib’ or ‘Single Thread Static Lib’ it works fine.

But when we use intel custom DLL with ‘Multi-threaded DLL’ or ‘Default Linking Method (which is /MD)’  it does not work as expected.

Following project setting we are using -

Include path: ‘$(INTEL_DEF_X64_INSTALL_DIR)ipp\include’

Lib path: $(INTEL_DEF_X64_INSTALL_DIR)ipp\lib\intel64

No lib name has been added in input lib path.

 

Could you please tell what exactly we need to do for intel custom lib compile for dynamic lib? 


Custom DLL Linking Issue

$
0
0

We are struggling with strange issue related to IPP lib linking.

We have one .Net Exe which uses managed (C#) DLL which interns calls intel custom DLL (C++ unmanaged) through pInvoke.

If we use intel custom DLL with ‘Multi-thread Static Lib’ or ‘Single Thread Static Lib’ it works fine.

But when we use intel custom DLL with ‘Multi-threaded DLL’ or ‘Default Linking Method (which is /MD)’  it does not work as expected.

Following project setting we are using -

Include path: ‘$(INTEL_DEF_X64_INSTALL_DIR)ipp\include’

Lib path: $(INTEL_DEF_X64_INSTALL_DIR)ipp\lib\intel64

No lib name has been added in input lib path.

 

Could you please tell what exactly we need to do for intel custom lib compile for dynamic lib? 

IPP DLLs and commercial product

$
0
0

Hi all,

Our company has a project in video surveillance.

I tried to boost it via IPP and the results are good.

The next version of our system will contain IPP DLLs.

My question is:

 

What is standard approach to place IPP DLLs: in folder with application executable or in some system folder?

Actually this question is for Intel engineers.

 

Best regards,

Roman Tarasov

Distorted sound in AAC encoder output

$
0
0

Hello,

I try to encode PCM mu-law audio (8000Hz, 16 bits per sample, 1 channel) from IP-camera with UMC AACEncoder (ipp-samples.8.0.0.005). The output audio is very distorted (see in attachment). I guess I use wrong parameters while encoder initialising. Please check my code and tell me where I am wrong?

#include "AACEncoder.h"

#include <ipps.h>
#include <umc_linear_buffer.h>

using namespace NVeedo;

CAACEncoder::CAACEncoder(void)
    :   m_pMediaBuffer(0)
{
}


CAACEncoder::~CAACEncoder(void)
{
    m_Encoder.Close();

    UMC_DELETE(m_pMediaBuffer);
}


bool CAACEncoder::Init()
{
    m_pMediaBuffer = (UMC::MediaBuffer*) new UMC::LinearBuffer();

    // Input data parameters
    m_AACEncParams.m_info.streamType                    = UMC::MULAW_AUDIO;
//    m_AACEncParams.m_info.audioInfo.m_iChannelMask      = 0;
    m_AACEncParams.m_info.audioInfo.m_iChannels         = 1;
    m_AACEncParams.m_info.audioInfo.m_iBitPerSample     = 16;
    m_AACEncParams.m_info.audioInfo.m_iSampleFrequency  = 8000;

    m_AACEncParams.m_info.iBitrate                      = 32000; //48000;

    // Output stream parameters
    m_AACEncParams.audioObjectType                      = AOT_AAC_LC;
    m_AACEncParams.auxAudioObjectType                   = AOT_UNDEF;
    m_AACEncParams.outputFormat                         = UMC_AAC_ADTS;
    m_AACEncParams.stereo_mode                          = UMC_AAC_MONO;
    m_AACEncParams.ns_mode                              = 0;

    m_AACEncParams.m_pData                              = 0;

    if(UMC::UMC_OK != m_Encoder.Init(&m_AACEncParams))
    {
        std::cerr << "Audio codec init failed"<< std::endl;
        return false;
    }

    UMC::Status             nStatus = UMC::UMC_OK;
    UMC::AACEncoderParams   CodecParams;

    nStatus = m_Encoder.GetInfo(&CodecParams);
    if(nStatus < 0)
    {
        std::cerr << "Audio codec GetInfo() failed"<< std::endl;
        return false;
    }

    m_OutData.Alloc(CodecParams.m_iSuggestedOutputSize);

    m_MediaBufferParams.m_numberOfFrames        = 10;
    m_MediaBufferParams.m_prefInputBufferSize   = CodecParams.m_iSuggestedInputSize  * m_MediaBufferParams.m_numberOfFrames;
    m_MediaBufferParams.m_prefOutputBufferSize  = CodecParams.m_iSuggestedOutputSize * m_MediaBufferParams.m_numberOfFrames;

    if (UMC::UMC_OK != m_pMediaBuffer->Init(&m_MediaBufferParams))
    {
        std::cerr << "Media buffer init failed"<< std::endl;
        return false;
    }

    std::cout << "AAC codec initialized successfully"<< std::endl;

    m_AACEncParams.m_info.streamType                    = UMC::AAC_AUDIO;

    return true;
}

bool CAACEncoder::Encode(void* pBuffer, int nLength)
{
    UMC::Status nStatus = m_pMediaBuffer->LockInputBuffer(&m_InMediaBuffer);
    if(UMC::UMC_OK != nStatus)
        return false;

    int nMediaBufferSize = m_InMediaBuffer.GetBufferSize();
    if (nMediaBufferSize < nLength)
    {
        int nBreak = 1;
    }

    // Copy audio data
    ippsCopy_8u((Ipp8u*) pBuffer, (Ipp8u*) m_InMediaBuffer.GetBufferPointer(), nLength);
    m_InMediaBuffer.SetDataSize(nLength);

    m_pMediaBuffer->UnLockInputBuffer(&m_InMediaBuffer);

    nStatus = m_pMediaBuffer->LockOutputBuffer(&m_OutMediaBuffer);
    if(UMC::UMC_OK != nStatus)
        return false;

    nStatus = m_Encoder.GetFrame(&m_OutMediaBuffer, &m_OutData);
    m_pMediaBuffer->UnLockOutputBuffer(&m_OutMediaBuffer);

    if(UMC::UMC_OK != nStatus)
    {
        return false;
    }

    return true;
}

UMC::MediaData* CAACEncoder::GetFrame()
{
    return &m_OutData;
}

 

AttachmentSize
Downloadoutput_0.zip27.83 KB

Opencv detects and displays video from webcam, but not firewire

$
0
0

I have connected a cam through firewire and tried to access it using opencv. The camera is detected in coriander and able to get a video stream. Below is the code I used

        #include "/home/iiith/opencv-2.4.9/include/opencv/cv.h"

        #include "/home/iiith/opencv-2.4.9/include/opencv/highgui.h"

        #include "cxcore.h"

        #include <iostream>

        using namespace cv;

        using namespace std;

        int main(int,char**)

        {

            VideoCapture cap(0);

            if(!cap.isOpened())

                cout<<"Camera not detected"<<endl;

            while(1)

            {

                Mat frame;

                namedWindow("display",1);

                cap >> frame;

                imshow("display",frame);

                waitKey(0);    

            }

        }

When I run this code, the video is streamed from the webcam instead of my firewire cam. I tried the same code in my friend's system and there the firewire cam was detected. I tested the settings using different commands such as **testlibraw** , **lsmod** and they are all the same. Even the  Opencv version, 2.4.9, Ubuntu 12.04 are all the same. This is really bizarre and am at this for 2 days. Can anyone please tell me what the difference could be? How can I get the external cam detected in opencv? Thanks in advance. 

Note : Does this have something to have with setting the default cam? Thanks.

Update 1 : VideoCapture cap(1) gives the following error

HIGHGUI ERROR: V4L: index 1 is not correct!

Does this mean the camera is not recognized?

IPP Crypto : Is not there ECIES function?

$
0
0

ECDSA and ECDH only there.

I need a function to encrypt and decrypt the file.

Problem with ippiNormDiff_L1_16s in IPP 8.2

$
0
0

Hello,

I have a strange result for ippiNormDiff_L1_16s_C1R function in IPP 8.2. Code for reproducing below:

short a[21*15] = { 10, 8, 7, 2, 3, 3, 6, 2, 2, 4, 7, 10, 8, 8, 6, 7, 5, 10, 7, 7, 3, 2, 3, 2, 6, 2, 6, 2, 9, 9, 9, 2, 4,
                10, 5, 5, 9, 2, 6, 7, 9, 9, 6, 3, 10, 7, 3, 9, 2, 10, 9, 10, 8, 8, 10, 5, 10, 9, 5, 4, 4, 2, 3, 5,
                4, 9, 5, 3, 7, 8, 2, 2, 7, 9, 10, 5, 5, 10, 5, 6, 5, 6, 7, 4, 10, 10, 3, 7, 2, 10, 7, 9, 2, 4, 9, 2,
                6, 6, 6, 6, 8, 3, 7, 10, 5, 5, 2, 4, 4, 7, 8, 10, 2, 8, 4, 2, 10, 3, 6, 4, 10, 9, 6, 10, 8, 5, 7, 8,
                10, 9, 3, 8, 4, 2, 3, 5, 3, 2, 3, 7, 4, 9, 10, 9, 8, 3, 4, 4, 9, 8, 7, 4, 10, 6, 2, 5, 10, 6, 3, 5,
                5, 10, 4, 9, 8, 5, 6, 6, 8, 7, 8, 6, 3, 4, 8, 8, 2, 6, 3, 3, 9, 10, 5, 8, 10, 9, 2, 8, 6, 7, 2, 10,
                7, 2, 8, 10, 5, 6, 4, 10, 9, 3, 6, 9, 2, 9, 10, 9, 8, 10, 5, 4, 10, 5, 10, 4, 4, 7, 10, 6, 8, 4, 7,
                5, 7, 5, 9, 4, 2, 2, 8, 5, 9, 3, 7, 2, 3, 2, 3, 8, 5, 9, 4, 4, 5, 4, 9, 7, 7, 8, 7, 5, 3, 8, 3, 6, 10,
                10, 3, 6, 9, 4, 4, 9, 4, 5, 9, 9, 4, 3, 8, 4, 3, 4, 6, 6, 10, 8, 5, 3, 8, 4, 6, 7, 9, 9, 9, 4, 2, 9,
                8, 5, 2, 10, 3, 4, 10, 5, 6, 3, 6, 10, 3, 5, 5, 5, 8, 6, 7, 8, 5, 3, 2, 2, 10 };

short b[21*15] = { 1358, -1177, 167, -1533, 62, -1416, -1002, 216, -844, 970, 1228, -663, 1503, 403,
                347, 621, -760, -920, 999, 1684, 809, 1507, -1383, -860, 1043, 1539, -1332, -437,
                54, -1033, 475, 183, -1401, 77, -963, 208, 1424, 21, 1295, 285, -69, -132, -204,
                884, 154, -1467, 1004, -1366, 1461, -190, 1564, 493, -238, 495, 853, -1316, 1057,
                -1534, 1107, 72, -284, -643, -1171, 509, 116, 1112, 177, 108, -402, 1422, -219,
                1163, -848, -502, 97, -1296, -498, 18, -185, 1438, -780, -1207, 1451, 1064, 876,
                -814, -483, 716, -1408, 1693, 1030, 228, -610, 486, 1076, 1540, 848, 1384, -831,
                -865, 452, -562, -611, 429, -740, 160, -8, 220, 1421, -1193, 860, -1422, 422,
                -1519, 1641, -1512, -251, 1151, -490, 150, 246, 1119, -822, -1057, 991, 979, 571,
                -692, 1399, -32, 1306, 1542, 1568, -1095, 1346, -736, -895, 1427, 1067, 488,
                -1430, 314, -85, -808, 672, 461, 960, 1117, 993, 729, -348, 1510, 1658, 1151, 570,
                -847, 704, 1219, -1103, -1176, 1590, -991, 893, -432, -194, -719, 811, -286, 1266,
                592, 895, -1321, -1531, 1051, -1352, -1355, -1109, -37, -1300, 875, 912, -1181,
                -339, 1431, 579, -1048, 752, 314, -1416, 1070, -1111, 911, -679, 1648, 340, 751,
                -1070, 758, 261, -1365, 681, 1505, -632, 1702, 705, -1001, 925, -736, 1432, -904,
                301, -1246, -448, 1177, 342, 1500, 1015, 767, 486, -812, -970, 999, -700, 571, 452,
                512, 802, -313, 1625, -184, 830, 1175, 894, 1233, -1317, 958, 98, 974, 1289, 947,
                -1449, -206, -109, 1332, -226, -190, 1247, 725, 227, -167, 1083, -1180, 789, -697,
                -683, -1440, -283, -1, -804, -217, 927, -90, 1321, 139, -166, 1015, -14, 1583,
                -682, 373, 1504, -1248, 1456, 215, 1105, -1338, -322, -389, 682, 694, 642, 1253,
                1306, 605, 468, 1296, 669, -417, -360, -479, 551, -476, -664, -301, -1476, 1603,
                229, -43, -1280, 1668, 1550, 556, 407, 853, 1516, -665, -1324, -366, 510, 1589,
                1248, 330, 1371, 1545, -147 };

IppiSize size = { 21, 15 };
Ipp64f res1;
ippiNormDiff_L1_16s_C1R(a, 21*sizeof(short), b, 21*sizeof(short), size, &res1);

double res2 = 0;
for (int i=0; i<21*15; i++)
    res2 += abs(a[i] - b[i]);

printf("IPP result = %f, my result = %f\n", res1, res2);

The result is:

IPP result = 263390.000000, my result = 263381.000000

Please look at this problem.

Best regards,

Alexander.

Missing C# Wrapper for New Resize functions from IPP8

$
0
0

where can i find C# Wrapper for the new Resize functions which were introduced with 8.xx

The CSharp Language Interface is only updated to 7.xx

I am so unhappy that the CSharp language Interface is not longer supported. That makes it very hard to update to newer versions of IPP.


Licensing question

$
0
0

There are 10 developers in our company, and 2 of them would be working on the image processing feature that needs IPP. Since we have a single codebase, all the 10 developers should have the IPP files on their development machines to compile/test the entire code, though only 2 developers actually develop the image processing feature. And there are 5 QA engineers who test all the features. Apart from the 15 development machines that these engineers use, around 10 lab machines are used for automated testing.

How many licenses should we buy in this case?

Why there is no ippsThreshold function for Ipp16u?

$
0
0

Hi,

We are trying to use IPP for image processing.

We have image data set which has 16bits allocated but 15bits stored.We resize & interpolate using: ippiResize_16u_C1R(). We then need to apply threshold to ensure that the range of the data within 15 bits. We tried to use ippsThreshold_LTValGTVal_16s_I(). That set the values > 15 bits to 0.

There seems to be no threshold function for unsigned data. ow can we apply threshold on an unsigned 16 bits dataset?

 

Thanks,

PD

 

Problems building custom so

$
0
0

Hi,

I am trying to build a custom .so to link my C++ software against but I am having trouble.

Are there clear and detailed instructions to build a custom .so using CMake that I could find somewhere? If not, can someone guide me through the process. I have instructions for a custom dll from IPP version 6 and sample code from the IPP website but I can't make it work.

From what I understand, I need 4 files:

  1. exports.def (or .txt) containing the list of fucntions I need.
  2. funclist.h containing the declarations of the functions from the ipp*.h files.
  3. some sort of .c file (dllmain.c or init.c) to bring everything together. This is where I get lost...
  4. CMakeLists.txt to compile everything.

Are these the only files I need? What are they supposed to contain?

Thank you very much for your help!

Nicolas

DMIP in IPP 8.2?

$
0
0

Hello,

where is DMIP? Since IPP 7.1 I didn't found in release notes that it is removed or not supported anymore. Latest download for DMIP I've found is with IPP 7.1.

Did I miss something?

Hello world IPP example using Qt Creator - Link problem!

$
0
0

Hello-

I am trying to write a very simple 'Hello World' C++ program that makes use of IPP. I am developing on Windows using Qt's Creator IDE.  All my program does for now is call ippInit.  The code is below:

#include <QCoreApplication>
#include "ippcore.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    ippInit();

    return a.exec();
}

My project file (.pro) file is also very simple, see below.  BTW, we happen to store our IPP libraries in a 'third party' directory for historical reasons.  Note that I am not making use of any of the path variables defined when you run Intel's install script.  But I'm assuming, perhaps incorrectly, that not having those defines is not what is killing me.

#-------------------------------------------------
#
# Project created by QtCreator 2014-10-08T13:50:59
#
#-------------------------------------------------
QT       += core
QT       -= gui

IntelIPPlibs = -lippac -lippcc -lippch -lippcv -lippdc -lippdi -lippi -lippj -lippm -lippr -lipps -lippsc -lippvc -lippvm -lippcore


#	Set the intel path based upon the platform.
ThirdPartyLibraryPath = ../../../../thirdparty
win32: IntelIPPPath = $${ThirdPartyLibraryPath}/Intel/Windows/ipp
linux: IntelIPPPath = $${ThirdPartyLibraryPath}/Intel/Linux/ipp

win32 {
    DEFINES += WINNT
    LIBS += -L$$IntelIPPPath/lib/intel64 $$IntelIPPlibs
}

unix {
    DEFINES += LINUX
    LIBS += -L$$IntelIPPPath/lib/intel64 $$IntelIPPlibs
}

INCLUDEPATH += $${IntelIPPPath}/include

TARGET = HelloIPP
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app
SOURCES += main.cpp

When I attempt to build, I get the following error:

main.obj : error LNK2019: unresolved external symbol ippInit referenced in function main debug\HelloIPP.exe : fatal error LNK1120: 1 unresolved externals

I am using the MSVS 2012 64 bit compiler.  I suspect the problem MIGHT have to do with how the MSVC compiler is mangling the function names, but I see in ipp.h that it makes use of the "extern "C"" so that does not seem to be the problem.

Any suggestions would be greatly appreciated!  Driving me crazy for the past six hours...

Regards,

Jim

IPP On Ubuntu 14.04

High CPU usage when 2 application use IPP

$
0
0

Hi,

I am running 2 applications which use IPP for decoding and image processing. When I run both the applications together the CPU usage of the application which does decoding increases. But when I stop the second application(image processing) then CPU usage of first application decreases.

For example-

 - There are 2 applications A and B.

 - When I run A application only then CPU usage of A is X%.

 - When I start B application also then CPU usage of A increases(X+w)%.

My platform is Linux(Debian).

What can be the reason that if I run B then CPU usage of A increases? 

 


efficient way to compute xe^(-x^2/a) and x / (1 + x^2/a) for IPP

$
0
0

Hi, 

          I am wondering if IPP 8.0 has any way to efficiently implement the xe(-x^2/a), where a is a positive float number (ipp32f), where x is an array (potential large array) of data type ipp32f. I have used IPP 8.0 to element-wise product of x and e(-x^2/a), where i have used additional function call to compute the power component of the exponent (i.e., -x^2/a ). Due to multiple function calls, the evaluation of the above function becomes the bottleneck. Similar arguments applies to the x / (1 + x^2/a) as well. Is there any function calls respectively that I can directly compute the above two formula? 

 

Best Regards

Edwin

Redistributables question

$
0
0

Sorry if this has been answered, but I couldn't find it in the FAQs or on the forums.

I am developing an API that uses Intel IPP for some features.  I intend to build a custom redistributable DLL as suggested in the documentation's list of ways to redistribute the binaries.

What is not obvious to me is whether I can also redistribute the header files (.h's).   My first thought was that I would want to wrap all functions in a "my api" version of them - eg. ippsMalloc_32f becomes myapiMalloc_32f, and myapiMalloc_32f just passes the args right to it.  But then for typedefs, I would have to typedef all the types, mimicking the way ipp has already, and cast them in my ipp wrapper methods.  eg:

typedef float Myapi32f; // maps to Ipp32f
typedef double Myapi64f; // maps to Ipp64f

But it seems like if I did this, it would be worse than if I just included the Intel headers with their copyright notices intact. Searching the web for specific header files gives me some examples of these files in the wild, but they're not in the redist.txt.

What is allowed?  What is standard for redistributing with an API?

Thank you!

Performace Issue - IPP 8.2.090 Crypto AES_CTR Mode

$
0
0

Hi,

We have integrated with Intel IPP Crypto library version 8.2.090. We are using this library for AES Encrypt / Decrypt in CTR mode (for SRTP). Our target platform is a VMWare system running on Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz. Hence the application is linked with single threaded (st) version of libippcpv8.so.8.2 (optimized for Xenon platfor,) & libippcore.so.8.2.

Note: Our application already has thread pool implemented and hence we do not need to use the multi-threaded (mt) version of the libraries.

We compared the performance of Intel IPP crypto implementation of AES 128 bit CTR mode Encrypt / Decrypt with the aes_icm_ctr implementation in libsrtp (https://github.com/cisco/libsrtp/tree/master/crypto/cipher).

We observe that IPP crypto implementation is **slower** when compared to the open source implementation.  128 bit ippsAESEncryptCTR() takes ~125% of the time it takes for the corresponding implementation in the open source libsrtp code base - aes_icm_encrypt_ismacryp(). And that 128 bit ippsAESDecryptCTR() takes ~175% of the time it takes for the corresponding implementation in the open source libsrtp code base - aes_icm_encrypt_ismacryp().

Do you have any suggestions on how we can get Intell IPP crypto library to perform better on our target platform for AES in CTR mode ?

Below is how the routines are being invoked and these are the only methods that we are attempting to profile.

   #define SRTP_IPP_AES_CTR_BIT_LEN 16

    retStatus = ippsAESEncryptCTR(
            (const Ipp8u*)enc_start,
            (Ipp8u*)enc_start,
            enc_octet_len,
            stream->ipp_rtp_cipher_ctxt,
            ctr,
            SRTP_IPP_AES_CTR_BIT_LEN);

retStatus = ippsAESDecryptCTR(
                (const Ipp8u*)enc_start,
                (Ipp8u*)enc_start,
                enc_octet_len,
                stream->ipp_rtp_cipher_ctxt,
                ctr,
                SRTP_IPP_AES_CTR_BIT_LEN);

 

Thanks.

Problem using ippiCrossCorrNormGetBufferSize - negative buffer size! (Ipp 8.1)

$
0
0

Hello,

the buffer size returned by ippiCrossCorrNormGetBufferSize is negative, if the size of the source roi is greater than ~33488896.

Within the following ranges, the buffer size is calculated correctly:

if w <= 511 then h <= 65536

if w <= 1023 then h <= 32768

if w <= 2047 then h <= 16384

if w <= 4095 then h <= 8192

if w <= 8191 then h <= 4096

if w <= 16383 then h <= 2048

Sometimes the function "recovers" and returns positive values again. E. g. if w <= 2047 and h > 32768 it returns positives values again.

Can you confirm this bug (Ipp 8.1)? Will this problem be fixed in the near future? Is there a quick workaround calculating the buffer size?

Best regards,

Uta

IPP Media - H.264 Performance with different profiles

$
0
0

Hello,

I work for a company that does a lot of H.264 decoding from security cameras that provide H.264 in various profiles. We noticed that there is sometimes significant CPU increase when switching between baseline and main or high profiles. We are currently using IPP 7.0.6 and tried out 8.0.1 but have not been able to see much of a performance improvement. I am wondering if there are any expected performance gains if we were to upgrade to 8.2 or configure the decoder differently? Any help on the matter would be greatly appreciated.

Thanks.

Viewing all 1294 articles
Browse latest View live