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.

dm355 jpeg codec

Hi:

I want to run MPEG4 and JPEG encoding engine at the same time. Now he first frame JPEG and MPEG4 compression is successful, the second frame into JPEG which do not move. My Kernel version:2.6.10 DVSDK 1.30.0.23, 

Could you please tell me that is why ?


Encode Debug: Entering capture main loop.

Encode Debug: Entering video main loop.

Encode Debug: Entering writer main loop.

Encode Debug: Entering ctrl main loop.

Encode Debug: Entering display main loop.

@12,535,070us: [+0 T:0x4252db60] ti.sdo.ce.image1.IMGENC1 - IMGENC1_process> Enter (handle=0x10d640, inBufs=0x4252d430, outBufs=0x4252d368, inArgs=0x4252d52c, outArgs=0x4252d518)

@12,535,619us: [+5 T:0x4252db60] CV - VISA_enter(visa=0x10d640): algHandle = 0x10d668

@12,535,892us: [+0 T:0x4252db60] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0x10d668)

@12,540,389us: [+5 T:0x4252db60] CV - VISA_exit(visa=0x10d640): algHandle = 0x10d668

@12,540,719us: [+0 T:0x4252db60] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0x10d668)

@12,541,041us: [+0 T:0x4252db60] ti.sdo.ce.image1.IMGENC1 - IMGENC1_process> Exit (handle=0x10d640, retVal=0x0)

Encode Debug: jpegEncoder process returned - 0x0, 15574 bytes)

@12,542,831us: [+0 T:0x4252db60] ti.sdo.ce.video1.VIDENC1 - VIDENC1_process> Enter (handle=0x10d7e8, inBufs=0x4252d468, outBufs=0x4252d458, inArgs=0x4252d440, outArgs=0x4252d3c8)

@12,543,272us: [+5 T:0x4252db60] CV - VISA_enter(visa=0x10d7e8): algHandle = 0x10d810

@12,543,529us: [+0 T:0x4252db60] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0x10d810)

@12,902,481us: [+5 T:0x4252db60] CV - VISA_exit(visa=0x10d7e8): algHandle = 0x10d810

@12,902,879us: [+0 T:0x4252db60] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0x10d810)

@12,903,265us: [+0 T:0x4252db60] ti.sdo.ce.video1.VIDENC1 - VIDENC1_process> Exit (handle=0x10d7e8, retVal=0x0)

@12,943,591us: [+0 T:0x4252db60] ti.sdo.ce.image1.IMGENC1 - IMGENC1_process> Enter (handle=0x10d640, inBufs=0x4252d430, outBufs=0x4252d368, inArgs=0x4252d52c, outArgs=0x4252d518)

@12,944,151us: [+5 T:0x4252db60] CV - VISA_enter(visa=0x10d640): algHandle = 0x10d668

@12,944,421us: [+0 T:0x4252db60] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0x10d668)

 

 

 

  • Hi Yelei,

    Can you let me know the version numbers of both the codecs you are using in your application. Also, the parameter settings which you are using will be useful for me to resolve your issue.

     

    Regards,

    Akshay

  • Yelei,

    This has already been discussed in the thread below,

    http://e2e.ti.com/support/embedded/f/356/p/40743/270944.aspx

  • Hi Adithya,

    My platform is dm355, this thread is based on the 365, both the same?

  • Akshay,

      My Kernel version:2.6.10 DVSDK 1.30.0.23, 

    MPEG4 parameter :

    algName = videoEncodeAlgNames[videoEncoder]; params.size = sizeof(VIDENC1_Params); params.encodingPreset = XDM_DEFAULT; params.rateControlPreset = bitrate < 0 ? IVIDEO_NONE : IVIDEO_STORAGE; params.maxHeight = height; params.maxWidth = width;  params.maxFrameRate = gblGetYFactor() == NTSCSTD ? 30000 : 25000;  params.maxBitRate = bitrate < 0 ? 0 : bitrate;  params.inputChromaFormat = XDM_YUV_422ILE;  params.dataEndianness = XDM_BYTE;  params.maxInterFrameInterval = 0;  params.inputContentType = IVIDEO_PROGRESSIVE; /* Create video encoder instance */ hEncode = VIDENC1_create(hEngine, algName, &params); if (hEncode == NULL) { ERR("Failed to open video encode algorithm: %s (0x%x)\n", algName, Engine_getLastError(hEngine)); return FAILURE; } dynamicParams.size = sizeof(VIDENC1_DynamicParams); dynamicParams.inputHeight = height; dynamicParams.inputWidth = width; dynamicParams.targetBitRate = bitrate < 0 ? 0 : bitrate; dynamicParams.intraFrameInterval = 30; dynamicParams.generateHeader = XDM_ENCODE_AU; dynamicParams.captureWidth = 0; if (gblGetYFactor() == NTSCSTD) { dynamicParams.targetFrameRate = 30000; dynamicParams.refFrameRate = 30000; } else { dynamicParams.targetFrameRate = 25000; dynamicParams.refFrameRate = 25000; } /* Set video encoder dynamic parameters */ encStatus.size = sizeof(VIDENC1_Status); encStatus.data.buf = NULL; status = VIDENC1_control(hEncode, XDM_SETPARAMS, &dynamicParams, &encStatus);

     

    JPEG parameter :

    /* allocate and initialize image encoder on the engine */ encParams.size = sizeof(IMGENC1_Params); encParams.maxWidth = 720; // WIDTH; encParams.maxHeight = 576; //HEIGHT; encParams.maxScans = 4; encParams.dataEndianness = XDM_DEFAULT; encParams.forceChromaFormat = CHROMAFORMAT; // enc = IMGENC1_create(ce, ENGINE_NAME, &encParams); enc = IMGENC1_create(ce, encoderName, &encParams); if (enc == NULL) { fprintf(stderr, "%s: error: can't open codec %s\n", progName, ENGINE_NAME); } 

    else printf("jpegenc create successful\n"); *jpegencp=enc; /* set the parameters for encoding */ dynParams.size = sizeof(IMGENC1_DynamicParams); dynParams.numAU = XDM_DEFAULT; dynParams.inputChromaFormat = CHROMAFORMAT; dynParams.inputHeight = 288; //HEIGHT; dynParams.inputWidth = 352; // WIDTH; dynParams.captureWidth = 0; dynParams.generateHeader = XDM_ENCODE_AU; dynParams.qValue = 80; imgStatus.size = sizeof(imgStatus); if (IMGENC1_control(enc, XDM_SETPARAMS, &dynParams, &imgStatus) ==XDM_EFAIL) { fprintf(stderr, "%s: error: could not set PARAMS: 0x%x\n", progName,imgStatus.extendedError); } /* ask the codec for buffer sizes - these are typically conservative */ if (IMGENC1_control(enc, XDM_GETBUFINFO, &dynParams, &imgStatus) ==XDM_EFAIL) { fprintf(stderr, "%s: error: could not get BUFINFO: 0x%x\n", progName,imgStatus.extendedError); }

  • Yelei,

    Thank You.

    But I'm going to need the specific mpeg4 encoder and jpeg encoder version numbers.

    You can find them in the release notes which are at dvsdk_01_30_00_23/dm355_codecs_<x>_<xx>_<xxx>/packages/ti/sdo/codecs/<mpeg4enc or jpegenc>/dm355/docs/

    -Akshay

  • Hi Akshay,

    Thank you for your reply.

    Sequential JPEG Encoder (v1.05.000) MPEG4 Simple Profile Encoder (v1.05.000)

  • HI Yelei,

     

    The codec components which you are using are very old. I suggest you move to the latest releases of codec components for DM355 platform. You will need to upgrade your DVSDK version as well.

     

    Regards,

    Akshay

     

  • Hi, Akshay,

    Is this version dose not support MPEG4 and JPEG engine  work at the same time?

    I have done a lot  of other work in this version.

    If I change the version ,I need to speed a lot of time to complete.

    There are other solution?

  • Hi Yelei,

    Unfortunately, we no longer support the older releases of DM355 codecs which you are using. 

    I suggest you move up to the latest codec releases on the DVSDK 3.1 framework. These codecs do support MPEG4 and JPEG running in tandem. We can take up specific support as and when you need it.

     

    Regards,

    Akshay