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.

It is urgent ! How to pass a data structure from GPP side into DSP side?

Dear Experts

I am using Codec engine for my project,  H.264/avc decoder, which is now running on GPP side without any problem. I now want to speed up it with DSP side.  So I am planning to port part of GPP work into DSP side. 

However, I is meeting a problem, how can I pass a data structure from GPP side into DSP side?

in app.c file, there is "VIDDEC_process(dec, &inBufDesc, &outBufDesc, &decInArgs, &decOutArgs);",  Can we use "&decInArgs" to pass a data structure from GPP into DSP side? How?  or any other method will be appreciated. thank you!

Here is a data structure involved in porting:

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

 

typedef struct slice

{

  struct video_par    *p_Vid;

  struct inp_par      *p_Inp;

   struct decoded_picture_buffer *p_Dpb;

  int idr_flag;

  int idr_pic_id;

   short        current_slice_nr;

   int                 mb_aff_frame_flag;

    int                 qp;

   Boolean is_reset_coeff;

  imgpel  ***mb_pred;

  imgpel  ***mb_rec;

  int     ***mb_rres;

  int     ***cof;

  int     ***fcf;

;
;
}
=============================================

 

 

Many thanks,

 

David

  • This article discusses extending the base XDM structs - pay close attention to the constraints section.

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

    You can extend decInArgs, but need to avoid pointers.  Depending on what you're trying to do, you may be able to unroll the struct ptr fields in your 'slice' struct above into explicit fields in your extended decInArgs.  You may be able to pass large buffers using inBufsDesc and outBufsDesc.

    If some of those large buffers don't change from process() call to process() call, some users transfer ownership of those buffers to the alg/codec via a single "initialize" control() call, then the alg uses those buffers throughout many process() calls... and the buffer is ultimately given back to the ARM via a "finalize" control() call.  This is often easier and lower overhead than dealing with the address translation and cache management of passing buffers for _every_ process() call.

    Chris