Hi, I am using DVSDK 4_02_00_06 and start with h264enc 2_20_00_01 but updated to 2_30_00_06 because the performance not reach 30fps.
CPU_freq=432MHZ
DDR_freq=340MHZ
I am using the example file attached and tested under four circunstance:
*************Case 1: #define CAPTURE_OFF FALSE #define DISPLAY_OFF FALSE*******************************
Frame 0: Read time: 661us [1] Encode: 40807us PromTime: 40807 File write time: 11073us Total: 52594us
Frame 1: Read time: 33511us [2] Encode: 35115us PromTime: 37961 File write time: 2392us Total: 123609us
Frame 2: Read time: 29018us [3] Encode: 35055us PromTime: 36992 File write time: 5457us Total: 193153us
Frame 3: Read time: 25908us [4] Encode: 35626us PromTime: 36650 File write time: 4800us Total: 259473us
Frame 4: Read time: 26248us [5] Encode: 35771us PromTime: 36474 File write time: 3686us Total: 325187us
Frame 5: Read time: 27189us [6] Encode: 35714us PromTime: 36348 File write time: 4072us Total: 392168us
Frame 6: Read time: 26871us [7] Encode: 35374us PromTime: 36208 File write time: 4281us Total: 458687us
Frame 7: Read time: 27006us [8] Encode: 35426us PromTime: 36111 File write time: 2752us Total: 523865us
Frame 8: Read time: 28491us [9] Encode: 35141us PromTime: 36003 File write time: 3859us Total: 591352us
Frame 9: Read time: 27653us [10] Encode: 34630us PromTime: 35865 File write time: 1631us Total: 655281us
*************Case 2: #define CAPTURE_OFF TRUE #define DISPLAY_OFF FALSE*******************************
Frame 0: Read time: 110707us [1] Encode: 34972us PromTime: 34972 File write time: 3037us Total: 148762us
Frame 1: Read time: 32280us [2] Encode: 29684us PromTime: 32328 File write time: 491us Total: 211208us
Frame 2: Read time: 3153us [3] Encode: 29416us PromTime: 31357 File write time: 800us Total: 244592us
Frame 3: Read time: 3079us [4] Encode: 29407us PromTime: 30869 File write time: 168us Total: 277217us
Frame 4: Read time: 3785us [5] Encode: 29424us PromTime: 30580 File write time: 112us Total: 310536us
Frame 5: Read time: 3780us [6] Encode: 29449us PromTime: 30392 File write time: 98us Total: 343865us
Frame 6: Read time: 3793us [7] Encode: 29435us PromTime: 30255 File write time: 79us Total: 377167us
Frame 7: Read time: 3821us [8] Encode: 29435us PromTime: 30152 File write time: 92us Total: 410518us
Frame 8: Read time: 3792us [9] Encode: 29447us PromTime: 30074 File write time: 90us Total: 443849us
Frame 9: Read time: 3804us [10] Encode: 29406us PromTime: 30007 File write time: 87us Total: 477142us
*************Case 3: #define CAPTURE_OFF TRUE #define DISPLAY_OFF TRUE*******************************
Frame 0: Read time: 106895us [1] Encode: 35005us PromTime: 35005 File write time: 7927us Total: 149871us
Frame 1: Read time: 324us [2] Encode: 29511us PromTime: 32258 File write time: 964us Total: 180666us
Frame 2: Read time: 339us [3] Encode: 29254us PromTime: 31256 File write time: 151us Total: 210391us
Frame 3: Read time: 292us [4] Encode: 29240us PromTime: 30752 File write time: 103us Total: 240025us
Frame 4: Read time: 312us [5] Encode: 29222us PromTime: 30446 File write time: 93us Total: 269650us
Frame 5: Read time: 313us [6] Encode: 29243us PromTime: 30245 File write time: 75us Total: 299282us
Frame 6: Read time: 311us [7] Encode: 29240us PromTime: 30102 File write time: 71us Total: 328904us
Frame 7: Read time: 312us [8] Encode: 29243us PromTime: 29994 File write time: 72us Total: 358531us
Frame 8: Read time: 313us [9] Encode: 29238us PromTime: 29910 File write time: 69us Total: 388150us
Frame 9: Read time: 312us [10] Encode: 29214us PromTime: 29841 File write time: 85us Total: 417762us
*************Case 4: #define CAPTURE_OFF FALSE #define DISPLAY_OFF TRUE********************************
Frame 0: Read time: 410us [1] Encode: 40685us PromTime: 40685 File write time: 7571us Total: 48725us
Frame 1: Read time: 583us [2] Encode: 33312us PromTime: 36998 File write time: 2094us Total: 84718us
Frame 2: Read time: 5656us [3] Encode: 32693us PromTime: 35563 File write time: 3447us Total: 126499us
Frame 3: Read time: 505us [4] Encode: 32280us PromTime: 34742 File write time: 2391us Total: 161674us
Frame 4: Read time: 496us [5] Encode: 32260us PromTime: 34246 File write time: 2045us Total: 196480us
Frame 5: Read time: 485us [6] Encode: 32123us PromTime: 33892 File write time: 2246us Total: 231335us
Frame 6: Read time: 484us [7] Encode: 32108us PromTime: 33637 File write time: 2151us Total: 266083us
Frame 7: Read time: 492us [8] Encode: 32162us PromTime: 33452 File write time: 1891us Total: 300613us
Frame 8: Read time: 596us [9] Encode: 32222us PromTime: 33316 File write time: 1925us Total: 335360us
Frame 9: Read time: 483us [10] Encode: 32193us PromTime: 33203 File write time: 2141us Total: 370176us
as you can see the encoder time when capture and preview are off is ~30ms, when only use preview then encoder time is the same, but when i add the capture the encoder time is ~35ms.
I already made :
1) DDR timing: The value of the below registers can affect the performance of the system. Hence, it is advised to review the value of these registers and should be kept at the most optimized value. There is no specific recommended value, as the value will change depending on the DDR used in the product. For details please refer to : http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprufi2&fileType=pdf
DDR->SDTIMR
DDR->SDTIMR2
DDR->SDBCR
DDR->SDRCR
2) MASTER Priority: The master priority registers needs to be modified as below. For details, please refer to http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprufg5a&fileType=pdf for details on meaning of this register.
MSTPRI0 : 0x1c4003C = 0x440022
3) Resizer registers: Optimized settings for DDR access of resizer. For details, please refer to http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprufg8c&fileType=pdf for details on meaning of this register.
0x01C7:0420h (DMA_RZA SDRAM Request Minimum Interval for RZA) = 0x40
0x01C7:0424h (DMA_RZB SDRAM Request Minimum Interval for RZB) = 0x40
The question is, can i do something to improve performance or i just reach the best time?