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.

DM365, sensor is mt9d131. Sudden motion can cause capture image trailing and video quality descend.

Hi, all:

As above image describe, when motorial car sudden throught our's camera, it will cause two phenomena:

First, trail occured. I think this caused by  exposure time too long. Is right? Other, my colleague say can'y say above image's trailing phenomena, is trailing?

Second,  after motorial car image quality is low,  MB of encode unit can be say. Is encodec setting incorrectness?

 Best Regards

TanYu

  • Hi TanYu,

    Can you please send the complete set of i/p parameters used (both create time and dynamic). Also, it will be helpful if you can attach a stream instead of snapshot.

    regards

    Yashwant

  • Hi Yashwant

    I am sorry. we don't save video stream for this,  we only capture a snapshot.

    below is encode parameter setting:(Is i/p parameters used (both create time and dynamic), you need?  or you need a set of sensor parameters)

    /* Set up codec parameters */
      h264Params.videncParams.size        = sizeof(IH264VENC_Params);
      h264Params.videncParams.maxWidth = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiWidth;
      h264Params.videncParams.maxHeight = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiHeight;
       h264Params.videncParams.encodingPreset = XDM_HIGH_QUALITY;
       h264Params.videncParams.inputChromaFormat = XDM_YUV_420SP;
      h264Params.videncParams.reconChromaFormat = XDM_YUV_420SP;

     h264Params.videncParams.maxFrameRate   = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiFps*1000;

      /* Set up codec parameters depending on bit rate */
      iEncBitrateMode[uiEnInitOrder[i]] = gm_stEncParams[iChannel][uiEnInitOrder[i]].encRcMode;
      if(encVBRMode == gm_stEncParams[iChannel][uiEnInitOrder[i]].encRcMode) /* Variable bit rate */
      {
       h264Params.videncParams.rateControlPreset = IVIDEO_NONE;

       /*If variable bit rate use a bogus bit rate value (> 0) since it will be ignored.*/
       h264Params.videncParams.maxBitRate    = 0;
       
      }
      else /* Constant bit rate */
      {
       
       h264Params.videncParams.rateControlPreset = IVIDEO_STORAGE;

       h264Params.videncParams.maxBitRate   = ALLOWED_MAX_BITRATE; //gm_stEncParams[iChannel][uiEnInitOrder[i]].uiTargetBitRate*1000;
      }
      h264Params.videncParams.maxInterFrameInterval = 0;
      
            h264Params.entropyMode = 1;

      h264Params.profileIdc = 77;
      h264Params.levelIdc   = 50;
      h264Params.transform8x8FlagInterFrame = 0;
      h264Params.transform8x8FlagIntraFrame = 0;
      h264Params.seqScalingFlag = 0;

      uiTargetBitRate[uiEnInitOrder[i]]     = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiTargetBitRate;   
      uiGop[uiEnInitOrder[i]]       = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiGop; 
      uiFps[uiEnInitOrder[i]]                         = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiFps;

            h264DynParams.videncDynamicParams.size = sizeof(H264VENC_DynamicParams);
      h264DynParams.videncDynamicParams.targetBitRate  = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiTargetBitRate*1000;
      h264DynParams.videncDynamicParams.inputWidth   = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiWidth;
      h264DynParams.videncDynamicParams.inputHeight   = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiHeight;
      h264DynParams.videncDynamicParams.refFrameRate  = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiFps*1000;
      h264DynParams.videncDynamicParams.targetFrameRate = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiFps*1000;
      h264DynParams.videncDynamicParams.interFrameInterval = 0;
      h264DynParams.videncDynamicParams.intraFrameInterval = 0;//gm_stEncParams[iChannel][uiEnInitOrder[i]].uiGop;
            h264DynParams.idrFrameInterval = gm_stEncParams[iChannel][uiEnInitOrder[i]].uiGop;
      h264DynParams.resetHDVICPeveryFrame = 1;

    Best Regards

    TanYu

  • What is the frame rate, Bitrate and resolution ?
     
    regards
    Yashwant

     

  • Hi, Yashwant

    frame rate is: 25/fps

    bitrate is: 4mb/s

    resolution is: 720p

    I frame gap is: 60

    Best Regards

    TanYu

  • Hi TanYu,

    Which version encoder you are using? And to find route cause for this issue, please dump Capture device output YUV(input to encoder) and output stream of encoder.

    Did you enable features like airRate, enableROI and multislice?

  • Hi Veeranna,

    My codec version is dm365_h264enc_02_00_00_09_production, and I disable feature airRate, enable ROII and multislice. Thus may be router can't cause for this cause.

    Thinks your suggestion. I can try it.  Can I use two-pass encoding solve seconds problem?

    Best Reagrds

    TanYu

  • Hi TanYu,

    The codec you are using is little old version, can you please migrate to latest version.  Please download latest codec ( H.264 Encoder, Version 2.20.00.05) from http://software-dl.ti.com/dsps/dsps_public_sw/codecs/DM36x/index_FDS.html. It has so many new features. 

    Please refer  http://processors.wiki.ti.com/index.php/H.264_DM36x_Ver_2.1_Codec and http://processors.wiki.ti.com/index.php/Migration_Guide_for_DM36x_H.264_version_2.2_codecs

     migration guides. 

    Thanks,

    Veeranna

  • Hi Veeranna,

    Thank you for your notice, I can try this codec later.  For your notice, Is codec cause my problem?

    regards

    Tanyu

  • Hi

    Cant say issue is in codec or outside, we are actively supporting latest version encoder and it has bug fixes and quality tuning.  Please try to use latest encoder, if issue still persists send us YUV  and generated stream

  • Hello, now I am also doing the developpement of the DM365 with the camera MT9D131, and have you the driver of the MT9D131 for the board Davinci, and what is the address I2C of this camera.Thank you very much, my e-mail "chemi@esiee.fr", QQ:522260584

  • Hi,

    I think i2c address can be find at MT9D131 datasheet. For example:

    static struct mt9d131_channel mt9d131_channel_info[MT9D131_NUM_CHANNELS] = {
     {
      .params.inputidx = 0,
      .params.std = V4L2_STD_720P_60,
      .i2c_dev = {
       .i2c_addr = (0xBA >> 1),
       .i2c_registration = 0
      },
      .dec_device = NULL,
      .params.format.pll = 80 /* set default master clk to 80 MHz */
     }
    };

    Best Regards

    TanYu

  • But where can I find the driver of MT9D131? And I fuse the camera by myself, so how can I deal with the Pin "Reset and Standby", somebody said to me that I should use the GPIO to control them, but I don't know how to deal with it. I am the beginner of board Davinci.