Kodi Community Forum

Full Version: Radeon OSS with vdpau (howto)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2013-10-26, 16:19)fritsch Wrote: [ -> ]mesa: http://sprunge.us/cLTI
libvdpau / vdpauinfo: http://paste.ubuntu.com/6306537/

libvdpau compiled fine with those patches, but it seems I would have to look closer at how the portage install script in gentoo works for that package hence mesa failed at finding newer version of the library. might have to do something with multilib profile and compiling separately stuff for 32 and 64 bit and having some header not install properly

libvdpau patches did not apply for vdpauinfo. I am not a programmer but it seems for that at least something along those lines would be needed instead

--- a/vdpauinfo.cpp 2013-10-27 00:24:41.788666715 +0200
+++ b/vdpauinfo.cpp 2013-10-27 00:26:45.209668378 +0200
@@ -344,6 +344,7 @@
{"DIVX5_MOBILE", VDP_DECODER_PROFILE_DIVX5_MOBILE},
{"DIVX5_HOME_THEATER", VDP_DECODER_PROFILE_DIVX5_HOME_THEATER},
{"DIVX5_HD_1080P", VDP_DECODER_PROFILE_DIVX5_HD_1080P},
+{"H264_HI10", VDP_DECODER_PROFILE_H264_HI10},
};
const size_t decoder_profile_count = sizeof(decoder_profiles)/sizeof(Desc);

PS Anyways is that even possible that adding these few lines would make hi10p decode on present UDV hardware??
Make sure to apply that stuff on the git revision, where I based them on.

Yes, this is exactly the point here. Current UVD has support for "hi10p" decoding by only specifiing those two additional fields.

But, yeah - was just as information. xbmc needs adjusting to use that new profile.
Please describe in words what is happening.

I can only see two disconts, one after changing refreshrate and one after the scaler is up.
The new kernel gets better results.

Kernel is 3.12.0rc6+ 0.7

This is the new table, with VC-1 working as well
Code:
qvdpautest 0.5.2++
Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz
Advanced Micro Devices, Inc. [AMD/ATI] Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M]

VDPAU API version : 1
VDPAU implementation : G3DVL VDPAU Driver Shared Library version 1.0


MPEG DECODING (1920x1080): 76 frames/s
MPEG DECODING (1280x720): 116 frames/s
H264 DECODING (1920x1080): 50 frames/s
H264 DECODING (1280x720): 90 frames/s
MPEG4 DECODING (1920x1080): 71 frames/s

MIXER WEAVE (1920x1080): 1163 frames/s
MIXER BOB (1920x1080): 2085 fields/s
MIXER TEMPORAL (1920x1080): 2148 fields/s
MIXER TEMPORAL + IVTC (1920x1080): 2148 fields/s
MIXER TEMPORAL + SKIP_CHROMA (1920x1080): 2148 fields/s
MIXER TEMPORAL_SPATIAL (1920x1080): 2058 fields/s
MIXER TEMPORAL_SPATIAL + IVTC (1920x1080): 2149 fields/s
MIXER TEMPORAL_SPATIAL + SKIP_CHROMA (1920x1080): 2149 fields/s
MIXER TEMPORAL_SPATIAL (720x576 video to 1920x1080 display): 2205 fields/s

MULTITHREADED MPEG DECODING (1920x1080): 72 frames/s
MULTITHREADED MIXER TEMPORAL (1920x1080): 2177 fields/s
did you hear the audio clip i posted yesterday?

recorded from TV headphone out so not brilliant quality.
weird audio
glitch starts at 5 seconds and ends at 11 seconds.
I use git for as long as I remember so no problem there

Anyway I actually took a liberty at looking at the error and it seems mesa just askes for "to high" libvdpau version Wink Trivial fix in third patch for mesa should take care of that

checking for VDPAU... no
configure: error: Package requirements (vdpau >= 0.8.0 x11-xcb xcb-dri2 >= 1.8) were not met:

Requested 'vdpau >= 0.8.0' but version of VDPAU is 0.8

Code:
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 91b9871..4919cdd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1313,7 +1313,7 @@ fi
AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes)

if test "x$enable_vdpau" = xyes; then
-    PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1 x11-xcb xcb-dri2 >= 1.8])
+    PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.8 x11-xcb xcb-dri2 >= 1.8])
     GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau"
fi
AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
--
1.8.1.2
I cite myself:
Quote:I will especially update, when I get feedback on the vdpau Mailinglist (bumped versions are only to be seen prototypical).
(2013-10-27, 11:36)deadite66 Wrote: [ -> ]did you hear the audio clip i posted yesterday?

recorded from TV headphone out so not brilliant quality.
weird audio
glitch starts at 5 seconds and ends at 11 seconds.

That is a quite long clitch. I think filling a separate bug on freedesktop could be the way to go. This "clitch" how you call it - no idea what this might be, despite some bad signal. Which Sync Playback Method do you use?
(2013-10-27, 11:36)deadite66 Wrote: [ -> ]did you hear the audio clip i posted yesterday?

recorded from TV headphone out so not brilliant quality.
weird audio
glitch starts at 5 seconds and ends at 11 seconds.

According to Linux
Audio file with ID3 version 2.3.0, contains: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, Monaural

With Firefox:
Noise starts at second 5 and ends at 7
The sample is very good before and after.
During those 2 secs it's distorted, something like guitar dubber effect.

With XBMC
Noise starts at second 5 and lasts till second 10
The sample is very good before and after.
During those 5 secs it's distorted, something like guitar dubber effect.

I hope it helps
Still something is wrong Sad

Code:
/bin/sh ../../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -m32 -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.0.0-devel\" -DPACKAGE_STRING=\"Mesa\ 10.0.0-devel\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.0.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -DHAVE_LIBEXPAT=1 -I.    -I../../../src/gallium/auxiliary/util -I../../../include -I../../../src/gallium/include -I../../../src/gallium/auxiliary -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_LLVM=0x0304 -fvisibility=hidden -I/usr/include  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -march=native -pipe -Ofast -DNO_DEBUG -DNDEBUG -fomit-frame-pointer -DG_DISABLE_ASSERT -ftree-vectorize -findirect-inlining -fgcse-sm -fgcse-las -fgcse-after-reload -ftracer -fprefetch-loop-arrays -minline-stringops-dynamically -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp  -c -o vl/vl_mpeg12_bitstream.lo vl/vl_mpeg12_bitstream.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -m32 -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.0.0-devel\" "-DPACKAGE_STRING=\"Mesa 10.0.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.0.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -DHAVE_LIBEXPAT=1 -I. -I../../../src/gallium/auxiliary/util -I../../../include -I../../../src/gallium/include -I../../../src/gallium/auxiliary -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_LLVM=0x0304 -fvisibility=hidden -I/usr/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -march=native -pipe -Ofast -DNO_DEBUG -DNDEBUG -fomit-frame-pointer -DG_DISABLE_ASSERT -ftree-vectorize -findirect-inlining -fgcse-sm -fgcse-las -fgcse-after-reload -ftracer -fprefetch-loop-arrays -minline-stringops-dynamically -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -c vl/vl_mpeg12_bitstream.c  -fPIC -DPIC -o vl/.libs/vl_mpeg12_bitstream.o
In file included from vl/vl_mpeg12_decoder.c:34:0:
./util/u_video.h: In function 'u_reduce_video_profile':
./util/u_video.h:64:12: error: 'PIPE_VIDEO_PROFILE_MPEG4_AVC_HI10' undeclared (first use in this function)
       case PIPE_VIDEO_PROFILE_MPEG4_AVC_HI10:
            ^
./util/u_video.h:64:12: note: each undeclared identifier is reported only once for each function it appears in
./util/u_video.h:65:17: error: 'PIPE_VIDEO_PROFILE_MPEG4_AVC' undeclared (first use in this function)
          return PIPE_VIDEO_PROFILE_MPEG4_AVC;
                 ^
distcc[28680] ERROR: compile (null) on localhost failed
gmake[3]: *** [vl/vl_mpeg12_decoder.lo] Error 1
gmake[3]: *** Waiting for unfinished jobs....
In file included from vl/vl_decoder.c:30:0:
./util/u_video.h: In function 'u_reduce_video_profile':
./util/u_video.h:64:12: error: 'PIPE_VIDEO_PROFILE_MPEG4_AVC_HI10' undeclared (first use in this function)
       case PIPE_VIDEO_PROFILE_MPEG4_AVC_HI10:
            ^
./util/u_video.h:64:12: note: each undeclared identifier is reported only once for each function it appears in
./util/u_video.h:65:17: error: 'PIPE_VIDEO_PROFILE_MPEG4_AVC' undeclared (first use in this function)
          return PIPE_VIDEO_PROFILE_MPEG4_AVC;
                 ^
distcc[28635] ERROR: compile (null) on localhost failed
gmake[3]: *** [vl/vl_decoder.lo] Error 1
gmake[3]: Leaving directory `/tmp/portage/media-libs/mesa-9999/work/Mesa-9999-x86/src/gallium/auxiliary'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/tmp/portage/media-libs/mesa-9999/work/Mesa-9999-x86/src/gallium/auxiliary'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/portage/media-libs/mesa-9999/work/Mesa-9999-x86/src'
make: *** [all-recursive] Error 1
Yes - and this is not topic of this thread here.
http://sprunge.us/BKSX
and a complete one: http://sprunge.us/bTDZ
(2013-10-27, 11:36)deadite66 Wrote: [ -> ]recorded from TV headphone out so not brilliant quality.
weird audio
glitch starts at 5 seconds and ends at 11 seconds.

From what I can hear from these crappy laptop speakers, that sounds a lot like the seemingly sporadic audio glitch I keep getting. I haven't investigated the matter yet, so far it appears random, but it might as well be periodical. It did not happen before switching to 3.12 kernel.

While watching a TV show episode, about 45 minutes, it occurs a few times and last just a few seconds each time. The best I can describe it is as if some kind of distortion effect is applied to the audio. I haven't noticed anything in normal xbmc.log to coincide with the occurrences, but I haven't had time yet for a debug log either.
(2013-10-27, 11:41)fritsch Wrote: [ -> ]Which Sync Playback Method do you use?

as recommended in the guide.
VDPAU: On
Prefer VDPAU Mixer: ON
VAAPI: off
Adjust Refreshrate to match video: On
Sync Playback to Display: On
Sync Method: Video Clock (Drop/Dupe)

EDIT: problem goes away if "Adjust Refreshrate to match video: Off"
@deadite66
You might try mainline kernels for xubuntu64 to rule out patches causing issues for you.

http://kernel.ubuntu.com/~kernel-ppa/mai..._amd64.deb
http://kernel.ubuntu.com/~kernel-ppa/mai...35_all.deb
http://kernel.ubuntu.com/~kernel-ppa/mai..._amd64.deb

It played well on my a4 3400 as did 3.11.4 also. Adjust refresh rate is a good thing if the panel can handle fps output. 24p is amazing.