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 can I store image frames to DDR2 DM6437?

Hi,

I'm beginer in DM6437.If I  give detailed information  to this subject,when dsp grab image,i send it to DDR2.After that dsp grab image from camera again,I will compare the image in the frame buffer with the image in the DDR2 according to my programming algorithm.Finally,I will obtain new image ,and send it to the DACD output..Again I will  delete DDR2,and send new frame to DDR2.And this will go on.

How can I do this?Could you help me please?

 

Best Regards...

 

 

  • Ahmet,

    I am not able to understand what exactly you are trying to do. Please rephrase or clarify.

    By DACD, do you mean one of the DAC output? DAC-3? Are you doing some kind of background subtraction? or are you simply processing the difference between every two consecutive frames?

    For now, with limited knowledge on what you are trying to do, I think you just need to keep two buffers in the DDR. keep updating them in a pingpong fashion. VPFE has its internal DMA that grabs data from the CCDC and store it into DDR. Please read the user guide for more information.

  • Firstly,thank for your help Paul.I'm MsC student.My final project is about video stabilization on DM6437.And I have no experience about DM6437.

    I mean one of the DAC output.I have code example about video preview.I used the example in here:

    http://processors.wiki.ti.com/index.php/Accessing_pixels_in_a_frame_on_DM643x

    In this example I can access pixels in VPSS .And I can send it to the DACD output.But my aim is firstly to find motion vectors between video frames according to my project.So I must acess past frames and I compare current and past frame.Therefore,Dsp will capture frame and will send the frame to DDR2 or another register that is possible.After second capture,Dsp will read frame in DDR2,and CCS will compare between frame in the buffer and in the DDR2 to find motion vector.And this will go on during grab 100 frame from CCDC.

    Could you advise me simple code example or useful guides about this topic?

     

    Best Regards..

  • Hello Ahmet,

    Are you using BIOS & DVSDK? Because that's what that wiki was based on.
    I am not aware of any example code like this, at least nothing simple.

    You should think carefully about your application, define threads and processes. If you have specific question, we'd be glad to help.

    Some quick pointers on something you can try. In your application, you will need 2 buffers that stores the current & most recent past frame. Each time FVID_exchange returns with the current buffer, whatever your process does, which most likely is running in another thread, needs to start. The next time FVID_exchange is called, use the other buffer as the argument (ping-pong). This needs to be done in a while(1) loop.

    Doing this application using based on the BIOS&DVSDK framework might be quite time consuming if you are not familiar with the APIs. If your metion detection/estimation/tracking algorithm is not difficult, you should just do it in a simple CCS application without BIOS & DVSDK.

    Let me know whether you want to stick with BIOS & DVSDK

  • Hello Paul,

    Yes I'm using BIOS& DVSDK in this example .

    But of course I could use different methods about dsp that you advise and I want to implement  this aplication with less time consuming.

    My motion dedection algorithm is based on mean absolute differences between current and past frame.

    You mention that  I wil need 2 buffers and FVID_exchange returns with the current buffer.How can I use two buffer on DM6437 and should I store different frames at different registers?

    Could you give me  detailed information please?

     

  • Basically, the concept of "ping-pong" buffering here is as follows:

    You have two separate buffers in DDR. When you receive an interrupt from VPFE, it generally means you've just captured a frame. In your interrupt service routine, store the starting address of the 2nd buffer into the VPFE SDR_ADDR register. Your next frame will be stored in the 2nd buffer. When the interrupt occurs again, store the starting address of the 1st buffer in to the SDR_ADDR register.

    I believe your instructor should be able to explain most of these basic concepts to you.

    In case you find the BIOS approach beyond the scope of your knowledge, please try http://c6000.spectrumdigital.com/evmdm6437/reve/files/evmdm6437_v2.zip. This zip file contains some very simple non-BIOS based CCS testcases. focus on the video_loopback testcase as it setups both VPBE and VPFE and basically displays whatever is captured.