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.

How to Change DM6467 Encode Demo and Decode Demo video signal from 720P to D1-PAL

Other Parts Discussed in Thread: TVP5147, TVP7002

Hi All,

So far I manage to modify EncodeDecode Demo to take in D1-PAL CVBS signal to encode into H.264, then decode back to raw picture and display out as CVBS signal. I can see the input video at CVBS output terminal.

But, when I try to perform the following action, I cannot get the picture at display output:

1. Modify Encode Demo to take in D1 PAL video signal into H.264 format and save into a file.

2. Using the file from steps 1. use modified Decode demo to decode the file from H.264 format into raw picture and display out to CVBS signal.

Please guide me what has to be change in order to modify the Encode/Decode demo to support for D1 PAL.

Thank you very much.

 

  • I believe the demos may support this already by default (I am looking at dvsdk 2.00.00.22 demos).  The encode demos seem to scan for video input source; I suspect that if it finds D1 PAL source, that is what it will capture; though it does provide "-r" option for you to tell it waht size you want it to encode if you do not like default.  I do have a little doubt on the encode demo since the encode.txt file suggests it needs a 720p video input source; however, if this demo does need support for PAL D1 to be added, the encodedecode demo would be the place to start looking for reference code.

    With regards to decode demo, see decode.txt file for instructions on what features the demo supports.  The -y option can be used to select D1-PAL input.

  • Hi Juan,

    Finally I manage to the get encode/decode demo to work on D1-PAL as well. It appears that both encode/decode need to be modified in order to support for D1-PAL. ( I am using dvsdk 2.00.00.22 as well). In the demo, all the video standard input into system is define as Videostd_720P_60, all these has to be change to Videostd_D1_PAL then it would work.

    Thank you very much.

     

  • Hi tkCheng,

    I'm using dvsdk_1_40_02_33 and want to modify EncodeDecode Demo to take in D1-PAL CVBS signal to encode into H.264, then decode back to raw picture and display out as CVBS signal. My steps are as follows:

    1. Modify Capture_Attrs_DM6467_DEFAULT in dvsdk_1_40_02_33/dmai_1_10_00_06/packages/ti/sdo/dmai/linux/Capture.c.

    Capture_Attrs_DM6467_DEFAULT ={

    3,

    Capture_Input_COMPOSITE,

    -1,

    -1,

    -1,

    -1,

    "/dev/video0"

    };

    2. Modify Display_Attrs_DM6467_VID_DEFAULT in dvsdk_1_40_02_33/dmai_1_10_00_06/packages/ti/sdo/dmai/linux/Display.c.

    const Display_Attrs Display_Attrs_DM6467_VID_DEFAULT = {

        3,

        Display_Std_V4L2,

        VideoStd_D1_PAL,

        Display_Output_COMPOSITE,

        "/dev/video2"

    };

    3. In dvsdk_1_40_02_33/dvsdk_demos_1_40_00_18\dm6467\encodedecode\Capture.c, I comment these statements:

    //    if (Capture_getVideoStd(hCapture) != VideoStd_720P_60 && Capture_getVideoStd(hCapture) != VideoStd_720P_50) {

    //        ERR("Need 720P input to this demo\n");

    //        cleanup(THREAD_FAILURE);

    //    }

    //        case VideoStd_D1_PAL:
    //            if (Capture_getVideoStd(hCapture) == VideoStd_720P_50) {
    //                frameSkip = TRUE;
    //            }
    //            else {
    //                ERR("720P @ 60Hz capture detected, "
    //                    "D1 PAL @ 25Hz display not supported\n");
    //                cleanup(THREAD_FAILURE);
    //            }
    //            break;

     

    //resize = envp->videoStd != VideoStd_720P_60 &&

    //             envp->videoStd != VideoStd_720P_50 ? TRUE : FALSE;

    4. Compile the modified files and run encodedecode demo:
    ./encodedecode -b 25 -p -y 2 -t 5
    The program can run, but I can see nothing at the output. Would you please help me to indicate the wrong places?

    Thanks very much!

  • Hi Bin Tian,

    Before I start recommend what to be change, please upgrade DVSDK to version 2.00.00.22. It is always better to have a latest version to start with instead of using older version.

    Thus, I suggest you:

    1. Update DVSDK to version 2.00.00.22

    2. Try again your changes and let me know the result

     

     

  • Dear tkCheng,

    Thank you very much for your reply !

    Now I'm updating  DVSDK to version 2.00.00.22. And I  encounter a problem in the step "Installing the Codec Servers". The guide tells me to download the codec servers from TI’s myRegistered Software website. I registered for it , but I have no "Activation ID". So I can't get the Codec Servers. Do you have some suggests? Or can you send me your Codec Servers Installation Package? Looking forward for your reply. :)

    Thank you very much. 

  • Hi Bi Tian,

     

    As I got install this quite some time ago, I cannot recall how I did in detail. But what I had perform that time is

    1. Register my EVM6467 on ti website (I bought my board from TI)

    2. Once registered I can then request for the require codec servers and download from TI website.

     

    Thus, maybe you should try to register your hardware (assuming you're also from TI) and then only proceed to request for the codec servers. One thing to note, you may have to wait for email from TI on registration instruction before you can access the download area to download codec servers.

  • Hi tkCheng,

    It's a pity that I didn't buy the DM6467 board from TI. So I can't access the "Activation ID" which is needed to request for the codec servers. Then, can you send me your codec servers installation package? (Installation package name is "dm6467_codecs_setuplinux_#_#_#_#.bin").

    Thank you very much !

  • My email is : tianbin.cas@gmail.com.  Thank you !

  • Hi Bin Tian,

    I do not know if I am allow to distribute my copy of codec server to you. TI support please advice on this !!!

    Or else maybe you can request from the supplier who sold you the board.

    While waiting for feedback from TI, can first try to modify the decode demo to ensure you can get the output through CVBS?

    Since you're not buying from TI, are u having the same hardware as TI EVM6467?

     

  • Hi, tkCheng, thank you again for your patient answers.
    Without the Codec Servers in the dvsdk_2.00, I can not compile the DVSDK software successfully. Then I use the Codec Servers in the dvsdk_1.40, and successfully to compile them. But all the demos can not been ran.
    Can you tell me what to be modified in the demo code to make the D1 PAL INPUT accessable? If needed, I can send my modified code to you. Thank you very much!

  • Hi Bin Tian,

    I have send you my decode file, please try it out and if it is working, maybe you can put the changes here to easy other people.

     

  • tkCheng et al.,

    Please allow me to jump in here with my own question.  Your (or others) assistance is greatly appreciated.

    When you are inputting D1 PAL to your hardware, are you plugging a single COMPOSITE input cable?  Or are you using the S-Video or Component inputs?

    I'm trying to modify a derivative of encodedecode to receive NTSC COMPOSITE using the DM6467T EVM.  I'm getting an error "Failed to create display device".  I have my program working for component input, but having trouble upgrading to work with composite.

    For COMPONENT that WORKS,  Capture_Attrs={4,2/*Capture_Input_COMPONENT*/,-1,-1,-1,-1,/dev/video0,0,0/*VideoStd_AUTO},-1,1/*ColorSpace_YUV422PSEMI}

    For COMPOSITE that FAILS, Capture_Attrs={4,2/*Capture_Input_COMPOSITE*/,-1,-1,-1,-1,/dev/video0,0,0/*VideoStd_AUTO},-1,1/*ColorSpace_YUV422PSEMI}

    Did you have to change anything else, such as the captureDevice=/dev/video0, or the colorSpace=ColorSpace_YUV422PSEMI?

    I'm not worried about the output just yet, only the input.  And I can't get the input to open.  I'm wondering if, because I'm using the composite input instead of the component, I have to change to a different device driver, such as /dev/video1 or something.

    Thanks very much,

    Helmut

  • Hi tkCheng,

    I want to modify the encode/decode demo to work on D1-PAL, besides The same situation and you . so  glad to find your post.

    but I'm getting an error "Failed to create display device ,720P component input connected?".  My steps are as follows:

    Modify "VideoStd_720P_60" to "VideoStd_D1_PAL" int "dvsdk_2_00_00_22/dvsdk_demos_2_00_00_07/dm6467/encode/capture.c

    1,if (BufferGfx_calcDimensions(VideoStd_D1_PAL/*VideoStd_720P_60*/,ColorSpace_UYVY/*ColorSpace_YUV422PSEMI*/, &gfxAttrs.dim) < 0)

    2,bufSize = BufferGfx_calcSize(VideoStd_D1_PAL/*VideoStd_720P_60*/,ColorSpace_UYVY/*ColorSpace_YUV422PSEMI*/);

    3,gfxAttrs.colorSpace = ColorSpace_UYVY/*ColorSpace_YUV422PSEMI*/;

    4,cAttrs.videoInput = Capture_Input_COMPOSITE/*Capture_Input_COMPONENT*/;

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

    I do not know those places also need to modify, Looking forward for your reply. O(∩_∩)O~ 

    Thank you!

  • swinter,

    I assume you meant "Failed to create CAPTURE device, 720P component input connected?" (capitalization added).  This message is in capture.c and occurs if the function Capture_create() fails.  Note that the kernel and demos are pre-configured for hi-def component video only.  You're trying to do standard definition PAL.  I had the same confusion trying to do standard definition NTSC.

    MOST LIKELY, you have not yet recompiled your kernel to include the TVP5147 video decoder (input) chip driver.  Therefore, the video libraries (called "V4L2") are unable to open the chip for capturing your PAL video.  In this case, you need to recompile the kernel with this driver included.  If you haven't already, I recommend you practice recompiling and installing the kernel WITHOUT making any changes.  Then after that, run "make menuconfig ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-" or else edit the config file by hand.  (Search http://processors.wiki.ti.com/index.php/Main_Page for more details.  Sorry I can find the exact page right now.  You may need to download git first.) 

    HOWEVER, I recommend editing the config file by hand as follows:  Copy git/arch/arm/configs/davinci_dm646x_1ghz_defconfig to your own file, like davinci_mine_1ghz_defconfig and edit your file instead.  Then, where kernel build instructions tell you to make, do "make ARCH=arm davinci_mine_1hgz_defconfig" followed by the same "make ARCH=arm CROSS_COMPILE=arm-none-linux-gnuabi- uImage".  Note the dash at the end of "arm-none-linux-gnuabi-".  You can also choose "uImage-myenviron" instead of "uImage", to keep multiple kernel images designed for multiple environments.

    In case you haven't figured it out yet, there will be a "CONFIG_VIDEO_TVP7002=y" that you need to disable, and a "CONFIG_VIDEO_TVP514x=y" you need to enable.  (Enable vs disable definition should be obvious when you look at the file.)

    One more thing, I don't think you have to edit the board file yet, but you may have to do so later.  The board file is at git/arch/arm/mach-davinci.  You can see where it works tieh the TVP7002 and TVP5147 mutually exclusive of each other.  it uses #defines similar to CONFIG_VIDEO_TVP7002.  It should be OK for this change as is, but if you have other hardware changes (like I had NTSC output), then you look at how the old chip was handled and make sure your new chip is handled.

    -Helmut

  • Hi Helmut,

     

    Yes, I am using COMPOSITE input cable and not S-video/Component.

    Please try with the attached encode sample code. If it is successful you should able to get a picture frame from COMPOSITE input, then you can open it with YUV Tools from http://www.sunrayimage.com/download.html

    It is always better to ensure encode and decode is working properly before trying encodedecode together.

    4300.encode.rar

     

    Hi Swinter,

    Please try with above attached code.

    I only made changes on the application code and do not modify any of the code in kernel as Helmut suggsted in previous post.

     

     

     

  •       Thanks for the help of Helmut Forren and tkCheng,As mentioned ticheng,the 4300.encode.rar work well,thanks again :)

  • hello tkCheng

    how can I run your encode demo on dm6467t? how can i change the video input interface from COMPONENT to CVBS input?

    my dvsdk is 3.10.00.19

    i copy all the encode **.c file to dvsdk demo's encode demo,recompile it ,run it on evmdm6467t but i got this error message  "Failed to create CAPTURE device, 720P component input connected?"

    thank you very much!

  • Hi Zhang Jun1,

    I have no longer working on these code. The best advise I can give you try search inside your code and for the error 'Failed to create CAPTURE device, 720P component input connected', and understand why these error occur, or compare your code with my code in this post(if you are in luck my code may contain the necessary changes)

    If I remembered correctly, there is a checking to ensure the component input and what I did is just simply skip the checking, can you try it out as well, but no guarantee it would works.