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.

HDVICP2 H.264 Encoder 2.0 sample program doesn't work

Hi, 

I am having a problem running the H.264 encoding sample application which in included in the overlay code.

It runs for the first 2 frames and then stalls. Here is the output to the CCS Console:

-----------------------------------------------
Test Case Number : 1
-----------------------------------------------
No of Instance's : 1 
Config File   : ..\..\..\Test\TestVecs\Config\fruits_p176x144.cfg
Input YUV     : ..\..\..\Test\TestVecs\Input\fruits_p176x144_nv12.yuv
Output Stream : ..\..\..\Test\TestVecs\Output\fruits_p176x144.264

Number of Resources required = 9

Algorithm Instance  Creation for the Module H264ENC_TI DEV.500.V.H264AVC.E.IVAHD.02.00.02.02 Done...
Debug Trace (@ Level 1) Buffer in DDR @ 0x8C6D8B40 of size 1344 bytes
 #0    : IVIDEO_NA_FRAME       : Bits  : 0          : 0.00 Mbps:M3 Usage: 171.10 MHz(M3), IVA Usage : 0.00 MHz(IVA) : Total:   0 MHz : M3:   0 MHz : PicInit: 4294 MHz(-44 Cycles) : MB Loop Field 1:   0 MHz ( 44 Cycles)

Frame Compliance Test: PASS. 
 #1    : IVIDEO_NA_FRAME       : Bits  : 0          : 0.00 Mbps:M3 Usage: 203.06 MHz(M3), IVA Usage : 0.00 MHz(IVA) : Total:   0 MHz : M3:   0 MHz : PicInit: 4294 MHz(-44 Cycles) : MB Loop Field 1:   0 MHz ( 44 Cycles)

Frame Compliance Test: PASS. 

 

When it stalls, it is in HDVICP_Wait() and waiting for gSemCount to be non-0.
gSemCount seems to be incremented by HDVICP_Done(), so it seems that HDVICP_Done never gets called.

Q1. Can you please suggest what could be the cause?

Q2. Is this program supposed to run on DM8148?  I built the program for DM8168 (--define="NETRA").

Q3. Do I need to do something special before running the program (such as, suspend other processors on DM8148)?

The hardware is DM8148 based custom board, the software is EZSDK 5.05.02.00 with the overlay code.

Thanks,
tamo2

  • Hi,

    I did run the program on DM8168 before, and work fine w/ it, over 130 frames .  The resolution was 720p30.

    I will try to run on DM8148 after holiday.  

    BR,

    Eason

  • Hello,

    Are you asking for the OMX encode demo ? If yes, the OMX encode demo is working on DM8168 and DM8148.

    Best Regards,

    Margarita

  • It is the H264 encoder sample, included under ivahd_h264enc_02_00_02_02_production directory.
    Thanks,
    tamo2
  • Could you share the gel file/.out file for DM814x?
    I was not able to run the test program w/ the binary made by myself.

    BR,
    Eason
  • Hi Eason,

    I had problems running the program with GEL file (the program hangs before reaching to main()), so I don't use a GEL file.

    Instead, what I found which seems to work, is to initialize the HDVICP2 using the existing binary first, then connect from JTAG.

    Here is the steps:

    1. Edit the loader script (load-hd-firmware.sh) something like below:

    # manage HDVICP2 and HDVPSS Engine firmware
    depmod -a
    PATH=$PATH:/usr/share/ti/ti-media-controller-utils
    HDVICP2_ID=1
    prcm_config_app s
    modprobe syslink TRACE=1 TRACEFAILURE=1
    until [[ -e /dev/syslinkipc_ProcMgr && -e /dev/syslinkipc_ClientNotifyMgr ]]
    do						  
        sleep 0.5
    done
    echo "*** Loading HDVICP2 Firmware"
    firmware_loader $HDVICP2_ID /usr/share/ti/ti-media-controller-utils/dm814x_hdvicp.xem3 start
    exit 0
    

    2. Boot DM8148 linux

    3. After Linux has been booted and M3 firmware has been loaded, connect to Cortex-A8 (to make sure A8 is suspended and do nothing).

    4. Then connect to M3_RTOS, load the binary and Run.

    Thanks,
    tamo2