Mainline VPU


Myy
 Share

19 19

Recommended Posts

3 hours ago, usual user said:

Yes, but I prefer the video pipeline that gst-play auto negotiates because it gives me a resizeable, semitransparent window while moveing and window decorations.

 

It is probably to blame a misconfigured display pipeline of the compositor if the video pipeline is identical.
Maybe attach the video pipeline that is negotiated with this command on GNOME:

GST_DEBUG_DUMP_DOT_DIR=. gst-play-1.0 demo320x240.mp4.149ba2bb88584b89814a1c41b5feef77.mp4

For visualisation convert the dot-file by:

dot -Tpdf foo.dot > foo.pdf

 

I found this isn't video decode problem just now.

gst-launch-1.0 videotestsrc ! glimagesink -v

this test also not work.

Link to post
Share on other sites

Donate and support the project!

9 hours ago, iamdrq said:

this test also not work.

Plays for me: video-pipeline-glimagesink.pdf

But auto negotiation selects better default: video-pipeline-autovideosink.pdf

What MESA version you are running?

Spoiler
glxinfo -B

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Panfrost (0xffffffff)
    Device: Mali-T860 (Panfrost) (0xffffffff)
    Version: 21.3.0
    Accelerated: yes
    Video memory: 3834MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.1
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali-T860 (Panfrost)
OpenGL core profile version string: 3.1 Mesa 21.3.0
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)

OpenGL version string: 3.1 Mesa 21.3.0
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.3.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

 

 

Link to post
Share on other sites

7 hours ago, usual user said:

Plays for me: video-pipeline-glimagesink.pdf

But auto negotiation selects better default: video-pipeline-autovideosink.pdf

What MESA version you are running?

  Reveal hidden contents
glxinfo -B

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Panfrost (0xffffffff)
    Device: Mali-T860 (Panfrost) (0xffffffff)
    Version: 21.3.0
    Accelerated: yes
    Video memory: 3834MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.1
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali-T860 (Panfrost)
OpenGL core profile version string: 3.1 Mesa 21.3.0
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)

OpenGL version string: 3.1 Mesa 21.3.0
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.3.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

 

 

Big thanks for your Mesa version info. I found my version is 21.2.2 (this is latest version on my running ubuntu now). It's worked when upgraded to test version 21.3.0~rc5-1 (download from debian package system by hand) !

Link to post
Share on other sites

9 hours ago, usual user said:

But I still don't understand why you insist to involve the 3D accelerator in the video pipeline while the VOP can scan out video formats directly.

GPU rendering is usually preferred in X11 environment. I don't think DRM rendering is implemented in most players under X11. Another common reason would be to use various fancy shaders for post-processing, for features that are not yet supported in driver or not at all in HW.

Link to post
Share on other sites

On 12/2/2021 at 2:45 PM, usual user said:

But I still don't understand why you insist to involve the 3D accelerator in the video pipeline while the VOP can scan out video formats directly.

Oh, What is the VOP ? The auto negotiation selects XvImageSink(It has a window border better than waylandsink,glimagesink) that renders video frames to a drawable (XWindow) , but I use wayland it start a xwayland do it that I think it cost something.I did some test on my device, the best way is glimagesink that 4K 30fps normal paly only around 18% cpu (but  it 's strange  that some 1080p video waylandsink better than glimagesink), and I found  this gl way also work on browser like webkit.

Link to post
Share on other sites

5 hours ago, iamdrq said:

Oh, What is the VOP ?

VOP is Video Output Processor, the term Rockchip uses for the display subsystem. Its resources are exposed through the KMS/DRM framework. The rk3399 even has two of them (vopl and vopb in DT)
In a virtual console you use it e. g. via GBM. No 3D accelerator involved for standard video playback.
In Xwindow/Wayland, the display subsystem is occupied by the server, so an application must forward video content to it and cannot directly access KMS/DRM.
Xorg uses the modesetting driver which emulates all 2D action via 3D accelerator (glamor) and transmits all results via dumb buffer to KMS/DRM. This prevents the use of specific acceleration features of the display subsystem.
In Wayland world this is a completely different story. The DRM backend in Weston and the KWin Wayland compositor at least implement proper KMS/DRM API and make use of avilable display subsystem acceleration features. Thus, video content can be played without redirection via the 3D accelerator, as on a virtual console. Of course, the 3D accelerator, if it fits, is used for all graphic eye candy by the compositor.

In IBM PC architecture world the modesetting way is the "right thing to do" (TM) as the GPU card also provides the scan out engine. Content uploaded to the GPU will never return to the CPU for display. The scan out is done direct in hardware from the GPU card.

5 hours ago, iamdrq said:

4K 30fps normal paly only around 18%

I get similar relatively rising values with the start of XvImageSink playback, but since the overall value fluctuates a lot, it's difficult to know which CPU cycles are really associated with video playback or are attributable to other desktop activities.

Link to post
Share on other sites

Damn, missed the rebase of the  "Draft: v4l2codecs: Implement VP9 v4l2 decoder" patches and the source branch has been deleted.
With gstreamer main branch as of 11.12.2021 I get this video-pipeline-vp9.pdf and everything is working as expected.

Just discovered how to gather some video playback statistics while playing online videos. I still don't know which backend is used, but since I can play e.g. three videos in parallel, I'm pretty sure the VPU will be used.YouTube.thumb.png.5eb8b97b19a1de2629512356028c8a20.png

The eagle  has landed. \o/

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

19 19