Page 1 of 1

Ubuntu upscaling quality poorer compared to Windows

Posted: 29 Mar 2021 15:29
by cain05
I seem to be having an issue where the quality in vlc 3.0.9.2 on Ubuntu 20.04 is lower than that of the same version of VLC on Windows 10. In this scenario, I have a 720p stream that gets upscaled to 1080p. On Ubuntu, the image isn't as sharp, and there's a black bar at the bottom of the video. On windows, there is no black bar and the image is crisper. I'm using all the default settings as I have no idea what to change. I took comparison screenshots of the video here: https://imgur.com/a/0LpjvYT. The images are 1440p, but I usually watch the stream on my projector at 1080p. The problem persists regardless of resolution.

My cpu is a Ryzen 3600 and my gpu is a Radeon 5700XT, not sure if that matters or not. Thanks in advance

Re: Ubuntu upscaling quality poorer compared to Windows

Posted: 29 Mar 2021 16:52
by Rémi Denis-Courmont
Upscaling is done by the GPU, at least with the default settings, and black bar is inserted only if aspect ratii of the video and display don't match. So from VLC standpoint there should be no differences between Windows and Linux.

With no particular info, both issues seem to stem from GPU driver, which may well be a lot worse on Linux than on Windows.

Re: Ubuntu upscaling quality poorer compared to Windows

Posted: 29 Mar 2021 19:20
by cain05
Thank you for the response. On windows I'm using the latest AMD drivers. On Ubuntu, I'm using mesa 20.2.6. Are there some settings I can play with, or something else I can do to narrow down the issue?

EDIT: Here's some output from the console when I try to play a video that's 720p. Seems to be doing the same as the stream.

Code: Select all

libva info: VA-API version 1.7.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: Found init function __vaDriverInit_1_7 libva info: va_openDriver() returns 0 mesa: for the --simplifycfg-sink-common option: may only occur zero or one times! mesa: for the --global-isel-abort option: may only occur zero or one times! mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times! mesa: for the --structurizecfg-skip-uniform-regions option: may only occur zero or one times! [00007fe780006d30] glconv_vaapi_x11 gl error: vaDeriveImage: operation failed [00007fe7900122b0] main video output error: video output creation failed [00007fe7b4016190] main decoder error: failed to create video output [00007fe7b4016190] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding [00007fe7b40edf20] main decoder error: buffer deadlock prevented [00007fe7b4016190] avcodec decoder error: hardware acceleration picture allocation failed [h264 @ 0x7fe7b00c4280] get_buffer() failed [h264 @ 0x7fe7b00c4280] thread_get_buffer() failed [h264 @ 0x7fe7b00c4280] decode_slice_header error [h264 @ 0x7fe7b00c4280] no frame! [00007fe7b40ee7b0] mpeg4audio packetizer: AAC channels: 2 samplerate: 48000 [00007fe7b4016190] avcodec decoder error: hardware acceleration picture allocation failed [h264 @ 0x7fe7b00e08c0] get_buffer() failed [h264 @ 0x7fe7b00e08c0] thread_get_buffer() failed [h264 @ 0x7fe7b00e08c0] decode_slice_header error [h264 @ 0x7fe7b00e08c0] no frame! [h264 @ 0x7fe7b0009480] reference picture missing during reorder [h264 @ 0x7fe7b0009480] Missing reference picture, default is 65578
EDIT 2: output from vainfo

Code: Select all

libva info: VA-API version 1.7.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: Found init function __vaDriverInit_1_7 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.7 (libva 2.6.0) vainfo: Driver version: Mesa Gallium driver 20.2.6 for AMD Radeon RX 5700 XT (NAVI10, DRM 3.38.0, 5.8.0-48-generic, 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 VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileJPEGBaseline : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc
EDIT 3:

So either disabling HWE completely, or setting it to "VA-API video decoder via DRM" seems to resolve the issue for me.

Re: Ubuntu upscaling quality poorer compared to Windows

Posted: 30 Mar 2021 11:39
by Rémi Denis-Courmont
The first log shows that your VA driver is completely broken, and VDPAU ends up being used. So the quality problems are probably caused by the VDPAU driver. No surprises there, the G3DVL VDPAU driver has always been complete crap.