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.

decode demo does not work on dm6467 EVM

Other Parts Discussed in Thread: TVP5147, TVP7002

Hello,

We've recently purchased a dm6467 1080HD EVM, and tried to run the decode demos from command line.

The demo shows two different behaviours: sometimes aborts abruptly, and sometimes hangs. But in every

case we cant' see the davincieffect video glaring on the display.

The execution of the demo is performed using the following set of commands:

1- root@dm6467t-evm:/opt/dvsdk/dm6467# ./loadmodules.sh

2- root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080p_60fps.264

3- root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080i_30fps.264  -y 1

4- root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080i_30fps.264  -y 2

Command nº 1 runs ok, so all drivers are loaded, as we can check with:

root@dm6467t-evm:/opt/dvsdk/dm6467# lsmod
Module                  Size  Used by
dsplinkk              101520  0
cmemk                  20074  0
minix                  25382  0
ipv6                  228907  14
root@dm6467t-evm:/opt/dvsdk/dm6467#

After issuing command nº2, the decode quits abruptly, with a short blink on the display monitor.

After issuing command nº3 the behaviour is the same as with nº2.

When command nº4 is entered, a flat magenta screen appears on the display

and the decode process hangs, becoming zombie, as can be seen with ps command:

root@dm6467t-evm:/opt/dvsdk/dm6467# ps

...

  918 root         0 SW   [mtdblockd]
  936 root         0 SW   [spi_davinci.0]
  986 root         0 SW   [usbhid_resumer]
 1032 root      1900 S <  /sbin/udevd -d
 1557 root      2868 S    udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0
 1581 root      2868 S    /usr/sbin/telnetd
 1584 root      2928 S    /sbin/syslogd -n -C64 -m 20
 1586 root      2864 S    /sbin/klogd -n
 1589 nobody    2120 S    /usr/sbin/thttpd -d /srv/www
 1594 root      3056 S    -sh
 1595 root      1912 S    /sbin/getty 38400 tty1
 1612 root      3056 S    -sh
 1684 root         0 SW   [flush-0:13]
 1708 root         0 Z <  [decode]
 1719 root      3056 R    ps
root@dm6467t-evm:~#

The display we are using is a Sony PVM-14M4E, which supports a vertical resolution of up to 600 lines.

We have plugged the YPbPr component outputs to an  Oscilloscope. What can be seen looks like the

vertical interval blanking signaling, without luma nor croma data, on the three channels.

We also tried launching the audio decode demos, but no audio could be listened.

We have double-checked the process of installation of all DVSDK and the linux toolchain. The device

is booting entirely from network: u-boot loads a linux kernel compiled from linux-davinci-staging.tar.gz on the host, and accesses the demo

file system through nfs. The demo filesystem is arago-demo-image-dm6467t-evm.tar.gz

Could anyone give us an advice?

 

Thanks,

 

Gerard

  • Hi Gerard,

    We have not seen this problem.

    Can you provide some more inputs on these lines?

    1) Whether any of the decode demos worked anytime?

    2)  Does video decode demo issue happen with all the other video codecs?

    e.g., can you try with "--fhd" option which exercises the 1080p60 decoder?

    e.g. root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080p_60fps.264  -y 5 --fhd

    3)  -y 1 is D1-NTSC display type and -y 2 is D1-PAL. Does the display you used support D1 NTSC and PAL?

    4)  Can you try the same with -y 5 (display type is 1080i 30)?

    e.g. root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080i_30fps.264  -y 5

    -Thanks,
    Aravind

  • Hi Aravind,

    Let me apologize for the huuge delay in my answer.

    Now I can run all demos ok. As it's been a long time since the first post, it's difficult to me to

    summarize in what consisted the solutions applied. The easy way to explain them is to say that

    I wasn't quite familiar with the board, so I needed the necessary period to get in touch with

    the nuts and bolts.

     

    Now I can capture SD signal with the capture demo, record it into a file, and play it with

    the decode demo.

     

    There's only one little problem remaining: I feed the component output from the board

    to a sony professional monitor, and the clips - wether they are displayed from the capture

    feedback monitor or from the encode demo - appear with colors tuned to magenta.

    I have struggled with all the monitor configurations, but nothing changed.

    Do you know if there's any trick that I must be leaving?

     

    Here is the hardware and software set configuration:

    - J13 connector feeded with composite signal from a SD PAL interlaced @50Hz videoclip.

    - The capture.c code has been tweaked:

    --The capture connection is forced by code by placing the line

    cAttrs.videoInput = Capture_Input_COMPOSITE;

    after all variable initialization code within capture.c.

    -- To enable the autodetection of the videoStd, I placed the call:

    Capture_detectVideoStd(hCapture, &videoStd, &cAttrs);  

    between the previously described line and the functions in charge of doing

    all the buffer size and dimension calculations.

    -- I've Commented out the following code:

        /* We only support 720P capture */
    //    if (videoStd != VideoStd_720P_50 && videoStd != VideoStd_720P_60) {
    //        ERR("Need 720P composite input to this demo\n");
    //        cleanup(THREAD_FAILURE);
    //    }

    which was responsible to kick off the program if it encountered other video standards than

    720P @50 and 720P @60.

     

     

     

     

  • Hi Gerard,

    I'm trying to capture a NTSC signal using the composite input. I did modify capture.c, changed the kernel config and basically made the same changes that you made.

    I still cannot record an encoded stream. It seems that the 1st frame sent to the encoder is never returned. Any ideas?

    Note: I booting the EVM with NFS.

    Thanks.

  • Hi Fabrice,

    First of all, are you using dm6467 or dm6467t? I say that because I'm using dm6467t, and that

    could cause (I suppose, but I'm not confident wiht that)  many changes in behaviour, and demo's codes

    Fabrice said:

    I still cannot record an encoded stream. It seems that the 1st frame sent to the encoder is never returned. Any ideas?

    What I found in capture.c code was that every even frame is dropped. The reason (which I found explained in a comment within code ) for that is to match

    frame frequencies with  50Hz or 59.9Hz (60Hz) (I don't know which one, cause I haven't done any trials to find out.  But in my case, if I feed the board with PAL interlaced signal @50Hz, the capture produces an stroboscopic effect, may be caused by that even frame dropped). You loose only the first one, or loose every even frame?

    If your case is the latter, the reason could be what I said.

    Fabrice said:

    Note: I booting the EVM with NFS.

    IMHO, that's the best way to work. But I think there's no reason to think that this fact could cause you any troubles, bearing in mind that

    when you execute all binaries, you do it in the right paths.

    I'm sorry, but that's what I can do with the information you give-me. Could you be more exhaustive with the information?

     

     

  • Hi Gerard,

    Thanks for your response. I finally got it working. It was a silly error that let only the first frame go through.

    The capture code capture 2 frames at a time and feeds one to the encoder. That is the reason why you end up with half of the frame rate. In my case I capture NTSC, I removed one capture from the while loop and ended up with the correct frame rate with the correct bitrate. I'm now trying to resize the input video from NTSC to SIF using the VDCE, before frame are sent to the encoder.

     

  • Hi,

    I am getting CMEM error while decoding h264 1080p60 content.on dvsdk_3_10_00_16.The error is as below

    root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080p_ 60fps.264 --fhd -y 7                                                                                                             
    Decode demo started.                                                                                     
    CMEMK Error: Failed to find a pool which fits 5396480                                                    
    CMEM Error: getPool: Failed to get a pool fitting a size 5396480                                         
    Failed to allocate memory. 

    loadmodules.sh has below settings

    insmod cmemk.ko phys_start=0x87000000 phys_end=0x8ba00000 pools=2x921600,1x460800,1x1048576,1x345600,2x86400,11x564528,5x677376,10x5396480,1x4147200,4x1451520

    default loadmodules.sh which came along with package is not working so I have modified it as above.

    h264 decode for 1080p30 is working file.

    the problem is with the memory pool. I can not increase  phys_end addr to accommodate more buffers of size 5396480 as it will affect CODEC_SERVER memory.

    so what memory pool settings shall I use to decode h264 1080p60 ?

    Thanks

    Amogh J

     

     

     

     

  • Arivand,

    I just received new DM6467T and out of box i cannot get decode demos to work.  I have tried using remote thru GUI.  I see the GUI but when i select Decode 1080p.264 - i get nothing on theoutput.  Then i tried command line.  ./loadmodules.sh followed by ./decode.  I have tried a few parameters but get 'failed to create display device'.  I'm leaving the original bootargs the same and taking uImage from NAND.  Here is a command line sequence.  What am i missing?  My display is a DELL 2407WFP w/ component.

    LOG below.  See bottom.

    Arago 2009.11 dm6467t-evm ttyS0

    dm6467t-evm login: root
    root@dm6467t-evm:~# cd /opt/dvsdk/dm6467/
    root@dm6467t-evm:/opt/dvsdk/dm6467# ls -l
    -rw-rw-rw-    1 root     1262        25214 Jan 14  2010 cmemk.ko
    -rw-rw-rw-    1 root     1262      3701526 Jan 14  2010 cs.x64P
    drwxr-xr-x    6 root     1000         4096 Jan 14  2010 data
    -rwsr-xr-x    1 root     1262       628428 Jan 14  2010 decode
    -rwxr-xr-x    1 root     1262         4582 Jan 14  2010 decode.txt
    -rw-rw-rw-    1 root     1262       124674 Jan 14  2010 dsplinkk.ko
    -rwsr-xr-x    1 root     1262       629968 Jan 14  2010 encode
    -rwxr-xr-x    1 root     1262         4274 Jan 14  2010 encode.txt
    -rwsr-xr-x    1 root     1262       591052 Jan 14  2010 encodedecode
    -rwxr-xr-x    1 root     1262         3884 Jan 14  2010 encodedecode.txt
    -rwsr-xr-x    1 root     1262       303975 Jan 14  2010 interface
    -rwxr-xr-x    1 root     1262          634 Jan 14  2010 loadmodules.sh
    -rwxrwxrwx    1 root     1262         9331 Jan 14  2010 mapdmaq-hd
    drwxr-xr-x    2 root     1262         4096 Jan 14  2010 thirdpartydemos
    root@dm6467t-evm:/opt/dvsdk/dm6467# ./loadmodules.sh
    cmemk unregistered
    CMEMK module: built on Jan 13 2010 at 18:59:45
      Reference Linux version 2.6.32
      File /sim/scratch_a0850430/arago-install/dvsdk_3_10_00_11/linuxutils_2_25_01_06/packages/ti/sdo/linuxutils/cmem/src/mo
    dule/cmemk.c
    allocated heap buffer 0xcb000000 of size 0x8f000
    cmemk initialized
    DSPLINK Module (1.64) created on Date: Jan 13 2010 Time: 18:51:20
     root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080p_60fps.264 -y 7 -t 10 -O component
    Decode demo started.
    vpif_display vpif_display: Streaming in progress
    Error: Failed to create display device
    Error: Failed to create Infra Red Object
    root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080p_60fps.264 -y 7 -t 10
    Decode demo started.
    vpif_display vpif_display: Streaming in progress
    Error: Failed to create display device
    Error: Failed to create Infra Red Object
    root@dm6467t-evm:/opt/dvsdk/dm6467#

     

  • Hi Mark DAmato,

    I see that you are using very old version of DVSDK.

    1. Can you try the decode demo with the latest release of the DVSDK from this link?

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_10/latest/index_FDS.html

    2. Please use everything (uImage, filesystem etc) from the download link by following the GSG link as below (also provided in the DVSDK download link).

    http://processors.wiki.ti.com/index.php?title=DM6467_Getting_Started_Guide

    -Thanks,

    Aravind

  • Fabrice:

     

    Why do you have to change the kernel config?  I tried to capture NTSC using composite input.  I got the error "failed to create capture device."  Thanks.

     

  • By default the kernel is configured to capture HD by using the TVP7002. If you want to use composite you need to use the TVP5147.

  • Got it.  Thank you.

    Btw, is there anyway to use TVP7002 and TVP5147 at the same time?  I really need to capture both component and composite video.

     

  • Not sure if you can do both at the same time(SD and HD), I doubt it. I know you can do s-video and composite at the same time (there are two TVP5147 on the EVM)

  • To th and Fabrice, et al.:

    The DM6467T EVM has one TVP7002 and two TVP5147's.  The DaVinci SoC communicates with those using an I2C bus.  This bus has addressing built into the data stream.  In order to use two devices at the same time, they must have different addresses.  According to the schematic, both TVP5147 #1 and the TVP7002 have the savme 0x5D address.  The TVP5147 #2, however, has a different 0x5C address.

    This stems from the chip manufacturer (TI) having a hardware pin to switch between a fixed subset of addresses.  The TVP7002 can be configured to 0x5C or 0x5D and no other address.  Similarly, the TVP5147 can only be configured to one of the SAME two addresses.  Therefore, with three parts, a conflict is unavoidable.  The EVM designers evidently chose to make the component input conflict with the composite and not the S-Video.  (Note, either TI was lazy, using the same IC design circuit/library, or more likely they had good reason based on industry/company allocation of addresses, to make these devices use the same addresses.  Also, they 0x5C and 0x5D addresses I quote seem to differ from the datasheets because the datasheets also include one extra bit, the R/W bit, when they quote this hex number.)

    Next, on the EVM hardware, the conflicting TVP7002 and TVP5147 #1 are differentiated by actually physically and selectively connect (otherwise isolate) the I2C bus from the decoder part being used (otherwise not used).  Control lines for this switching come from the CPLD (complex programmable logic device) from Altera, U15 near the silver RJ45 network jack.  Control signal names are TVP_7002_I2C (U15 pin 50) and TVP_5417_I2C (U15 pin 49).  (Note word "decoder" comes from TVP5147.  Context is different in hardware, to "decoder" turns NTSC analog composite signal into data.  While in your software or the evm demos, the "decoder" is on the other side, decoding compressed info to produce video.  It's confusing, isn't it!)

    Next, if I'm analyzing the CPLD source code correctly (available from Spectrum Digital for HD1080P, aka DM6467T EVM), then the encoder choice is told to the CPLD through its "reg1(4)" and "reg1(5)", which I believe is register 1 bits 4 & 5, along with the input pins for VIDEO_IN_EN0 and VIDEO_IN_EN1.  Those two input pins are used by the daughter card to usurp control.  Without a daughter, they're normally low (0) and don't matter.  In the end, if reg1(5) is low, both S-Video and Composite data paths are enabled.   If reg1(5) is high, Component data path is enabled.  Then, if reg1(4) is low, the Composite's I2C bus is enabled.  If reg1(4) is high, the Component's I2C bus is enabled.  (In order to get non-conflicting S-Video and Component working simultaneously, a CPLD program mod is required to enable both parts' respective data paths.  (I haven't checked to see if these paths are sufficiently independent to allow this.))

    Anyway, to use Composite instead of Component, it appears to me that reg1(5) and reg1(4) both need to be set to 0.  How is this done by the Linux administrator/developer?  I don't know yet, but I'm about to search to find out...

    "Posted by  replied on 06-06-2010 7:27 PM" at http://e2e.ti.com/support/embedded/f/354/p/50365/181608.aspx#181608 begins to answer these questions.

    Look here for how to build kernel: http://processors.wiki.ti.com/index.php/Linux_Toolchain#Build_kernel .  Note that instruction "make ARCH=arm davinci_all_defconfig" should not use "davinci_all_defconfig" but instead the appropriate one for your hardware.  Look in the arch/arm/configs subfolder to find the right one.  For the DM6467T EVM I'm betting it's "davinci_dm646x_1ghz_defconfig".  There's also a "davinci_dm646x_defconfig", but it's probably for the DM6467, which differs from the DM6467T.

    (((I'm not finished yet figuring this out, so check back for EDITS to this post.  It's been sitting here unsubmitted for hours, and I didn't want to lose the text above.)))

  • im using dm365 for decodeing ./decode -v lft.264 -y  3 -t 5

    it is not giving any error but im unable to get display on component out .please help me out