Linux/TMS320DM368: Capture 720P-30 YUV422 from camera OV5640 .

Part Number: TMS320DM368

Tool/software: Linux

Hi  !

I'm trying to capture video frames from the camera in 720p-30 (YUV 422) mode with the subsequent compression of the H264 codec, but frame capture occurs at a frequency of half the time, that is, 15 Hz.

My set:

Camera( OV5640 720P-30  YUV 422) ----> LEOPARDBOARD( DM368 ARM 432 MHz  DDR: 340 MHz ) ---> Linux DVSDK 4.02.00.06-->program capture ENCODE (from DVSDK) display video output OFF.

encode log:

ARM Load: 2% Video fps: 15 fps Demo: Encode Display: 720P 60Hz Video Codec: H.264 HP Resolution: N/A Sound Codec: N/A Sampling Freq: N/A 
............... ARM Load: 0% Video fps: 15 fps Demo: Encode Display: 720P 60Hz Video Codec: H.264 HP Resolution: N/A Sound Codec: N/A Sampling Freq: N/A ARM Load: 0% Video fps: 15 fps Demo: Encode Display: 720P 60Hz Video Codec: H.264 HP Resolution: N/A Sound Codec: N/A Sampling Freq: N/A



in Capture.c file (dmai_2_20_00_15) :

/* In DM365 the capture driver does not support 720P-30, but the
LSP has an option to reduce the capture rate to half. So when user
sets for 720P-30, we treat it as 720P-60 except we set LSP capture
rate to half. */
/* NOTE: make execption for DM368 camera input which supports 720P-30*/

I tried to forcefully disable halfRateCapture = TRUE;

In the state halfRateCapture = FALSE;

As a result, frames are no longer captured at all .....

encode log:

ARM Load: 3% Video fps: 0 fps Demo: Encode Display: 720P 60Hz Video Codec: H.264 HP Resolution: N/A Sound Codec: N/A Sampling Freq: N/A 
................. ARM Load: 0% Video fps: 0 fps Demo: Encode Display: 720P 60Hz Video Codec: H.264 HP Resolution: N/A Sound Codec: N/A Sampling Freq: N/A ARM Load: 0% Video fps: 0 fps Demo: Encode Display: 720P 60Hz Video Codec: H.264 HP Resolution: N/A Sound Codec: N/A Sampling Freq: N/A


I tried to apply recommendations for optimizing the DM36x:

MSTPRI0: 0x00550011(default) to 0x00440022 or 0x00440011 or 0x00220044
DMA_RZA: 0x00(default) to 0x20 or 0x40 or 0x80 or 0x90

The result is the same 0 frames received.

I tried to lower the frame rate of the camera to 4-10 Hz, the result is the same 0 frames captured.

What needs to be done to capture frames without missing every second frame ?
Tell me how to solve this problem ?
what am I doing wrong ? what could be the problem ?

My log VPFE register.

11.log




  • Hi Georgy,

    1. Have you tried reducing the frame rate from the OV sensor end itself to 15fps and revert the flag changes ? In that case you will be not missing frames, but fps will be 15.
    2. I am not sure how/where is the pipeline settings in v4l2 based framework. Let me check it, but what I am trying to say is ISIF_IN->IPIPEIF->RESZ->ENCODER->DDR pipeline you can follow instead of ISIF_IN->DDR->IPIPE->RSZ->ENCODER->DDR flow(though I am not sure what you are following now, since no logs). I am not seeing full register dump ISIF and IPIPEIF initial registers missing. hope you are taking dump, when pipeline is running.

    You should be able to achieve 1080@30 fps with DM368(hardware max capable performance), though we have seen this using IPNC RDK package and not DVSDK package.

    Thanks and Regards,

    Dwarakesh R.

    PathPartner Technology

  • In reply to Dwarakesh R:

    Hi !

    I lowered the frame rate of the camera from 30Hz to 15Hz (and even from 15Hz to 7Hz), the result is the same.

    if halfRateCapture = TRUE then result frame capture / 2  -> 15/2 = 7, capture ok,(interrupt vpfe present)

    if halfRateCapture = FALSE then  result frame capture / 1  -> 15/1 = 0, No capture(NO interrupt vpfe).

    The output capture does not depend on the frame rate, but depends on the state of the HalfRateCapture flag.

    My application capture.c + dump registers ISIF, IPIPEIF, IPIPE, RSZ in the attachment.

    Capture.c15hz_to_7hz.log15hz_to_0hz.log

     

  • In reply to Georgy Sviridov:

    Hi,

    It looks like ISIF->DDR-IPIPE->RSZ->DDR->ENCODE is being used. Can try ISIF->IPIPEIF->RSZ->DDR->ENCODE. What happens to the 7HZ and halfRateCapture = FALSE, does it work ?

    Thanks and Regards,

    Dwarakesh R.

    PathPartner Technology