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.

multiple pointers supported on DSP side?



Dear experts,

Here is a very critical question: 

Does not TI DSP side supports multiple pointers ? I am using Code engine, and porting JM decoder into DSP side.  I compile the code successfully, but, I find that the multiple pointers (more than one pointer) gives wrong result.  Very appreciated if you would answer my question directly. thanks .

Here is the example:

===================

 

static int alloc_decoder( DecoderParams **p_Dec)

{

  if ((*p_Dec = (DecoderParams *) Memory_contigAlloc(1, sizeof(DecoderParams)))==NULL) 

  {

    fprintf(stderr, "alloc_decoder: p_Dec\n");

    return -1;

  }

memset(*p_Dec, 0, sizeof(DecoderParams));

 

  alloc_video_params(&((*p_Dec)->p_Vid));

  alloc_params(&((*p_Dec)->p_Inp));

  (*p_Dec)->p_Vid->p_Inp = (*p_Dec)->p_Inp;

  (*p_Dec)->p_trace = NULL;

  (*p_Dec)->bufferSize = 0;

  (*p_Dec)->bitcounter = 0;

  (*p_Dec)->p_Vid->newframe=0;

  return ((*p_Dec)->p_Vid->newframe);

 

}

=================== 
when I debug it with "gdb" on the PC, which return correct result ((*p_Dec)->p_Vid->newframe=0), however, when I run it on DSP side on my OMAP3 board, which does not  return "0".  what is the problem? (**p_Dec) is a multiple pointers.

 

Note that, I port all the code into DSP side, and I run it on DSP side , not on GPP side. 

BR,
dave