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.

DM368IPNC-MT5 1080p Performance



At the moment I try to achieve a stable 1080p30 H.264 performance with my DM368IPNC-MT5-A097. Unfortunately I cannot find any settings were this works.

I am running the brand-new 2.5.0 release of the IPNC software. I updated everything: UBL, u-boot, Kernel, cramfs and IE plugin.

I start with these settings:

StreamType: Single, CodecCombo: H.264, Resolution: H264:1080, Framerate: 30, Bitrate: 8000, RateControl: CBR, Overlay disabled, LocalVideo: Off, Mirror: Off, IP Ratio: 30,  EncodePreset: AUTO, PackeSize: 100, ROI: disabled, Face Detect: Off, Motion Detection: Off, Face Recognition: Off, PrivacyMask: Off, BLC: Off, DRE: Off, Flicker: 60hz, WB: Auto, SensorMode: Binning, 2A Engine: Off, LowLight: PrioFrameRate, SNF: Off, TNF: Off, Audio: disabled, Alarm: disabled, Storage: disabled (I close the webbrowser after changing settings)

The scene is just a very boring view of my desk, nothing moves, not too complicated patterns, enough light.

So basically the camera is doing nothing but encoding images. I connect to 1 RTP stream (UDP) via VLC client. The console output is:


 Module   | Avg Time/Frame | Frame-rate | Total time | Total Frames |
 CAPTURE  |          33.51 |      29.84 |      30192 |          901 |
 ENCODE0  |          33.36 |      29.98 |      30053 |          901 |
 STREAM   |           0.86 |    1162.58 |        775 |          901 |
 OSD0     |           0.04 |   22525.00 |         40 |          901 |
 AEWB     |           0.02 |   60400.00 |         15 |          906 |


==================== STREAMING DETAILS ====================
Start Time : 946769079sec 230391usec
End Time   : 946769112sec 773172usec
Total Time to stream 1000 frames: 33542.781 msec
Time per frame: 33.5428 msec
Streaming Performance in FPS: 29.8127
===========================================================

 

So the real throughput of the system is at 29.8 FPS which is not exactly 30 fps.

If I now enable at least the Appro 2A engine (because otherwise the camera is not useful in real world) and a simple Textoverlay of just date/time, I get:

 Module   | Avg Time/Frame | Frame-rate | Total time | Total Frames |
 CAPTURE  |          33.71 |      29.66 |      30374 |          901 |
 ENCODE0  |          33.51 |      29.84 |      30191 |          901 |
 STREAM   |           0.80 |    1254.87 |        718 |          901 |
 OSD0     |           0.66 |    1524.53 |        591 |          901 |
 AEWB     |           1.13 |     888.02 |       1027 |          912 |


==================== STREAMING DETAILS ====================
Start Time : 946769439sec 310330usec
End Time   : 946769473sec 042514usec
Total Time to stream 1000 frames: 33732.184 msec
Time per frame: 33.7322 msec
Streaming Performance in FPS: 29.6453
===========================================================

Now a basic usable camera would be at 29.64 fps - if nothing else happens.

Changing the bitrate to 12000 already results in 29.28 fps. Trying to run any more ARM code (the arm_loading tool and top says the CPU is 40% idle) results in further drops of FPS.

Is there anything I could do to improve performance?

Best regards,

 Andreas.

 

  • Andreas,

    There may be some additional optimizations that can improve performance, but let me verify first.

    Marcus

  • can you please change lines in drv_ipipe.c:

     

    Original:

        if(i==0) {

          pOutConfig->dmaInterval            = 0x80;

          if(gDRV_ipipeObj.rszInfo[i].width > 1300)
            pOutConfig->dmaInterval            = 0x40;

          if(gDRV_ipipeObj.rszInfo[i].width >= 1600)
            pOutConfig->dmaInterval            = 0x20;

        } else {

          pOutConfig->dmaInterval            = 0x40;

        }

    change to

        pOutConfig->dmaInterval            = 0x64;
        if(gDRV_ipipeObj.rszInfo[i].width >= 1600)
            pOutConfig->dmaInterval            = 0x48;

     

    This should solve DDR bottlenecks and give some imrpovements.

     

    Regards,

     

    Raghu

     

  • Hello Raghu,

    thanks for the hint. Could you explain a little more what it does? Is this value also valid when using the resizer in single shot config? Our own device does not use the Appro software stack with MVL kernel, but the arago kernel contained in the 3.x series of the DVSDK. In this kernel the resizer register DMA_RZA or DMA_RZB are not touched at all and thus are set to 0x0.

    With this changes on the IPNC, I'm able to achieve more or less 30 fps when I stream one 8 MBit/s H.264 stream:

     Module   | Avg Time/Frame | Frame-rate | Total time | Total Frames |
     CAPTURE  |          33.39 |      29.95 |      30083 |          901 |
     ENCODE0  |          33.02 |      30.28 |      29754 |          901 |
     STREAM   |           0.83 |    1199.73 |        751 |          901 |
     OSD0     |           0.90 |    1108.24 |        813 |          901 |
     AEWB     |           1.14 |     877.31 |       1027 |          901 |


    ==================== STREAMING DETAILS ====================
    Start Time : 946685537sec 450301usec
    End Time   : 946685570sec 880162usec
    Total Time to stream 1000 frames: 33429.861 msec
    Time per frame: 33.4299 msec
    Streaming Performance in FPS: 29.9134
    ===========================================================

    Still the system seems to work at its limit. If I increase the bitrate to 12 MBits/s the FPS drop:

     Module   | Avg Time/Frame | Frame-rate | Total time | Total Frames |
     CAPTURE  |          33.68 |      29.69 |      30346 |          901 |
     ENCODE0  |          33.49 |      29.86 |      30174 |          901 |
     STREAM   |           1.16 |     863.03 |       1044 |          901 |
     OSD0     |           0.74 |    1346.79 |        669 |          901 |
     AEWB     |           1.12 |     889.43 |       1022 |          909 |


    ==================== STREAMING DETAILS ====================
    Start Time : 946686040sec 490527usec
    End Time   : 946686074sec 181235usec
    Total Time to stream 1000 frames: 33690.708 msec
    Time per frame: 33.6907 msec
    Streaming Performance in FPS: 29.6818
    ===========================================================

    Are there more tweaks that could be done?

    Regards,

     Andreas.

     

  • UBL used in v2.5 is a more relaxed on for DDR timing, so would a see a drop  of 0.5fps in system.

     

    PLease use the attached one, this should see a improved performance of 0.5 fps.

     

    Regards,

     

    Raghu

     

     

    UBL_1.1.0_Patch.zip
  • Thanks. Now I get 30 fps with 12 MBit/s.

    Regards,

     Andreas.

  • Hi, Raghu,

    According your new dmaInterval value 0x48, we can get 30 fps.

    But stream showing will be all blank through wis-streamer.

    Can you tell me how do you choose this new value?

     

    Thanks.

  • hi,

     

    We had modified this value based on our further tests and fixes. These are a part of release 2.6 which should be at Appro this week.

    Can you please verify the details in this release as we also have more optimizations to get better performance in this release.

     

    Also, for the wis-streamer issue, i think the issue is no due to this setting, can you please send the detailed log so that we can infer what could be the issue.

     

    Regards,

     

    Raghu

     

  • Raghu,

    Thank you for your help.

    After I set  pOutConfig->dmaInterval= 0x48 for width >= 1600 in ipnc 2.5, it is OK to display streaming on web and wis-streamer for 1080P PAL mode. (25 fps).

    When I transferred to 1080P NTSC (30 fps), the web and wis-streamer is abnormal.

    Green and black dots on it and no more any new streaming data are displayed. (The streaming only shows a little period -- 1~2 sec ??)

    All tasks are normal running and it does not have any error messages on console.

  • Hi, based on our further tests we have kept this value as pOutConfig->dmaInterval=0x20for resolution higher like 1080P

     

    Regards,

     

    Raghu

     

  • Is there any chance someone from TI could explain the effect of the dmaInterval value? I realise it may not be an exact science but a rough idea of what it affects would be handy.

    I see in the IPNC4.x code it's usually set to 0x20, except sometimes (1080p+D1) it's set to 0x40.