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.

Need Clarification on XDM :: Data Structures

Hi, 

      I am working in Video Codec testing & as of now i am doing a test procedure which is now being doubted by my colleagues. Normally we used to run codec with Base class params mode or  with Extended class variables (if codec supports)

 

My Way of test Procedure for Basic Param from my understanding:

      The size field in IVIDDEC1_Params is used by the codec to identify whether to use Base class variables only or take Extended class variables. So, I set parms.size to base class structure size and go ahead executing ' N ' Configurations for Base Params testing.

So, lets say my varable ,

IMP2DEC_PARAMS params;                                             // Extended class variable

params.size = sizeof( IVIDDEC1_Params)                    // Assigning  Base class size & pass to handle creation API

handle =     (IALG_Handle)mp2_create      (     FxnsPtr  *fxns,       &params      );

 

       My understanding is, once we set base class size, then codec should create handle only with base class variables &  ignore the extended class variables even its being set by  application. 

 

I heard someone are saying, for base class testing, we should declare variable for Base param & then only it will be a valid Base param Mode testing, like

IVIDDEC3_PARAMS params;

params.size = sizeof( IVIDDEC1_Params)   ;       

 

Please clarify me my understanding is correct or not!

 

  • So long as you assign params.size = sizeof(IVIDDEC1_Params), it doesn't matter whether the struct you allocate in your app is "really" sizeof(IVIDDEC3_Params) big or sizeof(IMP2DEC_Params) big.  The codec won't know.

    As a recommendation though, if your test app _really_ only want to test base params, it may be better to use a IVIDDEC3_Params struct anyway.  This will isolate your test app from the MP2 codec, and is a little safety net in case your test app accidentally sets one of those MP2-specific fields (you'll get a compile error).  It'll also enable your test app to be used with _any_ codec, not just IMP2DEC codecs.

    Chris

  • Thank Chris for your brief explanation & I got your point !