Results 1 to 8 of 8

Thread: Doubt on AllocateBuffer and UseBuffer

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    5

    Doubt on AllocateBuffer and UseBuffer

    Hello All
    I am having a doubt on AllocateBuffer and UseBuffer. The definition says that component shall return from AllocateBuffer function within 5milliseconds whereas it shall return from UseBuffer 20 milliseconds. Since AllocateBuffer has to allocate both buffer header and a buffer of specified size,AllocateBuffer function should be given more time than UseBuffer in which only allocation of buffer header is done. If I am wrong please correct me.
    Regards
    Subhish

  2. #2
    Junior Member
    Join Date
    Jul 2007
    Location
    India
    Posts
    9
    Hi Subhish,

    I think the reason for this is that allocate buffer would initialize from the beginning whereas usebuffer would be creating a new header and use the buffer of the another port(of other component) which depending on the component implementation might require changing its private data also. Also, if the components are setup using tunneling that those settings might have to be changed. Probably this is the reason.

    Regards,
    Pranav

  3. #3
    Junior Member
    Join Date
    Aug 2007
    Posts
    5

    Thanks Pranav

    Hello Pranav
    Thanks for the reply. Can you please explain with a scenario as I am not able to understand it.
    Regards
    Subhish

  4. #4
    Junior Member
    Join Date
    Aug 2007
    Posts
    5
    Hello Pranav
    Thanks for the reply. Can you please explain with a scenario as I am not able to understand it.
    Regards
    Subhish
    Quote Originally Posted by mpranav
    Hi Subhish,

    I think the reason for this is that allocate buffer would initialize from the beginning whereas usebuffer would be creating a new header and use the buffer of the another port(of other component) which depending on the component implementation might require changing its private data also. Also, if the components are setup using tunneling that those settings might have to be changed. Probably this is the reason.

    Regards,
    Pranav

  5. #5
    Junior Member
    Join Date
    Jul 2007
    Location
    India
    Posts
    9
    Hi ,

    Suppose the port is tunneled-with this if usebuffer is called, so you would be using the buffer of a tunnelled component.Now for this the non-supplier port will have to set its header according to that of the supplier port and may have to change its private data as well. I think the primary reason is that since you are using a buffer of another component/port, give more time since you are dependent on another component which is unlike Allocate buffer.

    Cheers,
    //Pranav

  6. #6
    Junior Member
    Join Date
    Aug 2006
    Posts
    10

    UseBuffer and AllocateBuffer

    According to the IL 1.1 specification, AllocateBuffer is only used to allocate buffers which are used for communication between the IL client and a component.

    UseBuffer on the other hand can be used to allocate buffers which are used for communication between tunneled components. So if you call UseBuffer on component "A"'s output port, which is connected to component "B"'s input port, then "A"'s UseBuffer call may further call UseBuffer on "B" and so this will take longer. Furthermore, if buffer sharing is enabled on "B" then B will take longer to process this request.

  7. #7
    Junior Member
    Join Date
    Oct 2007
    Posts
    2
    All time references within the specification are referenced as "Should" and not "Shall".

    The specification defines "Should" as :

    The stated functionality is not a requirement for an implementation of the
    OpenMAX IL API but is recommended or is a good practice. Should is
    usually used as follows: “The component should begin processing buffers
    immediately after it transitions to the OMX_StateExecuting state.” While
    this is good practice, there may be a valid reason to delay processing buffers,
    such as not having input data available.

  8. #8
    Member
    Join Date
    May 2008
    Location
    California, USA
    Posts
    51

    Re: Doubt on AllocateBuffer and UseBuffer

    Quote Originally Posted by maks78in
    The definition says that component shall return from AllocateBuffer function within 5milliseconds whereas it shall return from UseBuffer 20 milliseconds. Since AllocateBuffer has to allocate both buffer header and a buffer of specified size,AllocateBuffer function should be given more time than UseBuffer in which only allocation of buffer header is done.
    As has been said, the specification uses "should", i.e. a recommendation. Conformant components may take longer.

    AllocateBuffer is only used in base profile i.e. a single component being used by an IL client. UseBuffer can be used in tunnelled IL chains. Here the buffer may be shared by the component along the IL chain, so this has a higher expected time upper-bound.

    Thanks,

    Roger
    Roger Nixon, Broadcom Corporation

Similar Threads

  1. [OMX IL] AllocateBuffer on an enabled port
    By pedwo in forum OpenMAX IL
    Replies: 2
    Last Post: 08-19-2008, 01:36 AM
  2. Doubt on AllocateBuffer and UseBuffer
    By maks78in in forum OpenMAX
    Replies: 7
    Last Post: 01-01-1970, 12:00 AM
  3. [OMX IL] AllocateBuffer on an enabled port
    By pedwo in forum OpenMAX
    Replies: 2
    Last Post: 01-01-1970, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •