Hi Chris,

I can't still  perform it ,

I use XDAIS 5.0 and Codec Engine 1.0.0 and Codec Server 1.0.0.

I wonder whether XDAIS 5.0 supports extension of *Inargs or not?
I must download XDAIS 5.10 ?

Best regards.
Aysun




2007/4/14, Ring, Chris <[EMAIL PROTECTED]>:

 See below...

Chris

> -----Original Message-----
> From: Aysun Tasyapi [mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
]
> Sent: Friday, April 13, 2007 4:17 AM
> To: Ring, Chris
> Cc: [email protected]
> Subject: İlgi: İlgi: Add a new parameter
>
> Hi Chris,
>
> I am sorry. But i can't still do.
>
> I've performed following steps.
>
> 1- I've created extended struct at the DSP side (in videnccopy_ti.h).
> typedef struct IMYVIDENC_InArgs {
>     IVIDENC_InArgs base;
>     XDAS_Int32 weight;
>     XDAS_Int32 threshold;
> } IMYVIDENC_InArgs;

Looks right.

> 2- At the application side i've written this struct again.  Must i
> change anything in ividenc.h? Must i add this struct  in ividenc.h?

You must not change ividenc.h.  This new IMYVIDENC_InArgs struct is your
proprietary struct - so you can manage it by duplicating in your app/codec
as you're doing, or creating a header that both app and codec share.  It's
up to you.

> I 've written following in the ceapp.c
> typedef struct IMYVIDENC_InArgs {
>     IVIDENC_InArgs base;
>     XDAS_Int32 weight;
>     XDAS_Int32 threshold;
> } IMYVIDENC_InArgs;
>
> IMYVIDENC_InArgs myInArgs;
>
> myInArgs.base.size = sizeof(IMYIDENC_InArgs);
> myInArgs.threshold=100;
> myInArgs.weight=10;
>
>     /* encode the frame, pass addrs of the structures we
> populated above */
>     status = VIDENC_process(encHandle, &inBufDesc, &encodedBufDesc,
>                              &encoderInArgs, &encoderOutArgs);
>   But i don't know what i  write in process function. I have to wrtie
> &encoderInArgs  or &myInArgs?

You must pass in &myInArgs.  That's the struct you intend to provide to
your codec.

> 3- I want to acces the value of threshol at the DSP .
>
> in the  videnc_copy.c
>
> mythreshold = ((IMYVIDENC_InArgs *)inargs)->threshold;
> GT_1trace(curTrace, GT_ENTER, "\nmythreshold  --  %ld\n\n",
> mythreshold);
>
> When i run , I see following item.
> [DSP] mythreshold --  1093473516
>
> I don't understand where i am wrong. What do you suggest me?
> Thank you for your helping.
>
> best regards.
>
>
> 2007/4/12, Ring, Chris <[EMAIL PROTECTED]>:
> > You cannot modify the xDM headers - they are a formal
> specification.  So you
> > have to create a new extended struct, not modify the
> existing IVIDENC_InArgs
> > struct.
> >
> > Your new extended struct (e.g. IMYVIDENC_InArgs) must have
> the 'base xDM
> > struct' (e.g. IVIDENC_InArgs) as its first element.  It
> would look something
> > like this:
> >
> > ------------------------------
> > typedef struct IMYVIDENC_InArgs {
> >     IVIDENC_InArgs base;
> >     XDAS_Int32 weight;
> >     XDAS_Int32 threshold;
> > } IMYVIDENC_InArgs;
> > ------------------------------
> >
> > Then, in your application, be sure to initialize the base.size field
> > correctly:
> >
> > ------------------------------
> > IMYVIDENC_InArgs myInArgs;
> >
> > myInArgs.base.size = sizeof(IMYIDENC_InArgs);
> > ------------------------------
> >
> > Again, this is described in more detail in the latest xDM
> Users Guide here:
> >
http://www-s.ti.com/sc/techlit/spruec8
> >
> > Chris
> >
> > > -----Original Message-----
> > > From: Aysun Tasyapi [mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
]
> > > Sent: Thursday, April 12, 2007 5:56 AM
> > > To: Ring, Chris
> > > Cc: [email protected]
> > > Subject: İlgi: Add a new parameter
> > >
> > > Hi Chris,
> > >
> > > I am working with videnc_copy.  I've added a new parameter to
> > > VIDENC_InArgs.
> > > When i call  new paramaeter at the DSP side, i could see
> only first
> > > parameter's value.
> > >
> > > typedef struct IVIDENC_InArgs {
> > >    XDAS_Int32 threshold;
> > >    XDAS_Int32 weight;
> > >    XDAS_Int32 size;
> > >      } IVIDENC_InArgs;
> > >
> > > I couldn't see  the values of weight or etc.
> > >
> > > What can i do now?
> > >
> > > Best Regards.
> > >
> > > Aysun
> > >
> > >
> > >
> > > 2007/4/11, Ring, Chris <[EMAIL PROTECTED]>:
> > > > If by adding a parameter, you mean adding an argument
> to the process
> > > > function signature, no, you can't do that.  The function
> > > signature is a
> > > > part of the IVIDENC_Fxns spec and can't be changed.
> > > >
> > > > However, the structs passed into process (e.g.
> > > IVIDENC_InArgs) can be
> > > > 'extended' by updating the .size field to indicate the new,
> > > larger size
> > > > of the struct.  There is some documentation about this in
> > > section 2.3 of
> > > > the latest xDM users guide:
> > > >
> > > > http://www-s.ti.com/sc/techlit/spruec8
> > > >
> > > > If you're using the Codec Engine, you should pay attention
> > > to section
> > > > 2.3.2 as well, as there are a few additional constraints
> > > imposed by the
> > > > Codec Engine Framework (no pointers in extensions, and some size
> > > > limitations on how large the extended structs can be).
> > > >
> > > > And finally, remember that *_InArgs is for application
> -> algorithm
> > > > communication, *_OutArgs is for algorithm -> application
> > > communication.
> > > > You can't use InArgs to return something from the algorithm
> > > call, nor
> > > > use OutArgs to provide something to the algorithm prior
> to the call.
> > > >
> > > > Chris
> > > >
> > > >
> > > > ________________________________
> > > >
> > > >         From:
> > > >
> [EMAIL PROTECTED]
> > > >
> > > [mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > > avincidsp.
> > > > com] On Behalf Of Aysun Tasyapi
> > > >         Sent: Wednesday, April 11, 2007 5:04 AM
> > > >         To: [email protected]
> > > >         Subject: Add a new parameter
> > > >
> > > >
> > > >         hi all,
> > > >
> > > >
> > > >         I've some problem with calling a parameter from
> the DSP side.
> > > > I've performed   with videnc_copy application. I want to
> > > add a new input
> > > > parameter in the *process function.
> > > >         So that after adding this new input parameter
> at the ARM side ,
> > > > i want to see it  at the DSP side
> > > >
> > > >         But I couldn't see the value of this parameter
> DSP side . I  see
> > > > trash value.
> > > >
> > > >         Is it possible to add a new parameter in the
> *process function?
> > > >
> > > >         Best Regards.
> > > >
> > > >         Aysun
> > > >
> > > >
> > > >
> > > >
> > >
> >
>

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to