This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

为什么我的dm3730做h264编码这么慢



一秒才2到4帧的样子,我试了480*480和720*480两种格式,都是一样的慢

  • //这儿是我一部分代码,capture先得到了数据,填充好了10帧到aa数组,编码时保证不受采集速度的影响

    char outBuf[1024*1024];

    char outBuf2[1024*1024];

    int bytes;

    typedef struct ss

    {

    char outBuf[1024*1024];

    }ss;

    ss aa[10];

    void *EncProc(void *pVoid)

    {

    InitCE();

    int i;

    static int n=0;

    int bytes,bytes2=0;

    sleep(2);

    printf("start EncProc\n");

    while (1)

    {

    int i = (n++%10);

    bytes = Encode(aa[i].outBuf, 720*480*2, outBuf2,1024*1024);

    if (bytes>0)

    {

    //bytes2 = Decode(outBuf2,bytes,outBuf,1024*1024);

    printf("Encode:%d,Decode %d\n",bytes,bytes2);

    }

    else

    printf("Encode Error!\n");

    }

    return NULL;

    }