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.

H264 encode performance on DM365/DM368



Hi All

         I have got an document  "Codec_Combo_Feasibility_Matrix_ver1.0.xls" which used to calculate the encode combination feasibility , and I found that the calculate result is different with the real test result, for example:

         I have tried set "DM368 + High quality + 3*720x480/H264/30FPS + 1*720x480/MPEG4/30FPS" it will cost 1038 milliseconds, but I have tried encode 3*704x480/H264/30FPS + 1*704x480/MPEG4/30FPS on DM368, the real frame rate is about 24FPS, it means it will cost about 1200 milliseconds

         is there any thing wrong?

         What I want to know is the exact H264 encode performance on DM365/DM368 and is there any way to enhance the H264 encode performance on DM365/DM368?

  • Hi Tracy,

    Which versions of the encoders you are using?. For H264 please use latest(02.30.00.04). and for MPEG4 please use latest  MJCP version.

    With High Quality mode also you should get 3D1_h264+1D1MPEG4.

    If you want enhance the performance please use High Speed mode for H264 encoder and have a look at http://processors.wiki.ti.com/index.php/DM36x_system_optimization

    Thanks,

    Veeranna

  • Hi Veeranna:

                 

    Veeranna Hanchinal said:
    With High Quality mode also you should get 3D1_h264+1D1MPEG4.

                  Tracy>> You mean we can got 30FPS with 3xD1 H264 + 1xD1MPEG4 on DM365/DM368? I have tried on both DM365 and DM368, the real frame rate is about 22~24FPS.

  • Hi Tracy,

    Can you try running single or dual stream of H264 for D1 match the performance numbers  with performance mentioned data sheet. Performance mentioned in datasheet are measured on DM368(ARM@432MHz and DDR@340MHz).

    Thanks,

    Veeranna

  • Hi Veeranna:

                 Yes, the frame rate can reach to 30FPS if only encode single or dual stream of H264 for D1, I just want to know the encode performance on DM368, the result calculate by "Codec_Combo_Feasibility_Matrix_ver1.0.xls" is too rough for us to estimate multiple encode combination feasibility on DM365/DM368, is there any update version which can help us got the result more strict?

  • Hi Tracy,

    With Single or dual stream you need observe the time taken by process frame call or codec, because whole system performance might be limited to 30FPS by capture device performance.

    "Codec_Combo_Feasibility_Matrix_ver1.0.xls" has theoretical numbers, so you can observe some variations. Data sheet numbers are measured in standalone test bench, so your end performance  number will be nearer to this numbers.

    Thanks,

    Veeranna

  • Hi Veeranna,

               Thanks for you quick response, yes the FPS will up to 30FPS due to limited by capture device performance, but now in my system, the encode is the bottleneck, We can find the encode performance in data sheet but it only contain several kinds of combination.

                As I memtioned before, I have tried encode 4 channel D1 streaming on DM368 and got 23FPS, but from the document "Codec_Combo_Feasibility_Matrix_ver1.0.xls", it can reach to 29FPS, how could i know the real performance under this case? Is there any way to enhance the encode performance(Still use high quality mode)?

  • Hi Tracy,

    In Standalone for D1 resolution, high quality mode runs at 148 fps[please check section H264_ENC_05 in data sheet]; so in system 4D1 of H264 should run.

    Can you please share the performance numbers log and encoder parameters?.

    Thanks,

    Veeranna

  • Hi Veeranna:

               Thanks for you update.

               

    Veeranna Hanchinal said:

                         In Standalone for D1 resolution, high quality mode runs at 148 fps[please check section H264_ENC_05 in data sheet]; so in system 4D1 of H264 should run.

                

                 Tracy>> This is an idea case, right? What I want to know is the performance with IPNC SDK, you know in IPNC SDK, the encode can't work con-currently, here attached a picture for you reference:

                          

                 I think the IPNC AV_SERVER archtecture would impact the performance much if the DSP is not the bottleneck, right?

                 Could you help provide the performance when encode 4 channel D1 H264 streaming with the IPNC SDK solution?

  • Hi Tracy,

    10ms for one D1 is very high. It should be around 6ms or at max 6.5 to 7 ms. We dnt have set up to run 4D1 at our end.

    In your system do you have option to run 1080p? In our IPNC 1080p run at 30fps. If you scale 1080p to D1 its 6 times. so running  4D1 should not be the issue.

    Can you also share all encoder params. please all encoder parameters which affects performance like enableDDR, slicemode etc.

    Thanks,

    Veeranna

  • Hi Veeranna,

                Here are the H264 encode parameters for you reference:

        encodingPreset=2,
        rateControlPreset=4,
        maxHeight=480,
        maxWidth=704,
        maxFrameRate=30000,
        maxBitRate=16000000,
        dataEndianness=1,
        maxInterFrameInterval=0,
        inputChromaFormat=9,
        inputContentType=0,
        reconChromaFormat=9,
        pObj->params_h264.profileIdc=66,
        pObj->params_h264.levelIdc=31,
        pObj->params_h264.entropyMode=0,
        pObj->params_h264.transform8x8FlagIntraFrame=0,
        pObj->params_h264.transform8x8FlagInterFrame=0,
        pObj->params_h264.enableVUIparams=1,
        pObj->params_h264.meAlgo=0,
        pObj->params_h264.seqScalingFlag=0,
        pObj->params_h264.enableARM926Tcm=0,
        pObj->params_h264.enableDDRbuff=0,
        pObj->params_h264.transform8x8FlagIntraFrame=0,
        pObj->params_h264.transform8x8FlagInterFrame=0,
        pObj->params_h264.seqScalingFlag=0,
        pObj->params_h264.entropyMode=0,
        pObj->params_h264.encQuality=0
        intraFrameInterval=0
        forceFrame=3
        videncDynamicParams.forceFrame=3
        sliceSize=0
        airRate=0
        intraFrameQP=33
        interPFrameQP=33
        initQ=28
        rcQMax=51
        rcQMin=1
        maxDelay=2000
        lfDisableIdc=0
        enableBufSEI=0
        enablePicTimSEI=0
        idrFrameInterval=10
        perceptualRC=1
        mvSADoutFlag=1
        resetHDVICPeveryFrame=1
        enableROI=1
        metaDataGenerateConsume=0

  • Hi,

    rateControlPreset=4 means fixed Qp mode are u interested in this? Can you please set it to CBR or VBR and targetbitarte around 1-2mbps and try , disbale ROI, set mvSADoutFlag=0, resetHDVICPeveryFrame= 2 to run with MPEG4 (0 if you are running all 4 D1 h264).

    Thanks,

    Veeranna

  • Hi Veeranna:

                Here are the test result after update parameters base on your suggestion:

     Module   | Avg Time/Frame | Frame-rate | Total time | Total Frames |
     CAPTURE  |          41.88 |      23.88 |      37738 |          901 |
     ENCODE0  |           9.02 |     110.82 |       7923 |          878 |
     ENCODE1  |           9.26 |     107.95 |       8143 |          879 |
     ENCODE2  |          11.94 |      83.72 |      10499 |          879 |
     ENCODE3  |          10.84 |      92.22 |       9521 |          878 |
     STREAM   |           1.31 |     765.08 |       4593 |         3514 |

    Here attached parameters for you reference:

    encodingPreset=2
    rateControlPreset=1
    maxHeight=480,
    maxWidth=704,
    maxFrameRate=30000,
    maxBitRate=16000000,
    dataEndianness=1,
    maxInterFrameInterval=0,
    inputChromaFormat=9,
    inputContentType=0,
    reconChromaFormat=9,
    pObj->params_h264.profileIdc=66,
    pObj->params_h264.levelIdc=31,
    pObj->params_h264.entropyMode=0,
    pObj->params_h264.transform8x8FlagIntraFrame=0,
    pObj->params_h264.transform8x8FlagInterFrame=0,
    pObj->params_h264.enableVUIparams=1,
    pObj->params_h264.meAlgo=0,
    pObj->params_h264.seqScalingFlag=0,
    pObj->params_h264.enableARM926Tcm=0,
    pObj->params_h264.enableDDRbuff=0,
    pObj->params_h264.transform8x8FlagIntraFrame=0,
    pObj->params_h264.transform8x8FlagInterFrame=0,
    pObj->params_h264.seqScalingFlag=0,
    pObj->params_h264.entropyMode=0,
    pObj->params_h264.encQuality=0
    pObj->dynamicParams.intraFrameInterval=0
    pObj->dynamicParams.forceFrame=3
    pObj->dynamicParams_h264.videncDynamicParams.forceFrame=3
    pObj->dynamicParams_h264.sliceSize=0
    pObj->dynamicParams_h264.airRate=0
    pObj->dynamicParams_h264.intraFrameQP=28
    pObj->dynamicParams_h264.interPFrameQP=28
    pObj->dynamicParams_h264.initQ=28
    pObj->dynamicParams_h264.rcQMax=51
    pObj->dynamicParams_h264.rcQMin=1
    pObj->dynamicParams_h264.maxDelay=2000
    pObj->dynamicParams_h264.lfDisableIdc=0
    pObj->dynamicParams_h264.enableBufSEI=0
    pObj->dynamicParams_h264.enablePicTimSEI=0
    pObj->dynamicParams_h264.idrFrameInterval=10
    pObj->dynamicParams_h264.perceptualRC=1
    pObj->dynamicParams_h264.mvSADoutFlag=0
    pObj->dynamicParams_h264.resetHDVICPeveryFrame=0
    pObj->dynamicParams_h264.enableROI=0
    pObj->dynamicParams_h264.metaDataGenerateConsume=0

  • Hi Tracy,

    Still numbers are more. Can you please increase IDR interval 30 or more. And also conform you took the system level optimization.

    And also try single D1 and get the numbers.

    Thanks,

    Veeranna

  • Are you able to get expected performance numbers?

  • Hi Veeranna:

              I still can't get the expected performance numbers even emlarge the GOV length to 150.

  • Hi Tracy,

    Please measure performance numbers on stand-alone and single channel on system. Also check load on ARM926.

    Thanks,

    Veeranna

  • Hello Tracy,

    I'm interested in the Codec_Combo_Feasibility_Matrix_ver1.0.xls document you mentioned. However I cannot locate this document with a Google search. Could you possibly let me know where you got it from?

    Thanks

    Best regads
    Seb