Hi,

We have also try to use VAAPI decoder + OpenGL with mpv with the same effects:

VAAPI + OpenGL example:
DISPLAY=:0 mpv --hwdec=vaapi --vo=opengl  The\ Simpsons\ Movie\ -\
1080p\ Trailer.mp4
Playing: The Simpsons Movie - 1080p Trailer.mp4
[osd/libass] Error opening memory font 'fonts.conf'
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: stream 0, timescale not set
 (+) Video --vid=1 (*) (h264 1920x800 23.976fps)
     Video --vid=2 [P] (png)
 (+) Audio --aid=1 --alang=und (*) (aac 2ch 44100Hz)
File tags:
 Artist: 20th Century Fox
 Genre: Trailer
 Title: The Simpsons Movie - Trailer
[vo/opengl/x11] XOpenIM() failed. Unicode input will not work.
[vo/opengl/x11] XOpenIM() failed. Unicode input will not work.
[vo/opengl/vaapi-egl] vaDeriveImage(): invalid VASurfaceID
[vo/opengl/vaapi-egl] vaDeriveImage(): invalid VAImageFormat
[ffmpeg] AVHWFramesContext: Failed to create surface: 2 (resource
allocation failed).
[ffmpeg] AVHWFramesContext: Unable to allocate a surface from internal
buffer pool.
[vo/opengl/vaapi-egl] vaDeriveImage(): invalid VASurfaceID
[vo/opengl/vaapi-egl] vaDeriveImage(): invalid VAImageFormat
[ffmpeg] AVHWFramesContext: Failed to create surface: 2 (resource
allocation failed).
[ffmpeg] AVHWFramesContext: Unable to allocate a surface from internal
buffer pool.
VO does not support requested hardware decoder, or loading it failed.
ALSA lib ../../../alsa-lib-1.1.8/src/pcm/pcm_dmix.c:1108:(snd_pcm_dmix_open)
unable to open slave
[ao/alsa] Playback open error: No such file or directory
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
[ao] Failed to initialize audio driver 'oss'
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [opengl] 1920x800 yuv420p
V: 00:00:06 / 00:02:17 (4%)

Just opengl or vappi works fine.

VAAPI  example:
DISPLAY=:0 mpv --hwdec=vaapi --vo=xv  The\ Simpsons\ Movie\ -\ 1080p\
Trailer.mp4
Playing: The Simpsons Movie - 1080p Trailer.mp4
[osd/libass] Error opening memory font 'fonts.conf'
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: stream 0, timescale not set
 (+) Video --vid=1 (*) (h264 1920x800 23.976fps)
     Video --vid=2 [P] (png)
 (+) Audio --aid=1 --alang=und (*) (aac 2ch 44100Hz)
File tags:
 Artist: 20th Century Fox
 Genre: Trailer
 Title: The Simpsons Movie - Trailer
[vo/xv/x11] XOpenIM() failed. Unicode input will not work.
[vo/xv] Warning: this legacy VO has bad quality and performance, and
will in particular result in blurry OSD and subtitles. You should fix
your graphics drivers, or not force the xv VO.
VO does not support requested hardware decoder, or loading it failed.
ALSA lib ../../../alsa-lib-1.1.8/src/pcm/pcm_dmix.c:1108:(snd_pcm_dmix_open)
unable to open slave
[ao/alsa] Playback open error: No such file or directory
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
[ao] Failed to initialize audio driver 'oss'
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [xv] 1920x800 yuv420p
V: 00:00:09 / 00:02:17 (6%)
Exiting... (Quit)

OpenGL example:
DISPLAY=:0 mpv --hwdec=no --vo=opengl  The\ Simpsons\ Movie\ -\ 1080p\
Trailer.mp4
Playing: The Simpsons Movie - 1080p Trailer.mp4
[osd/libass] Error opening memory font 'fonts.conf'
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: stream 0, timescale not set
 (+) Video --vid=1 (*) (h264 1920x800 23.976fps)
     Video --vid=2 [P] (png)
 (+) Audio --aid=1 --alang=und (*) (aac 2ch 44100Hz)
File tags:
 Artist: 20th Century Fox
 Genre: Trailer
 Title: The Simpsons Movie - Trailer
[vo/opengl/x11] XOpenIM() failed. Unicode input will not work.
[vo/opengl/x11] XOpenIM() failed. Unicode input will not work.
ALSA lib ../../../alsa-lib-1.1.8/src/pcm/pcm_dmix.c:1108:(snd_pcm_dmix_open)
unable to open slave
[ao/alsa] Playback open error: No such file or directory
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
[ao] Failed to initialize audio driver 'oss'
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [opengl] 1920x800 yuv420p
V: 00:00:01 / 00:02:17 (1%)
Exiting... (Quit)

On Mon, 27 Apr 2020 at 15:13, Leo Liu <leo....@amd.com> wrote:
>
> +Thong.
>
> On 2020-04-27 8:29 a.m., Daniel Gomez wrote:
> > Adding Boyuan Zhang to the thread.
> >
> > On Mon, 27 Apr 2020 at 14:00, Daniel Gomez <dan...@qtec.com> wrote:
> >> Hi guys,
> >>
> >> We have found a limitation on the usage of the GPU and the encoder
> >> when you run it simultaneously in a gstreamer pipeline and we would like to
> >> report it and try to find a solution.
> >>
> >> Besides encoding the video frame, the following gstreamer pipeline shows 
> >> the
> >> usage of the GPU in two ways:
> >> 1. OpenGL color conversion.
> >> 2. Render to the display using OpenGL.
> >>
> >> DISPLAY=:0 \
> >> GST_DEBUG="*:3,GST_TRACER:7" GST_TRACERS="queuelevel"  \
> >> gst-launch-1.0 videotestsrc ! video/x-raw,format=RGBA ! \
> >> glupload ! glcolorconvert !  gldownload  ! \
> >> queue max-size-bytes=279936000 max-size-time=3000000000 leaky=2 ! \
> >> vaapih264enc ! \
> >> fakesink \
> >> videotestsrc ! video/x-raw ! glimagesink sync=false
> >>
> >> By running the above pipeline you can see how the encoder queue fills up 
> >> to the
> >> maximum and never consumes the incoming data.
> >>
> >> Hardware information:
> >>
> >> AMD Embedded R-Series RX-421BD Radeon R7
> >>
> >> lspci -v -s 00:01.0
> >> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc.
> >> [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] (rev 84) (prog-if 00 [VGA
> >> controller])
> >> Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon
> >> R5/R6/R7 Graphics]
> >> Flags: bus master, fast devsel, latency 0, IRQ 53
> >> Memory at e0000000 (64-bit, prefetchable) [size=256M]
> >> Memory at f2000000 (64-bit, prefetchable) [size=8M]
> >> I/O ports at 5000 [size=256]
> >> Memory at f2c00000 (32-bit, non-prefetchable) [size=256K]
> >> Expansion ROM at 000c0000 [disabled] [size=128K]
> >> Capabilities: [48] Vendor Specific Information: Len=08 <?>
> >> Capabilities: [50] Power Management version 3
> >> Capabilities: [58] Express Root Complex Integrated Endpoint, MSI 00
> >> Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
> >> Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
> >> Capabilities: [270] Secondary PCI Express <?>
> >> Capabilities: [2b0] Address Translation Service (ATS)
> >> Capabilities: [2c0] Page Request Interface (PRI)
> >> Capabilities: [2d0] Process Address Space ID (PASID)
> >> Kernel driver in use: amdgpu
> >> Kernel modules: amdgpu
> >>
> >> DISPLAY=:0 glxinfo -B
> >> name of display: :0
> >> display: :0  screen: 0
> >> direct rendering: Yes
> >> Extended renderer info (GLX_MESA_query_renderer):
> >>      Vendor: X.Org (0x1002)
> >>      Device: AMD Radeon R7 Graphics (CARRIZO, DRM 3.36.0,
> >> 5.5.0-qtec-standard, LLVM 8.0.0) (0x9874)
> >>      Version: 19.0.1
> >>      Accelerated: yes
> >>      Video memory: 1024MB
> >>      Unified memory: no
> >>      Preferred profile: core (0x1)
> >>      Max core profile version: 4.5
> >>      Max compat profile version: 4.5
> >>      Max GLES1 profile version: 1.1
> >>      Max GLES[23] profile version: 3.2
> >> OpenGL vendor string: X.Org
> >> OpenGL renderer string: AMD Radeon R7 Graphics (CARRIZO, DRM 3.36.0,
> >> 5.5.0-qtec-standard, LLVM 8.0.0)
> >> OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.1
> >> OpenGL core profile shading language version string: 4.50
> >> OpenGL core profile context flags: (none)
> >> OpenGL core profile profile mask: core profile
> >>
> >> OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.0.1
> >> OpenGL shading language version string: 4.50
> >> OpenGL context flags: (none)
> >> OpenGL profile mask: compatibility profile
> >>
> >> OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.0.1
> >> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
> >>
> >> Any idea/suggestion why is this happening?
> >>
> >> Thanks!
> >> Daniel
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&amp;data=02%7C01%7Cleo.liu%40amd.com%7C82f98f79c3a04fb7a55c08d7eaa6aefd%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637235873957297252&amp;sdata=T4OAc8VVYR6YFyoEnZfcLK9r9VwYdnwK%2B7rpSEvBXlo%3D&amp;reserved=0
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to