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.

problem in bilinear interpolation with maneging cache & sdram

hi
iam new in dsp processor.
i have board dm642 evm.i want implement bilinear interpolation on dm642 evm.when i run the program on board,
video output has many delay & my video is not real time.
plaese help me about this problem.
what i must doing for real time bilinear interpolation.
for this purpose i do this steps:
first i put frame of video in SDRAM then processing them.finally put them in SDRAM
& show them on display moniter.
cpu load gragh on 97 %  !!!!!!!!!
and display moniter has a lot af delay .

plaese help me about two question :

how do i can optimize my code and have real time video????
how  i can place data in internal memory?
thanks a lot
best regards

 

  • alireza shirani said:
    how do i can optimize my code and have real time video????

    The first way to reduce CPU load would be to enable full optimization (-o3).

    The second way would be to optimize the memory mapping, this is a bit more complex to do but if you could put the processing code into internal memory (using pragmas) that would probably help to improve performance as well.

    To go even further would be to find a way to use some intrinsics to accelerate the processing loop.

    alireza shirani said:
    how  i can place data in internal memory?

    This is done through modifications to your linker command file (or indirectly through your BIOS configuration) where you define what memory segments you have available and what is mapped where as well as pragmas (in particular DATA_SECTION) which can be used to allocate specific C data objects to specific memory segments.

  • hi berinie thompson

    thank a lot for your guid line.i try your suggestion ,then tell result to you.

    thank very mach.[:)]

  • In general, processing of Data especially, the 2D (image, video etc,) would require the following due to limited internal RAM.

    The trick is to have a ping-pong mechanism. You could use the dma's to get the data from external memory into a ping buffer while the processor works on the data already available in the pong buffer;Once the cpu completes the work, it waits/checks for the dma for the completed the xfer. If completed, then cpu processes the data in the ping buffer and triggers the dma to get the data into the pong buffer. Similar thing(dma trigger) has to be done even for the out buffers as well.