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.

How to set h.264 extend parameters using DMAI

Other Parts Discussed in Thread: TMDXEVM368, TVP5146

Dear Sir,

I want to set h264 parameters ,especially h264 extend parameters . I use dvsdk_dm368-evm_4_02_00_06_setuplinux.setuplinux  to setup and in my code (if I want to set profileIdc  and levelIdc   )

IH264VENC_Params  h264params ; 

h264params.videncParams = Venc1_Params_DEFAULT;

......

h264params.videncParams.size = sizeof(IH264VENC_Params);

h264params.profileIdc = 66; /* base profile */ 
h264params.levelIdc = 41;

.......

hVe1 = Venc1_create(hEngine, envp->videoEncoder, (VIDENC1_Params*)&h264params, dynParams);  // I can through the Venc_create function

..... 

  if (Venc1_process(hVe1, hCapBuf, hDstBuf) < 0) {
  printf("return is %d\n",Venc1_process(hVe1, hCapBuf, hDstBuf) );
  ERR("Failed to encode video buffer\n");
            cleanup(THREAD_FAILURE);
        }

the return value is -1

and in Venc1_process function

  status = VIDENC1_process(hVe->hEncode, &inBufDesc, &outBufDesc, &inArgs,&outArgs);

if (status != VIDENC1_EOK) {
        Dmai_err2("VIDENC1_process() failed with error (%d ext: 0x%x)\n",
                  (Int)status, (Uns) outArgs.videncOutArgs.extendedError);
        return Dmai_EFAIL;   // Dmai_EFAIL = -1
    }

 

How to modify my code??

Thank you

zhengxu

  • Hi Zhengxu,

    If you want use extended parameters, It is better to set all members of create time and Dynamic parameter structure. In your case it may happen that you are setting profileIdc to base class but in base param entropyMode is setting to CABAC, which is not correct. So please set all parameters with valid values. For more information about parameters please refer userguide or test application provided with package.

     

    Thanks and regards,

    Veeranna

  • Hi Veeranna,

    Thank you for your reply,In your opinion ,I must set all parameter and Dynamic parameter?  

    such as

     IH264VENC_Params  h264params   = {
      Venc1_Params_DEFAULT,
       66,
       40,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
       0
         };??

    then   Venc1_create(hEngine, envp->videoEncoder, (VIDENC1_Params*)&h264params, (VIDENC1_Params*)&h264dynParams); ??

    I want to ask entropyMode(setting CABAC or CAVLC) belongs to the base parameters?? not belongs to extend parameters??

    In userguide , I only found that part of the parameters set, not all of the parameters,So I don't know all the parameters set correctly (both base and extend parameters)

    Thanks and regards,

    zhengxu

  • Hi Zhengxu,

    Yes you need set all parameters when you use extended parameter. 

    entropyMode belongs to extended parameter of create time parameter. Please have look at interface file(ih264venc.h) to know about parameters structure.

    Userguide has all parameters information. Section 4.2.2 tells about H.264 Encoder extended parameters,  4.2.1.9 gives information about base class create time parameters and 4.2.1.10 gives information about base class dynamic parameters.

  • I also wanted to set the profile level to base line. when i went through the structure passed to Venc1_create () function i,,e IVIDENC1_params does not contain the profile and idc fields in the structure.  When i went through the h264enc test app , it calls H264ENC_create () function which takes IH264VENC_params structure (present in ih264venc.h ) header file. The 1H264VENC_params structure contains IVDENC1_params + h264 codec specific config params like profile and idc. So the structure to be passed while calling Venc1_create () should have been IVDENC1_params.

    Should i change the way of calling enc create i,,e Venc1_create to H264ENC_create () ?

                                  OR

    Does Type casting the structure passed to Venc1_create  to IH264VENC_params will work so that i can see the affect of changing the profile and level values ??

     

     

     

     

  • Hi Pradeep,

    IH264VENC_params structure called extended param struct, as you said it includes VDENC1_params + h264 codec specific  params. So when you are using extended params you need pass this structure pointer to Venc1_create () by typecasting it to (IVDENC1_params*). One thing you can observe here is what size you are setting to 'extparams.videncParams.size' param, if you use base param(IVDENC1_params only) you will set sizeof(IVDENC1_params) or else if yor using extnded struct you will set size as sizeof(IH264VENC_params).

    codec engine will check this size and pass this much size param struct to codec from application, then codec will check the size, and typecast this struct back to 'IH264VENC_params' or IVDENC1_params depending upon size .  So codec will get all params of extened struct.

    ex:

    create(.., ..., algparams)

    {

    .....

     if(extparams.videncParams.size == sizeof(IH264VENC_params)

       {

           IH264VENC_params *h264param = (IH264VENC_params*)algparams;

           validate all params;

       }

       else if(extparams.videncParams.size == sizeof(IVDENC1_params)

       {

        IVDENC1_params *h264param = ( IVDENC1_params*)algparams;

       validate base params;

        set default values for extended params

        }  

        else

       {

           return fail;

       }

    }

     

  • FWIW, there's some further documentation about this technique here:

    http://processors.wiki.ti.com/index.php/Extending_data_structures_in_xDM

    Chris

  • Hi Veeranna,

    First I'm sorry ,I am so busy recently that I can't reply

    Thank your answer,I've solved my problem.The following is my code,I hope to help the others like me

       IH264VENC_Params h264params ={
     Venc1_Params_DEFAULT,
      66,    //profileIdc
      40,    //levelIdc
      0,   //Log2MaxFrameNumMinus4
      0,  //ConstraintSetFlag
      0,  //entropyMode
      0,  //transform8x8FlagIntraFrame
      0,  //transform8x8FlagInterFrame
      0,  //enableVUIparams
      0,  //meAlgo
      0,  //seqScalingFlag
      2,   //encQuality
      0,  //enableARM926Tcm
      0,  //enableDDRbuff
      1,  //sliceMode
      0,  //numTemporalLayers
      0,  //svcSyntaxEnable
      0, //EnableLongTermFrame
      1,  //outputDataMode
      0,  //sliceFormat 
    };

    params->encodingPreset  = XDM_HIGH_SPEED; /*Corresponding encqualitu in params*/  Is important

    h264params.videncParams.size = sizeof(IH264VENC_Params);

     hVe1 = Venc1_create(hEngine, envp->videoEncoder, (VIDENC1_Params*)&h264params,dynParams);

    Thanks and regards,

    zhengxu

  • Hi Veeranna,

    I could get the encoder handle i,,e VENC1_create succeeded after configuring the encoder with extended parameters but i get the error when i call VENC1_process () function. It returns  -1 and the extended error is 0 , bytes consumed is also 0. I've used extended parameters while creating the VENC1_create object where as i've used the BASE parameters for configuring the Dynamic Parameters. The following are the Dynamic Parameters used 

       sEncDynamicParams.size                  = sizeof(VIDENC1_DynamicParams);
        sEncDynamicParams.inputWidth            = 640;
        sEncDynamicParams.inputHeight           = 480;
        sEncDynamicParams.targetBitRate         = 150000; // 150 kbps
        sEncDynamicParams.intraFrameInterval    = 30;
        sEncDynamicParams.generateHeader        = XDM_ENCODE_AU;
        sEncDynamicParams.captureWidth          = 0;
        sEncDynamicParams.forceFrame            = IVIDEO_NA_FRAME;
        sEncDynamicParams.mbDataFlag            = 0;
        sEncDynamicParams.targetFrameRate = 30000;
       sEncDynamicParams.refFrameRate    = 30000;
          

        /* Set video encoder dynamic params */
        sEncStatus.size = sizeof(VIDENC1_Status);
        status = VIDENC1_control(pEncEngineInfo->pEncoderHandle,
                                XDM_SETPARAMS, &sEncDynamicParams,
                                &sEncStatus);

    The XDM_SET PARAMS succeeds but the encode process fails at run time.

    The Extended parameters which are set are same as those shown by Mr zhengxu. The error does state anything. I think it is not an codec error and the error is before the actual codec process. Unable to figure it out

    Is there any way to get the default dynamic parameters and then change only those required and configure it back ?

    Is is encoding process error because of using extended parameters while creating the encoder object and configuring the base Dynamic parameters when XDM_SET_PARAMS is called ? Please suggest

    regards

    pradeep

  • Hi Pradeep,

    Do you mean you are using extended param for create time params and base class for dynamic params?

    assign 'H264VENC_TI_IH264VENC_DYNAMICPARAMS' to your local struct and then  modify the which ever param you are interested. you can run encoder with debug library to get more information.

    you can have look at the post http://e2e.ti.com/support/embedded/f/356/t/121163.aspx

    Thanks,

    Veeranna

  • Hi Veeranna,

    Yes i was using the base parameters for configuring Dynamic Parameters. As per your suggestions i copied the default parameters. I could get the video encoded but decoding is failing. I dumped the encoded data to a file and observed that there is extra data before starting the PPS and SPS bytes. The following are the initial bytes of the dump

    === Dumping frame no: 1   Bytes: 121138
     06  18  23  0a  00  00  0e  00  00  03  00  00  03  00  00  03  00
     03  22  1e  00  0a  03  da  00  00  87  00  00  03  00  00  03
     00  00  03  00  01  91  1e  00  05  01  ee  80  67  42  80  1e   // PPS and SPS starts here i,,e from 0x67 0x42 (baseline)  but i'dont understand why there are extra bytes before

    the start of PPS and SPS

     da  02  80  f4  40  68  ce  3c  80  6e  c0  80  07  20

     

    === Dumping frame no: 2   Bytes: 73768

    0e  80  80  07  80  61  9a  38  09  3f  04  03  60  81  b3  03  ba

    In above frame which is P frame  it should start with NAL header 0x61 bu there are extra 5 bytes. This kind of behavior is seen in all the frames generated by the encoder. The decoding fails because of this

    Is it something related to cache - problem ? The remaining bytes produced by the encoder are proper. Please note that the o/p address provided to the encoder is proper. Do Do you have any idea on this behavior ? If not pelase let me know if i can post this problem in linux utils forum

    regards

    pradeep

  • Hi,

    Are you dumping bitstream just after process call? if not please do it.

    And are you using sliceformat = 0(encoded stream in NAL unit format, NAL unit without start-code), bcz I m not seeing start code in your hex data.? does your decoder understands it? if not please set sliceformat = 1. And which decoder you are using?

    If issue still  persists please share the stream.

  • Hi Pradeep,

    Are you able to solve your issue? If yes Can you please make this post as verify pass?

     

    Thanks,

    Veeranna

  • Hi Veeranna,

    Yes i could solve the problem by configuring the slice format . Thanks for the answer and sorry for late reply

    regards

    pradeep

  • Hi, everyone

     

    I have also a TMDXEVM368 board and the SDK with this board.

    (SDK version is ti-dvsdk_dm368-evm_4_02_00_06)

     

    I also want to change the parameters of H264 encoder, as below:

    --baseline profile, main profile, high profile,

    --CAVLC or CABAC

    but don't know how I can do.

     

    I read this forum,

    but I don't know where is the source code you talked about.

    Could anyone show me the path of the files?

    Further, if can, Could you tell me the way of changing parameters?

     

    thank you!

    with best regards.

     

    -- Hirotaka

     

  • Hi,

    The file which contains above source code is present at  "dvsdk_dm368-evm_4_02_00_06\dvsdk_demos_x_xx_xx_xx\dm365\encode\video.c" directory.

    To know about parameter setting please follow the link http://processors.wiki.ti.com/index.php/Extending_data_structures_in_xDM.

     

     

  • Hi, Mr.Veeranna

     

    This is Hirotaka, the message above you wrote is the reply to my question?

    If so, thank you very much.

    Could I ask you one more?

    In my system the file "video.c" does not contain the code as you said, also Mr. xu zheng just posted.

    I don't know why, in my system the version of "demos" is dvsdk-demos_4_02_00_01.

    Do you have some advice for it?

     

    with best regards

     

    -- Hirotaka

     

  • Hi Veeranna,

    Can you please tell me the path to set members of  Dynamic parameter structure?

    In ih264venc.h file has structure declaration. where we can define values to the members of structure?

    Thanks,

    Dasari

  • Hi zhengxu,

    Can you please tell me the file name andf path to update above mentioned values.

    I am also facing problem to set extended dynamic parameters.

    Thanks,

    Dasari

  • Hi Dasari,

    For DVSDK  :dvsdk_dm368-evm_4_02_00_06\dvsdk_demos_x_xx_xx_xx\dm365\encode\video.c

    For RDK  :/install-dir/Source/ipnc_rdk/av_capture/framework/alg/src/alg_vidEnc.c

  • Hi Prashanth

    Thanks for information. Here, my doubt is I want to set encoder profile with base profile.

    But, In video.c there is no option to update profile,level of encoder.

    can you please tell me how to set these parameters in video.c?

    In video.c we have

    params = envp->params ? envp->params : &defaultParams;
    dynParams = envp->dynParams ? envp->dynParams : &defaultDynParams;

    which case it will take defaultparams and which case it will take user defined parameters?


     

    Regards,

    Dasari

  • Hi,

    You need to declare new extended variable like 

    IH264VENC_Params       *paramsExt;

    IH264VENC_DynamicParams *dynParamsext;

    And you need to fill the all members of that structure, please refer test-application provided encoder(dvsdk_x_xx_xx_xx/dm365_codecs_xx_xx_xx_xx/packages/ti/sdo/codecs/h264enc/apps/client/test/src/h264encoderapp.c). And also refer below link to know about extending params

    http://processors.wiki.ti.com/index.php/Extending_data_structures_in_xDM

  • Hi Prashanth,,

    Thanks for information. now I am clear. 

    One more thing the changes in  (  dvsdk_x_xx_xx_xx/dm365_codecs_xx_xx_xx_xx/packages/ti/sdo/codecs/h264enc/apps/client/test/testvecs/config/testparams.cfg ) the configuration file testparams.cfg will get effect or not in video.c?

    If not what is the use of this configuration file?

    where it will get effect?

    Regards,

    Dasari

  • Hi Dasari,

    The  testparams.cfg will get used in standalone, and not in video.c file.

    In stand alone test-application we read it from testparams.cfg file. Similarly you need to declare a new structure and use all paramas in vedio.c file to run in system.

  • Hi Prashanth,

    Thanks for information.

    Regards,

    Dasari

  • Hi prashanth,

    I want to run pipeline as

    gst-launch v4l2src always-copy=FALSE  ! video/x-raw-yuv, format=(fourcc)NV12,framerate=(fraction)30/1,width=(int)1920,height=(int)1088' ! queue ! TIVidenc1 CodecName=h264enc engineName=CodecServer contiguousInputFrame=TRUE bitrate=1000000 ! queue ! dmaiperf print-arm-load=true ! rtph264pay pt=96 ! udpsink host=192.168.1.33 port=3000

     We Need to get low latency and fps=30. so, I want to change extended parameters of encoder. Can you plese tell me file to set  extended parameters?

    video.c is the file to check demos. Right?

    Regards,

    Dasari

  • Hi Dasari,

    I am not familiar with GStreamer.

    If its using DMAI-Layer, then extended params should be from the file: dvsdk_xx_xx_xx_xx/dmai_xx_xx_xx_xx/packages/ti/sdo/dmai/ce/Venc1.c

    else you can search for the function: 

    status = VIDENC1_process(hVe->hEncode, &inBufDesc, &outBufDesc, &inArgs, &outArgs); and extend the parameters accordingly.

    Dasari said:
    video.c is the file to check demos. Right?

    Yes. It is to check the demos.

  • Hi,

    I have been using custommade LeopardDm368 running with ti-dvsdk_dm368-evm_4_02_00_06.

    The encoder present in this version is H264ENC.version.02.20.00.01. so, I want to migrate to H264ENC.version.02.30.00.06. For that I have replaced /codecs-dm365_4_02_00_00/packages/ti/sdo/codecs/h264enc folder with the h264 version 02.30.00.06.

    Is it fine just by replacing?

    How we can get to know the version of encoder while running application?

    Regards,

    dasari

  • Hi prashanth,

    I have update extended parameters but I am getting error like failed to open codec engine.

    By giving printf I got to know

     hEncode = VIDENC1_create(hEngine, codecName, params); function is getting fail. Its returning NULL.
      if (hEncode == NULL) {
        printf("hEncode is null \n");
            Dmai_err2("Failed to open video encode algorithm: %s (0x%x)\n",
                     codecName, Engine_getLastError(hEngine));
            free(hVe);
            return NULL;
        }


    Any Help?

    Regards,

    Dasari

  • Hi Dasari,

    H264VENC_control(   handle, XDM_GETVERSION, &dynamicparams, &status); should give the version of codec.

    Also please use debug library provided with the 02.30.00.06 version ans send the logs, to know weather any parameter is set wrong.

  • Thank you Prashanth. Following is log

     gst-launch -v v4l2src always-copy=FALSE input-src=composite n

    um-buffers=1000 ! "video/x-raw-yuv,format=(fourcc)NV12,width=736,height=480" ! T

    IVidenc1 engineName=codecServer codecName=h264enc contiguousInputFrame=TRUE bitR

    ate=2000000 rateControlPreset=2 encodingPreset=2 ! dmaiperf print-arm-load=true

    ! rtph264pay pt=96 ! udpsink host=192.168.1.33 port=3000 sync=false

    Setting pipeline to PAUSED ...
    davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
    bytesperline 1440 width 720 height 480
    vpfe-capture vpfe-capture: IPIPE Chained
    vpfe-capture vpfe-capture: Resizer present
    tvp514x 1-005d: tvp5146 (Version - 0x08) found at 0xba (DaVinci I2C adapter)
    bytesperline 1440 width 720 height 480
    bytesperline 1440 width 720 height 480
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: queue-size = 3
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)736, height=(int)480
    Pipeline is live and does not need PREROLL ...
    WARNING: from element /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0: There is no codec present that can handle the stream's type.
    Additional debug info:
    gsttidmaiperf.c(285): gst_dmaiperf_start (): /GstPipeline:pipeline0/GstDmaiperf:dmaiperf0:
    Engine name not specified, not printing DSP information
    WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.
    Additional debug info:
    v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    system error: Invalid argument
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)736, height=(int)480
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)736, height=(int)480
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)25/1, width=(int)736, height=(int)480
    Enter into create function
    CODEC_DEBUG_ENABLE: Inside Funtion to get memtab Requirement -> H264VENC_TI_numAlloc
    CODEC_DEBUG_ENABLE: Number of memtabs required: 15
    CODEC_DEBUG_ENABLE: Inside Funtion to Get Memory Requirements of the current algoirthm  instance -> H264VENC_TI_alloc
    ERROR: from element /GstPipeline:pipeline0/GstTIVidenc1:tividenc10: failed to create video encoder: h264enc

    Additional debug info:
    gsttividenc1.c(1281): gst_tividenc1_codec_start (): /GstPipeline:pipeline0/GstTIVidenc1:tividenc10
    Execution ended after 53296252 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Regards,

    Dasari

  • Hi Dasari,

    From the log, it looks like size is not matching.plz try setting the size of you extended parameters as below.

    params.videncParams.size = sizeof(IH264VENC_Params); 

    If still you see same error, send us full parameter set and the log with CE_DEBUG=3.

  • Hi Prashanth,

    Sorry for late replay. Still I am getting error. Main thing is I want to use slice base encoding to reduce latency.

    help me If any wrong parameter setting

    Attached debug_enable log and CE_DEBUG=3.

    7713.DEBUG_ENABLE_LOG.txt

    8688.CE_DEBUG=3_LOG.txt.

    Regards,

    Dasari

  • The following are the parameters

    h264Params.videncParams.size = sizeof(IH264VENC_Params);
    h264Params.videncParams.encodingPreset = XDM_HIGH_SPEED;
    h264Params.videncParams.rateControlPreset = IVIDEO_LOW_DELAY;
    h264Params.videncParams.maxHeight = 1088;                       
    h264Params.videncParams.maxWidth = 1920;      
    h264Params.videncParams.maxFrameRate = 30000;          
    h264Params.videncParams.maxBitRate = 10000000;
    h264Params.videncParams.dataEndianness = XDM_BYTE;
    h264Params.videncParams.maxInterFrameInterval = 1;
    h264Params.videncParams.inputChromaFormat = XDM_YUV_420SP;
    h264Params.videncParams.inputContentType = IVIDEO_PROGRESSIVE;
    h264Params.videncParams.reconChromaFormat = XDM_YUV_420SP;

    h264Params.profileIdc = 66;
    h264Params.levelIdc = 40;
    h264Params.Log2MaxFrameNumMinus4 = 0;
    h264Params.ConstraintSetFlag = 0;
    h264Params.entropyMode = 0;
    h264Params.transform8x8FlagIntraFrame = 0;
    h264Params.transform8x8FlagInterFrame = 0;
    h264Params.enableVUIparams = 1;
    h264Params.meAlgo = 1;
    h264Params.seqScalingFlag = 0;
    h264Params.encQuality = 2;
    h264Params.enableARM926Tcm = 0;
    h264Params.enableDDRbuff = 0;
    h264Params.sliceMode = 1;
    h264Params.numTemporalLayers = 0;
    h264Params.svcSyntaxEnable = 0;
    h264Params.EnableLongTermFrame = 0;
    h264Params.outputDataMode = 0;
    h264Params.sliceFormat = 0;

    I am not using Extended Dynamic parametes.
     Using Base Dynamic Parameters.

    The above settings for Base profile, Slice base encoding, Low latency.

    Regards,

    Dasari

  • Hi Dasari,

    From the debug log inputID & outputID are 0(zero). It should be 1, as below:

       inargs.videncInArgs.inputID = 1;

       outargs.videncOutArgs.outputID = 1;

    Also in Parameters plz try with:

       h264Params.sliceFormat = 1;

       h264Params.sliceMode = 0;

  • Hi Prashanth,

    with the following parameters

    h264Params.sliceFormat = 1;

       h264Params.sliceMode = 0;

    I am able to get output. But thing is we have to use slice base encoder to get low latency. That is the reason I made  h264Params.sliceMode = 1. Even for this  also we are getting output but outputDatamode should not be zero.

    But, Our need is we have to use these two parameters to get low latency

     h264Params.sliceMode = 1

     h264Params.outputDatamode=0;

    For these settings we are getting error. Any Suggestions?

    Our main concern is getting the latency lessthan 150ms.

    Any Help?

    Regards,

    Dasari

  • This is the structure declaration of IVIDENC1_InArgs in ividenc1.h

    IVIDENC1_InArgs {
        XDAS_Int32 size;        
        XDAS_Int32 inputID;       
        XDAS_Int32 topFieldFirstFlag;
    } IVIDENC1_InArgs;


    In applicaion file,

    IVIDENC1_InArgs ;

    Insted of inargs.videncInArgs.inputID = 1; ,

    inArgs.inputID                      = GETID(Buffer_getId(hInBuf));

    What is wrong there?

    Shall I hardcode inArgs.inputID                      = GETID(Buffer_getId(hInBuf)); to inArgs.inputID=1?

    Regards,

    Dasari

     

  • Hi Dasari,

    Sorry for late reply. 

    Hope you have set h264Params.SliceSize value. If you have not, that might be the reason for ERROR.

     h264Params.sliceMode = 1 will take bit more time. Can you please try with  h264Params.sliceMode = 3. inArgs.inputID, outArgs.inputID can have any non zero values. 

  • Hi Prashanth,

    Thank you for your helping. No, I didnt use extended dynamic parameters. so, i didnt set h264Params.sliceSize.

    Can you please tell me how much should sliceSize if slicemode=3?

    Once again Thank you somuch for your helping.

    Regards,

    Dasari

  • Hi Dasari,

    For sliceMode = 3,  you can set any value for sliceSize, from 1 to frameSize. Minimum is 1 & Maximum value is your frameSize.

  • Hi prashanth,

    Thank you so much for your help. Can you please tell me how to use outputdatamode for low latency.

    what are the related parameters for outputdatamode?

    Regards,

    Dasari

  • Hi Dasari,

    outputDataMode can be used with slice Mode=3, for low latency. these two are related parameters. For more information please refer to Userguide. Thanks.