You are not logged in.

#1 2020-12-16 19:04:32

Gaen
Member
Registered: 2020-12-16
Posts: 28

[SOLVED] AMDGPU | VLC | Hardware Acceleration poor quality

Hi!

I encountered a weird "bug" on VLC while enabling hardware acceleration; jagged edges. (Please view the attached image in full resolution.)
The default "Automatic" decoding mode was much worse. In the end a system restart seems to be fixed the whole issue. Couldn't reproduce the jagged edges since.

Why did this happened in the first place?

OS: Arch Linux (fresh install | bug occurred after first restart)
Kernel: x86_64 Linux 5.9.14-arch-1
DE: KDE 5.77.0  / Plasma 5.20.4
WM: KWin
GPU: AMD/ATI Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7) (prog-if 00 [VGA controller])

Drivers:

  • xf86-video-amdgpu

  • mesa

  • vulkan-radeon

  • libva-mesa-driver

  • mesa-vdpau

Last edited by Gaen (2021-04-24 14:33:55)

Offline

#2 2020-12-21 21:54:06

Gaen
Member
Registered: 2020-12-16
Posts: 28

Re: [SOLVED] AMDGPU | VLC | Hardware Acceleration poor quality

5 days and one amdgpu update later it's not working again...
The problem is the same as before.

Offline

#3 2020-12-22 10:38:05

apaz
Member
Registered: 2018-07-23
Posts: 120

Re: [SOLVED] AMDGPU | VLC | Hardware Acceleration poor quality

I use Vaapi acceleration and everything works fine (but trying Vdpau, it works fine with my Navi10). Try vaapi, after all vdpau on AMD is just a wrapper.

Offline

#4 2020-12-22 16:36:29

Gaen
Member
Registered: 2020-12-16
Posts: 28

Re: [SOLVED] AMDGPU | VLC | Hardware Acceleration poor quality

I tried it and the poor quality is still the same.


Output of vainfo:

vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Mesa Gallium driver 20.3.1 for Radeon RX550/550 Series (POLARIS12, DRM 3.39.0, 5.9.14-arch1-1, LLVM 11.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Output of vdpauinfo:

display: :0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420    16384 16384  NV12 YV12 
422    16384 16384  UYVY YUYV 
444    16384 16384  Y8U8V8A8 V8U8Y8A8 
420_16 16384 16384  
422_16 16384 16384  
444_16 16384 16384  

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                          --- not supported ---
MPEG2_SIMPLE                    3 65536  4096  4096
MPEG2_MAIN                      3 65536  4096  4096
H264_BASELINE                  52 65536  4096  4096
H264_MAIN                      52 65536  4096  4096
H264_HIGH                      52 65536  4096  4096
VC1_SIMPLE                      1 65536  4096  4096
VC1_MAIN                        2 65536  4096  4096
VC1_ADVANCED                    4 65536  4096  4096
MPEG4_PART2_SP                  3 65536  4096  4096
MPEG4_PART2_ASP                 5 65536  4096  4096
DIVX4_QMOBILE                  --- not supported ---
DIVX4_MOBILE                   --- not supported ---
DIVX4_HOME_THEATER             --- not supported ---
DIVX4_HD_1080P                 --- not supported ---
DIVX5_QMOBILE                  --- not supported ---
DIVX5_MOBILE                   --- not supported ---
DIVX5_HOME_THEATER             --- not supported ---
DIVX5_HD_1080P                 --- not supported ---
H264_CONSTRAINED_BASELINE       0 65536  4096  4096
H264_EXTENDED                  --- not supported ---
H264_PROGRESSIVE_HIGH          --- not supported ---
H264_CONSTRAINED_HIGH          --- not supported ---
H264_HIGH_444_PREDICTIVE       --- not supported ---
VP9_PROFILE_0                  --- not supported ---
VP9_PROFILE_1                  --- not supported ---
VP9_PROFILE_2                  --- not supported ---
VP9_PROFILE_3                  --- not supported ---
HEVC_MAIN                      186 65536  4096  4096
HEVC_MAIN_10                   186 65536  4096  4096
HEVC_MAIN_STILL                --- not supported ---
HEVC_MAIN_12                   --- not supported ---
HEVC_MAIN_444                  --- not supported ---
HEVC_MAIN_444_10               --- not supported ---
HEVC_MAIN_444_12               --- not supported ---

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8 
R8G8B8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8 
R10G10B10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8 
B10G10R10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8 

Bitmap surface:

name              width height
------------------------------
B8G8R8A8         16384 16384
R8G8B8A8         16384 16384
R10G10B10A2      16384 16384
B10G10R10A2      16384 16384
A8               16384 16384

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y
HIGH QUALITY SCALING - L1        y
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     4096
VIDEO_SURFACE_HEIGHT             y        48     4096
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y  

Output of grep -iE 'vdpau | dri driver' /var/log/Xorg.0.log:

[    26.571] (II) AMDGPU(0): [DRI2]   DRI driver: radeonsi
[    26.571] (II) AMDGPU(0): [DRI2]   VDPAU driver: radeonsi

Offline

#5 2020-12-23 08:45:43

apaz
Member
Registered: 2018-07-23
Posts: 120

Re: [SOLVED] AMDGPU | VLC | Hardware Acceleration poor quality

I find no difference between Software, vaapi (with drm) and vdpau. See image:

https://postimg.cc/ZWjCcYrp

I seem to be an exception, though:

https://bbs.archlinux.org/viewtopic.php?id=253244

Also try MPV to see if anything changes.

PS: vainfo and vdpauinfo give me the same results as yours (apart from the different graphics card)

Offline

#6 2020-12-23 22:54:33

Gaen
Member
Registered: 2020-12-16
Posts: 28

Re: [SOLVED] AMDGPU | VLC | Hardware Acceleration poor quality

In my case on VLC "va-api with drm" simply uses the cpu without quality loss just like "software", which is in some cases ends with a 40-50% cpu usage.
Only vdpau or va-api solve the issue, but since both came with "jagged edges" again, it's useless.

I already read that topic and hoped that there'd be a solution or at least an answer by now.
The most annoying thing is that it worked fine until now..

According to this, Mesa 21.0.0-devel solves the va-api issue, hopefully vdpau too..
I'll wait for the stable to find out.


MPV on the other hand works like a charm with both vdpau and va-api even on high quality settings (while the cpu is around 3-7%).

Offline

#7 2021-04-24 14:32:00

Gaen
Member
Registered: 2020-12-16
Posts: 28

Re: [SOLVED] AMDGPU | VLC | Hardware Acceleration poor quality

I forgot to mention, but after mesa 21.0 hardware acceleration started working again.
(Currently using mesa 21.0.3 with xf86-video-amdgpu 19.1.0)

Offline

Board footer

Powered by FluxBB