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.

A problem about codec creation , I am using DM6446

Hi,all
I want to make a codec by modifying the video_copy example(TI example,lab14)
How to pass two block memory of different types to DSP,Thanks
Here is my method(but got a compile error   segment fault):
(in the encode_video.c)

char aa[100];
point bb[100];      //point is a type I defined,simply {int x,int y}
....
XDAS_Int8 * buffers[2];
buffers[0] = (XDAS_Int8  *)aa;
buffers[1] = (XDAS_Int8  *)bb;
inBufDesc.bufs         =  (XDAS_Int8 **) buffers;
....
status = VIDENC_process(encoderHandle, &inBufDesc,&outBufDesc,&inArgs,&outArgs);
....

 

  • When passing memory pointer from ARM to DSP, you want to allocate the corresponding memory from CMEM memory space.  Because Linux has an MMU and work with virtual memory addresses, the DSP will not be able to undestand memory pointers allocated via standard C (work in Linux memory space).

    This means you will need to know your maximum shared memory (passed between ARM and DSP) requirements upfront.  Once you have your memory buffer from CMEM space, you can always typecast pointer to other data-types.

  • thanks,I solved the problem via your method