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.

RDK codec instances

Guru 20755 points

Hello,

I would like to ask what is the criterion RDK framework decide which codec instance will be used ? I understand that according to map table each channel is mapped to IVA codec, but what happens then ? How is the IVA decide which codec instance to load and call , Is it only according to codec format, such as H.264 encoder, H.264 decoder, MPEG4 decoder, etc ? But there might be more than one instance for the same codec format, which were created at start up: which one of them will be loaded and called ?

Thank you,

Ran

  • Below is the flow of how encLink works.Flow is similar for decLink. Pls refer the link training that is part of the release documentation for pictorial representation of how on encLink/decLink work .Understanding of enc/dec Link operation should answer most of your questions above.I have used the terms IVA_HD and HDVICP interchaneably in the explanation below.

    There are multiple threads in encLink: encLink main thread & encLink IVA process thread (One IVA process thread per HDVICP)

    1. EncLink main thread deques frames from input queue,(Frames queued by previous link)

    2. The dequeued frame has an associated channel number.

    3. Assuming output buffers are available , the encLink main thread queues the frames for encode processing to the encLink IVA process thread,

        - There are 3 HDVICPs in 816x.

        - Each HDVICP has an associated IVA process thread and a process queue.

        - The encLink main thread does a lookup of the IVA channel map to determine which IVA process queue will process this channel and put it into the appropriate process queue.

    4. The IVA_process thread blocks on the input processQue. When a new frames is queued, the IVA process thread unblocks.

        - The frame that is meant for processing has the a channel number associated with it.

        - The IVA process thread will get the codec instance (codec type) associated with the channel number and invoke the codec's process call.

       - The process call internally invokes HDVICP_acquire. This is a blocking call which will unblock when the HDVICP h/w resource is free.

      - On completing the HDVICP processing the HDVICP h/w resource is released by this channel and becomes available for acquire by another channel.

    Based on above flow answers to your questions are:

    what is the criterion RDK framework decide which codec instance will be used ?

     - CHannel number determines the codec instance used. CHannel number is associated with each FVID2_frame and is set by the previous link.

    I understand that according to map table each channel is mapped to IVA codec, but what happens then ?

     - Answered above

    How is the IVA decide which codec instance to load and call , Is it only according to codec format, such as H.264 encoder, H.264 decoder, MPEG4 decoder, etc ?

    - Each enc/decLink channel has its associated codec instance.Determination is based on codec instance handle.

    But there might be more than one instance for the same codec format, which were created at start up: which one of them will be loaded and called ?

    - Codec instance handle is unique even for codecs with same format.