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.

Failed to create JPEG encoder while H.264 encoder is running on DM365

Hi,

 Our DM365 system must capture JPEG image while H.264 encoder is recording video. While H.264 encoder is running, creating JPEG encoder will failed.

(Creating JPEG will succceed if H.264 is not running)

I attached the .cfg file and the error log when JPEG failed.

@18,427,168us: [+0 T:0x000b52e0] CE - Engine_open> Enter('encodedecode', 0x0, 0xb4b74)
@18,427,415us: [+4 T:0x000b52e0] CE - Engine_open> engine->server = 0x0
@18,427,609us: [+0 T:0x000b52e0] CE - Engine_open> return(801096)
@18,428,035us: [+0 T:0x000b52e0] ti.sdo.ce.image1.IMGENC1 - IMGENC1_create> Enter (engine=0xc3948, name='jpegenc', params=0xc3900)
@18,428,272us: [+0 T:0x000b52e0] CV - VISA_create(0xc3948, 'jpegenc', 0xc3900, 0x460, 'ti.sdo.ce.image1.IIMGENC1')
@18,428,467us: [+0 T:0x000b52e0] CV - VISA_create2(0xc3948, 'jpegenc', 0xc3900, 0x18, 0x460, 'ti.sdo.ce.image1.IIMGENC1')
@18,428,797us: [+0 T:0x000b52e0] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter (fxns=0x402607b8, idma3Fxns=0x0, iresFxns=0x4026076c, params=0xc3900, attrs=0xb49c4)
@18,429,018us: [+2 T:0x000b52e0] ti.sdo.ce.alg.Algorithm - Algorithm_create> useCachedMem = -1
@18,429,211us: [+0 T:0x000b52e0] ti.sdo.ce.alg - ALG_create> Enter (scratchId=1, fxns=0x402607b8, parentAlg=0x0, params=0xc3900, useCacheMem=-1)
@18,429,415us: [+2 T:0x000b52e0] ti.sdo.ce.alg - ALG_create> algNumAlloc 5 memory recs
@18,429,593us: [+2 T:0x000b52e0] ti.sdo.ce.alg - ALG_create> algAlloc returned numRecs=5
@18,429,760us: [+4 T:0x000b52e0] ti.sdo.ce.alg - ALG_create>  Memory requested memTab[0]: size=0xf54, align=0x80, space=0x11, attrs=0x1
@18,429,939us: [+4 T:0x000b52e0] ti.sdo.ce.alg - ALG_create>  Memory requested memTab[1]: size=0xc00, align=0x80, space=0x11, attrs=0x1
@18,430,110us: [+4 T:0x000b52e0] ti.sdo.ce.alg - ALG_create>  Memory requested memTab[2]: size=0xc400, align=0x80, space=0x11, attrs=0x1
@18,430,290us: [+4 T:0x000b52e0] ti.sdo.ce.alg - ALG_create>  Memory requested memTab[3]: size=0x968, align=0x80, space=0x11, attrs=0x1
@18,430,461us: [+4 T:0x000b52e0] ti.sdo.ce.alg - ALG_create>  Memory requested memTab[4]: size=0x64, align=0x80, space=0x11, attrs=0x1
@18,430,631us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> memTab=0x10fe20, n=5, useCachedMem=-1
@18,436,078us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(3924) = 0x40665000.
@18,436,379us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x40665000) = 0x863ae000.
@18,437,106us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(3072) = 0x40676000.
@18,437,380us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x40676000) = 0x863ad000.
@18,438,290us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(50176) = 0x406f8000.
@18,438,587us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x406f8000) = 0x86305000.
@18,439,686us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(2408) = 0x40707000.
@18,440,155us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x40707000) = 0x844c7000.
@18,440,910us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(100) = 0x40708000.
@18,442,710us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x40708000) = 0x844c8000.
@18,443,254us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> Returning (TRUE)@18,443,941us: [+4 T:0x000b52e0] ti.sdo.ce.alg - ALG_create> algInit returned IALG_EOK
@18,444,200us: [+0 T:0x000b52e0] ti.sdo.ce.alg - ALG_create> Exit (algHandle=0x40665000)
@18,444,831us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory> memTab=0xb4848, n=1
@18,445,019us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> memTab=0xb4848, n=1, useCachedMem=-1
@18,445,408us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(320) = 0x4169e000.
@18,445,891us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x4169e000) = 0x844c6000.
@18,446,182us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> Returning (TRUE)@18,446,303us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_acquire> lock[0xaec48]
@18,446,542us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_acquire> lock[0xaec48]
@18,447,090us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_release>lock[0xaec48]
@18,447,338us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_release>lock[0xaec48]
@18,447,535us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_acquire> lock[0xaec48]
@18,447,738us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_acquire> lock[0xaec48]
@18,448,131us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory> memTab=0xb47fc, n=1
@18,448,353us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> memTab=0xb47fc, n=1, useCachedMem=-1
@18,448,752us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(344) = 0x4169f000.
@18,449,418us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x4169f000) = 0x844c4000.
@18,449,741us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> Returning (TRUE)@18,450,123us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory> memTab=0xb4810, n=1
@18,450,591us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> memTab=0xb4810, n=1, useCachedMem=-1
@18,453,390us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_alloc(296) = 0x416a0000.
@18,453,905us: [+4 T:0x000b52e0] OM - Memory_contigAlloc> CMEM_getPhys(0x416a0000) = 0x844c5000.
@18,454,467us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_allocMemory2> Returning (TRUE)@18,454,595us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_freeMemory> memTab=0xb47fc, n=1
@18,454,809us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_freeMemory2> memTab=0xb47fc, n=1, useCachedMem=-1
@18,455,182us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_release>lock[0xaec48]
@18,455,673us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_release>lock[0xaec48]
@18,456,085us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_acquire> lock[0xaec48]
@18,456,303us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_acquire> lock[0xaec48]
@18,456,743us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_release>lock[0xaec48]
@18,457,008us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_release>lock[0xaec48]
@18,457,209us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_acquire> lock[0xaec48]
@18,457,413us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_acquire> lock[0xaec48]
@18,458,181us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_release>lock[0xaec48]
@18,458,475us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_release>lock[0xaec48]
@18,458,681us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_acquire> lock[0xaec48]
@18,459,098us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_acquire> lock[0xaec48]
@18,459,348us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_release>lock[0xaec48]
@18,459,569us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_release>lock[0xaec48]
@18,459,753us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_acquire> lock[0xaec48]
@18,459,952us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_acquire> lock[0xaec48]
@18,460,702us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_freeMemory> memTab=0xb482c, n=1
@18,460,939us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_freeMemory2> memTab=0xb482c, n=1, useCachedMem=-1
@18,463,017us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Entered LockMP_release>lock[0xaec48]
@18,463,329us: [+0 T:0x000b52e0] ti.sdo.ce.osal.LockMP - Leaving LockMP_release>lock[0xaec48]
@18,463,769us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_freeMemory> memTab=0xb484c, n=1
@18,463,981us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_freeMemory2> memTab=0xb484c, n=1, useCachedMem=-1
@18,464,350us: [+7 T:0x000b52e0] ti.sdo.ce.alg.Algorithm - Algorithm_create> Assignment of alg resources through RMAN FAILED (0x7)
@18,464,996us: [+0 T:0x000b52e0] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(alg=0x10fe08)
@18,465,305us: [+0 T:0x000b52e0] ti.sdo.ce.alg - _ALG_freeMemory2> memTab=0x10ff00, n=5, useCachedMem=0
@18,466,444us: [+0 T:0x000b52e0] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Exit
@18,466,685us: [+0 T:0x000b52e0] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x0)
@18,466,870us: [+6 T:0x000b52e0] CV - VISA_create2> FAILED to create local codec.
@18,467,507us: [+0 T:0x000b52e0] CV - VISA_delete(0x10fdd0)
@18,467,842us: [+5 T:0x000b52e0] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
@18,468,081us: [+0 T:0x000b52e0] ti.sdo.ce.image1.IMGENC1 - IMGENC_create> return (0x0)
@18,468,270us: [+7 T:0x000b52e0] ti.sdo.dmai - [Ienc1] Can't open imaging encode algorithm
[ERRO][03:19:27.468][1446]CEJPEGEncoder.cpp:147(Open): Ienc1_create failed
@18,469,028us: [+0 T:0x000b52e0] CE - Engine_close(0xc3948)                                                                 
@18,469,727us: [+0 T:0x000b52e0] CS - Server_disconnectTrace('0xc3948', 0x0)
@18,469,960us: [+0 T:0x000b52e0] CS - Server_disconnectTrac

libce_dm365.cfg
  • Hi,

    You do not need to create JPEG enc instance when you want to process JPEG enc. You can create JPEG instance when system is initialized.

    Though you want to do JPEG encode +h264 encode at same time, you can do them sequentially once they can be done in real time. And if you can do it sequentially, you can get better performance of h264 encode as it can use MJCP memory.

  • Which version of Codecs (H.264 and JPEG) are you using? What is the version of LinuxUtils and FrameWork Components in the DVSDK package?

    One thing that i see missing in your .cfg file is the highlighed line in red below.

    var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings');
    EDMA3.maxRequests = 128;

    I think you should add the above line and try again. Hopefully it should fix the problem.

    Regards,

    Anshuman

    PS: Please mark the post as verified, if you think it has answered your question. Thanks.

  • It works! That's great. Thanks

    Regards

    lcj