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.

Not getting 30 FPS in H264 encode application on DM365

Hi,

I am having a DM365 300MHz custom board. DM365 H264 codec supports 720p @ 30 fps. But i am not getting 30 FPS with my sample application.

Video Parameters are as follows:

  • Res: 1024x768
  • Bitrate: 10Mbps
  • High Profile

My application flow is as follows: (All sequential process)

  1. Capture 1024x768 frame in YUV422 format
  2. Convert it to YUV420 using resizer
  3. Encode the frame
  4. Dump the frame in file on USB HDD

I am getting around 25FPS with this application. I have done profiling of my application: The resizer takes around 8 msec, encoder takes around 24 msec and file dump takes around 4 msec. It is overshooting the 33msec mark that's why i am not getting 30 FPS.

Can anyone tell me why encoder is taking this much time in encoding one frame? I am using H264 platinum codec.

Thanks,

Alok

  • Hi,

    Please remember that highest speed is obtained by setting the codec base parameter encodingPreset = XDM_HIGH_SPEED.

    The performance you measure should be close to the numbers provided in the datasheet

    Thanks

    Cesar

  • will you please share the your encoder configuration and your *.cfg file configuration.

  • Hi Sujit,

    Following are my encoder configs:

    • encodingPreset = XDM_DEFAULT;
    • size           = sizeof(IVIDENC1_Params);
    • rateControlPreset = IVIDEO_STORAGE;
    • maxBitRate=10Mbps
    • maxHeight = 768
    • maxWidth  = 1024
    • maxFrameRate = 30000
    • dataEndianness        = XDM_BYTE;
    • maxInterFrameInterval = 0;
    • inputContentType      = IVIDEO_PROGRESSIVE;
    • reconChromaFormat     = XDM_YUV_420SP;
    • inputChromaFormat  = XDM_YUV_422ILE;

    Encoder extended params

    • profileIdc        = 100
    • levelIdc          = 30;
    • entropyMode       = 0;
    • aspectRatioX      = 1;
    • aspectRatioY      = 1;
    • pixelRange        = 1;
    • enableVUIparams   = 0;
    • meAlgo            = 1;
    • unrestrictedMV    = 1;
    • encQuality        = 1;
    • enableARM926Tcm   = 0;
    • sliceMode         = 0;
    • outputDataMode    = 1;
    • sliceFormat       = 1;

    Encoder dynamic params

    • inputHeight = 768
    • inputWidth = 1024
    • refFrameRate = 30000
    • targetFrameRate = 30000
    • targetBitRate = 10Mbps
    • intraFrameInterval  = 30
    • generateHeader     = XDM_ENCODE_AU;
    • captureWidth       = hVideoEncoder->vidEncCfg.width;
    • forceFrame         = IVIDEO_NA_FRAME;
    • interFrameInterval = 0;
    • mbDataFlag         = FALSE

    Extended dynamic params

    • sliceSize = 0;
    • airRate = 0;
    • intraFrameQP =30;
    • interPFrameQP = 28;
    • initQ = 28;
    • rcQMax = 51;
    • rcQMin= 0;
    • rcQMaxI = 51;
    • rcQMinI = 0;
    • rcAlgo = 0;
    • maxDelay = 2000;
    • intraSliceNum = 0;
    • lfDisableIdc = 0;
    • meMultiPart = 0;
    • enableBufSEI = 0;
    • enablePicTimSEI = 0;
    • intraThrQF = 5;
    • perceptualRC = 0;
    • idrFrameInterval = 0;
    • mvSADoutFlag = 1;
    • resetHDVICPeveryFrame = 0;
    • enableROI = 1;
    • metaDataGenerateConsume = 0

    Attached is the .cfg file

    captureEncode.cfg
  • Hi Alok,

     it seems you aret using the platinum mode.

    please make

    encodingPreset = XDM_HIGH_SPEED / XDM_HIGH_QUALITY

    encQuality        = 2;

    Refer to the h264_encoder_dm365_userguide.pdf.

  • Sorry for the typo mistake.

    it seems you are not using the platinum mode.

    to use platinum mode please make

    encodingPreset = XDM_HIGH_SPEED / XDM_HIGH_QUALITY

    encQuality        = 2;

    Refer to the h264_encoder_dm365_userguide.pdf.

  • Thanks Cesar and Sujit,

    By setting encoderPreset to XDM_HIGH_SPEED, I am getting 30fps for my video configurations.

    Regards,

    Alok Bhatt