What is the purpose behind the VPU wrapper?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is the purpose behind the VPU wrapper?

5,996 Views
dv1
Contributor III

Hello,

I wonder what libfslvpuwrap is for. From what I can see, for video decoding using the VPU, only the imx-lib is necessary.

From looking at the source I get the impression that libfslvpuwrap is supposed to be a layer which abstracts away most i.MX version differences and adds some workarounds for hardware issues.

So, if I want to add VPU support to a multimedia stack, is it recommended to use libfslvpuwrap instead of imx-lib directly? Or is the vpu wrapper an utility library for other Freescale packages, and not intended to be used by 3rd party software?

One problem I see with the VPU wrapper is that I can find API documentation for imx-lib, but not for the wrapper. Most imx-lib calls translate more or less straightforward to the wrapper's API, though.

Tags (3)
5 Replies

2,687 Views
davidmartinez_a
Contributor I

Hi all,

I am currently trying to update the old vpu API to the vpu wrapper since after updating the gstreamer libraries the video is not shown properly.

In order to do it, I only have the decoder.*  and allocator.* examples  generated by yocto, the old code with the old vpu API implementation and the old vpu documentation. The task is really difficult with this help. Does NXP have a new API guide or documentation of the vpu_wrapper usage?

Thanks

0 Kudos
Reply

2,687 Views
jens_rossbach
Contributor I

Is there anybody who can answer on this question?

0 Kudos
Reply

2,687 Views
dv1
Contributor III

Using imx-vpu directly is not easy, because it is pretty basic in some regards. The VPU wrapper implements and encapsulates some details that would otherwise have to be done manually.

Some examples:

  • Detecting resolution changes
  • Handling out-of-band codec data (typically stored in container formats)
  • Adding headers for some formats
  • Many small steps necessary for correct flushing of the VPU
  • Draining the VPU when there is no more input data
  • Avoiding VPU deadlocks

Unfortunately, there is little documentation for it. I am attempting to create an alternative library that hopefully is easier to use. Here it is: Freescale/libimxvpuapi · GitHub

2,687 Views
jamesbone
NXP TechSupport
NXP TechSupport

The only documentation besides  mention by  @dv1 , it is the VPU API Doc. See attach

0 Kudos
Reply

2,687 Views
dv1
Contributor III

Yes, this is the main documentation for the VPU, and to a large extent, its information translates nicely to the VPU wrapper API. However, keep in mind that it refers to imx-vpu , so some details (like the bitstream buffer handling) have no meaning for when using the VPU wrapper.

0 Kudos
Reply