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.

Runtime problem of H.264 Encoder with DSP/BIOS on DM6467 EVM

Hi:

I am having trouble to use DSP/BIOS with the H.264 sample encoder (H.264 BP Enc (720p) - v1.20.00.8) on DM6467 EVM. I could build and run it successfully in its original standalone mode (i.e., without DSP/BIOS). After I added a tcf and the generated cmd file, it compiled and linked fine but when I ran it, those printf, fscanf, fread don't work.

Could it be the original cmd file may have something conflict with the newly generated cmd file? I have tried to setup a blank project with DSP/BIOS using the same way I did for H.264 sample code and those runtime functions work well there. So I am sure the way that I added tcf and cmd files should be fine.

Could someone give me a hint of what I have missed or simply share with me a tcf file (and the cmd file), if you have, that worked for the sample encoder? Greatly appreciate!

Best Regards,

Taiwu

  • Hi,

    Please make sure you are not calling printf, fscanf and fread from HWI/SWI context. In addition, make sure to allocate enough heap for I/O functionality. The link below should provide more details -

    http://wiki.davincidsp.com/index.php/DSP_BIOS_FAQ#Q:_Can_runtime_support_.28RTS.29_functions_be_called_when_using_DSP.2FBIOS.3F

     

    Regards,

    Prateek

     

  • Thanks for the hints. However, those RTS functions are called from inside main().

    I set the heap in DDR2 and with size 0x01400000 (which is about 20 MB). I got the size from the original lnk_kaleido.cmd file that came with the encoder project. I thought 20 MB should be large enough but I certainly can increase it to see if that helps. Thanks.

    Best Regards,

    Taiwu

     

  • Hi Taiwu,

    The DVSDK server package does include TCF files that integrates DSP/BIOS with the codec library. Depending on DVSDK version you are using, you should be able to find these files under following location for encode example -

    dvsdk_<version#>/dm6467_dvsdk_combos_x_xx/packages/ti/sdo/servers/encode

    In addition, please make sure to use -x linker switch in order to force re-reading of libraries. Details on this can be found under section 2.6 of DSP/BIOS User Guide spru423f.

    http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/bios/bios_5_31/sabios-h16/docs/packages/ti/bios/doc/spru423f.pdf

     

    Regards,

    Prateek

     

  • Hi Prateek:

    Thanks for the info.

    I searched TI's website. Those DVSDK packages I can find on TI's website are either for WINCE or for Linux. I can't find anything for Windows. Does it mean I have to build the encoder using Linux? I am using CCS 3.3 on Windows. Is there any DVSDK for Windows out there? I do have an old DVSDK for DM648 on my Windows.

    Thanks.

    Taiwu

  • Taiwu,

    DVSDK for Linux or WinCE indicates the OS running on ARM9 of DM6467. For DSP side, DVSDK uses DSP/BIOS in either case.

    What OS are you planning to run on ARM9? If you are just interested in running DSP side application at this time, I have attached encode.tcf file for your reference from DVSDK v1.40.

    Regards,

    Prateek

     

    encode.zip
  • Prateek:

    Thanks you so much for providing the tcf file!

    Right now, we are only interested in running the DSP and not the ARM. I will try the tcf and let you know how it goes. Is that I just need to compile it and add the generated cmd file back to the project? What about the original cmd file? Should I merge it with the new cmd file? Thanks.

    Regards,

    Taiwu

  • Tai-Wu,

    I am not sure as I haven't tried the specific files. The TCF file I sent you was written with codec engine framework and ARM side applciation in mind and as such haven't been tested in pure DSP side application environment. My feeling is you can start with new cmd file and depending on extra application requirements would need to merge some changes from old cmd file to the new one.

    In addition, I would suggest exploring Port Connect feature under CCS. This feature allows reading/writing from a file without the use of fscanf/fprintf. 

    I am also not clear about your use of fscanf/fprintf in the main function. I am assuming this is for reading raw video frames and writing encoded data back to files. Since this is going to be done every frame, my understanding is you are not running video processing under SWI or TSK context. If you are planning to add other algorithms, you would like to run this video processing under TSK context. Note, DSP/BIOS scheduler is not started until you return from main() function. 

    Regards,

    Prateek

      

  • Prateek:

    Yes, you are right. The fread and fscanf are used to read in raw video frames and configuration file. If you have TI's dm6467_h264enc_1_20_00_08_production (free download), you will see it uses lots RTS functions in the sample testing code (no DSP/BIOS).

    The job I am doing is to convert the sample testing code into using TSK context with AAC encoding to do some benchmarks. We will need to do 16 AAC audio channels and 2 channel CIF H.264 video encoding on a DM6467. The primary objective of this work is to determine if DM6467 at 1GHz is capable to run all of them or not. We don't need the ARM.

    I will try what you suggested and let you know how it goes. Thanks.

    Regards,

    Taiwu