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.

DM6446_DEMO: encodedecode performance?

Hi All:

The encodedecode program in the directory  /home/gzj/dvsdk_2_00_00_22/dvsdk_demos_2_00_00_07/dm6446/encodedecode can work.

But the problem is that it needs 800ms when one frame encodes or decodes,so the performance is very bad;

 I see in the function:

static Int encodedecode(Venc1_Handle hVe1, Vdec2_Handle hVd2,
                        Buffer_Handle hVidBuf, Buffer_Handle hEncBuf,
                        Fifo_Handle displayFifo)
{
       ...

       /*encode the video buffer*/
       gettimeofday(&t1,NULL);
       ret = Venc1_process(hVd1, hEncBuf, hVidBuf);


       if (ret != Dmai_EOK) {
                ERR("Failed to decode video buffer\n");
                return FAILURE;
       }
      gettimeofday(&t2,NULL);
       t = (t2.tv_sec-t1.tv_sec)*1000+(t2.tv_usec-t1.tv_usec)/1000;
      printf("Venc1_process---Time needed is %8.3f ms\n",t);//here 800ms

      /*decode the video buffer*/
     ret = Vdec2_process(hVd2, hEncBuf, hVidBuf);

     if (ret != Dmai_EOK) {
        ERR("Failed to decode video buffer\n");
        return FAILURE;
     }
    gettimeofday(&t2,NULL);
     t = (t2.tv_sec-t1.tv_sec)*1000+(t2.tv_usec-t1.tv_usec)/1000;
     printf("Venc2_process---Time needed is %8.3f ms\n",t);//here 800ms
       ...
}

VIDENC1_process print:

@6,504,541us: [+2 T:0x427e9490] ti.sdo.dmai - [Buffer] Set user pointer 0x43f05000 (physical 0x80a00000)
@6,523,480us: [+2 T:0x427e9490] ti.sdo.dmai - [Dmai] Driver buffer 0 mapped to 0x43f05000 has physical address 0x80a00000
@6,523,973us: [+2 T:0x427e9490] ti.sdo.dmai - [Buffer] Set user pointer 0x43fdd000 (physical 0x80900000)
@6,542,883us: [+2 T:0x427e9490] ti.sdo.dmai - [Dmai] Driver buffer 1 mapped to 0x43fdd000 has physical address 0x80900000
@6,543,351us: [+2 T:0x427e9490] ti.sdo.dmai - [Buffer] Set user pointer 0x440b5000 (physical 0x82000000)
@6,562,391us: [+2 T:0x427e9490] ti.sdo.dmai - [Dmai] Driver buffer 2 mapped to 0x440b5000 has physical address 0x82000000
@6,618,964us: [+2 T:0x427e9490] ti.sdo.dmai - [Smooth] Configuring smooth job of size 720x576
@6,707,125us: [+0 T:0x42fe9490] ti.sdo.ce.video1.VIDENC1 - VIDENC1_process> Enter (handle=0x96500, inBufs=0x42fe8ba0, outBufs=0x42fe8b94, inArgs=0x42fe8b84, outArgs=0x42fe8b0c)
@6,707,379us: [+5 T:0x42fe9490] CV - VISA_allocMsg> Allocating message for messageId=0x0002ff19
@6,707,568us: [+0 T:0x42fe9490] CV - VISA_call(visa=0x96500, msg=0x437fac80): messageId=0x0002ff19, command=0x0

about 800ms dsp return:
[DSP] @6,109,192tk: [+5 T:0x8fb37084] CN - NODE> 0x8fb36b28(h264enc#0) call(algHandle=0x8fb36be8, msg=0x8fe06c80); messageId=0x0002ff19
[DSP] @6,109,279tk: [+0 T:0x8fb37084] OM - Memory_cacheInv> Enter(addr=0x87bc6000, sizeInBytes=829440)
[DSP] @6,110,228tk: [+0 T:0x8fb37084] OM - Memory_cacheInv> return
[DSP] @6,110,268tk: [+0 T:0x8fb37084] ti.sdo.ce.video1.VIDENC1 - VIDENC1_process> Enter (handle=0x8fb36be8, inBufs=0x8fb3b384, outBufs=0x8fb3b454, inArgs=0x8fe06e04, outArgs=0x8fe06e10)
[DSP] @6,110,366tk: [+5 T:0x8fb37084] CV - VISA_enter(visa=0x8fb36be8): algHandle = 0x8fb36c18
[DSP] @6,110,415tk: [+0 T:0x8fb37084] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0x8fb36c18)
[DSP] @6,110,560tk: [+0 T:0x8fb37084] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Exit
[DSP] @6,160,393tk: [+5 T:0x8fb37084] CV - VISA_exit(visa=0x8fb36be8): algHandle = 0x8fb36c18
[DSP] @6,160,473tk: [+0 T:0x8fb37084] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0x8fb36c18)
[DSP] @6,160,532tk: [+0 T:0x8fb37084] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Exit
[DSP] @6,160,578tk: [+0 T:0x8fb37084] ti.sdo.ce.video1.VIDENC1 - VIDENC1_process> Exit (handle=0x8fb36be8, retVal=0x0)
[DSP] @6,160,638tk: [+0 T:0x8fb37084] OM - Memory_cacheWb> Enter(addr=0x87c91000, sizeInBytes=1500000)
[DSP] @6,162,340tk: [+0 T:0x8fb37084] OM - Memory_cacheWb> return
[DSP] @6,162,377tk: [+5 T:0x8fb37084] CN - NODE> returned from call(algHandle=0x8fb36be8, msg=0x8fe06c80); messageId=0x0002ff19

VIDDEC2_process print

@11,482,527us: [+0 T:0x42fe9490] CE - Engine_fwriteTrace> returning count [1491]
@11,482,688us: [+0 T:0x42fe9490] CV - VISA_call Completed: messageId=0x0002ff19, command=0x0, return(status=0)
@11,482,861us: [+5 T:0x42fe9490] CV - VISA_freeMsg(0x96500, 0x437fac80): Freeing message with messageId=0x0002ff19
@11,482,999us: [+0 T:0x42fe9490] ti.sdo.ce.video1.VIDENC1 - VIDENC1_process> Exit (handle=0x96500, retVal=0x0)
@11,483,124us: [+2 T:0x42fe9490] ti.sdo.dmai - [Venc1] VIDENC1_process() ret 0 generated 1688 bytes
Venc1_process---Time needed is 4777.000 ms
@11,483,806us: [+0 T:0x42fe9490] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Enter (handle=0xd6450, inBufs=0x42fe83e8, outBufs=0x42fe83dc, inArgs=0x42fe8c4c, outArgs=0x42fe84ac)
@11,484,060us: [+5 T:0x42fe9490] CV - VISA_allocMsg> Allocating message for messageId=0x0003bee2
@11,484,269us: [+0 T:0x42fe9490] CV - VISA_call(visa=0xd6450, msg=0x437fbc80): messageId=0x0003bee2, command=0x0

about 800ms dsp return:
[DSP] @17,192,714tk: [+5 T:0x8fb372cc] CN - NODE> 0x8fb37100(h264dec#1) call(algHandle=0x8fb37178, msg=0x8fe07c80); messageId=0x0003bee2
[DSP] @17,192,811tk: [+0 T:0x8fb372cc] OM - Memory_cacheInv> Enter(addr=0x87c91000, sizeInBytes=1688)
[DSP] @17,192,865tk: [+0 T:0x8fb372cc] OM - Memory_cacheInv> return
[DSP] @17,192,907tk: [+0 T:0x8fb372cc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Enter (handle=0x8fb37178, inBufs=0x8fb405dc, outBufs=0x8fb406a0, inArgs=0x8fe07df8, outArgs=0x8fe07e04)
[DSP] @17,193,010tk: [+5 T:0x8fb372cc] CV - VISA_enter(visa=0x8fb37178): algHandle = 0x8fb371a8
[DSP] @17,193,061tk: [+0 T:0x8fb372cc] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0x8fb371a8)
[DSP] @17,193,217tk: [+0 T:0x8fb372cc] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Exit
[DSP] @17,226,499tk: [+5 T:0x8fb372cc] CV - VISA_exit(visa=0x8fb37178): algHandle = 0x8fb371a8
[DSP] @17,226,588tk: [+0 T:0x8fb372cc] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0x8fb371a8)
[DSP] @17,226,647tk: [+0 T:0x8fb372cc] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Exit
[DSP] @17,226,692tk: [+0 T:0x8fb372cc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Exit (handle=0x8fb37178, retVal=0x0)
[DSP] @17,226,756tk: [+5 T:0x8fb372cc] CN - NODE> returned from call(algHandle=0x8fb37178, msg=0x8fe07c80); messageId=0x0003bee2

 

my dvsdk version is dvsdk_2_00_00_22  and use the ti's DVEVM

someone help me! thank u!