Re: [gentoo-user] skylake and x265 movie display

2019-06-27 Thread Daniel Frey

On 6/27/19 4:46 PM, Adam Carter wrote:

The error was because i ran it in a remote shell. Running it locally
now and it shows HEVC. I don't have any 8 bit HEVCs files so i'm
transcoding one to 8bit now.


Ok confirmed that 8 bit HEVC is low CPU and doesn't skip frames, so 
that's that.


Well, at least that's been sorted out. I guess Intel made some changes 
with the newer NUCs.


Way back when I set mine up I found a thread on Intel's forums 
mentioning not all hardware is fully available in Legacy boot mode. No 
reasons why (maybe they didn't bother testing it so they didn't provide 
access?)


At least you don't have to mess around with UEFI - but as I mentioned 
earlier firmware updates can help performance with the video as board 
and gpu firmware get updated. The problem is newer firmware on some 
devices remove legacy boot support. It's UEFI or nothing.


Dan



Re: [gentoo-user] skylake and x265 movie display

2019-06-27 Thread Adam Carter
>
> The error was because i ran it in a remote shell. Running it locally now
> and it shows HEVC. I don't have any 8 bit HEVCs files so i'm transcoding
> one to 8bit now.
>
>
Ok confirmed that 8 bit HEVC is low CPU and doesn't skip frames, so that's
that.


Re: [gentoo-user] skylake and x265 movie display

2019-06-26 Thread Adam Carter
On Thu, Jun 27, 2019 at 11:22 AM Adam Carter  wrote:

> Missed this, you can use `vainfo` and it should tell you the profiles it
>> supports.
>>
>
>  $ vainfo
> libva info: VA-API version 1.4.0
> X Error of failed request:  BadRequest (invalid request code or no such
> operation)
>   
>

The error was because i ran it in a remote shell. Running it locally now
and it shows HEVC. I don't have any 8 bit HEVCs files so i'm transcoding
one to 8bit now.

libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.3.0
vainfo: Supported profile and entrypoints
  VAProfileMPEG2Simple: VAEntrypointVLD
  VAProfileMPEG2Simple: VAEntrypointEncSlice
  VAProfileMPEG2Main  : VAEntrypointVLD
  VAProfileMPEG2Main  : VAEntrypointEncSlice
  VAProfileH264ConstrainedBaseline: VAEntrypointVLD
  VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
  VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
  VAProfileH264ConstrainedBaseline: VAEntrypointFEI
  VAProfileH264ConstrainedBaseline: VAEntrypointStats
  VAProfileH264Main   : VAEntrypointVLD
  VAProfileH264Main   : VAEntrypointEncSlice
  VAProfileH264Main   : VAEntrypointEncSliceLP
  VAProfileH264Main   : VAEntrypointFEI
  VAProfileH264Main   : VAEntrypointStats
  VAProfileH264High   : VAEntrypointVLD
  VAProfileH264High   : VAEntrypointEncSlice
  VAProfileH264High   : VAEntrypointEncSliceLP
  VAProfileH264High   : VAEntrypointFEI
  VAProfileH264High   : VAEntrypointStats
  VAProfileH264MultiviewHigh  : VAEntrypointVLD
  VAProfileH264MultiviewHigh  : VAEntrypointEncSlice
  VAProfileH264StereoHigh : VAEntrypointVLD
  VAProfileH264StereoHigh : VAEntrypointEncSlice
  VAProfileVC1Simple  : VAEntrypointVLD
  VAProfileVC1Main: VAEntrypointVLD
  VAProfileVC1Advanced: VAEntrypointVLD
  VAProfileNone   : VAEntrypointVideoProc
  VAProfileJPEGBaseline   : VAEntrypointVLD
  VAProfileJPEGBaseline   : VAEntrypointEncPicture
  VAProfileVP8Version0_3  : VAEntrypointVLD
  VAProfileVP8Version0_3  : VAEntrypointEncSlice
  VAProfileHEVCMain   : VAEntrypointVLD
  VAProfileHEVCMain   : VAEntrypointEncSlice


Re: [gentoo-user] skylake and x265 movie display

2019-06-26 Thread Adam Carter
>
> Missed this, you can use `vainfo` and it should tell you the profiles it
> supports.
>

 $ vainfo
libva info: VA-API version 1.4.0
X Error of failed request:  BadRequest (invalid request code or no such
operation)
  Major opcode of failed request:  154 (DRI2)
  Minor opcode of failed request:  1 (DRI2Connect)
  Serial number of failed request:  11
  Current serial number in output stream:  11


Re: [gentoo-user] skylake and x265 movie display

2019-06-26 Thread Daniel Frey

On 6/25/19 4:57 PM, Adam Carter wrote:
My skylake (i3-6100U) system drops frames when watching x265 movies (in 
mpv and kodi), with all cores at 100% CPU. I've re-run through 
https://wiki.gentoo.org/wiki/Intel and tried changing from the intel 
driver to modsetting, and it appears to use less CPU for x264 at least. 
Still maxed out for x265 so I cant tell if there's a difference for that.


I'm going through the USE flags for kodi, mpv and ffmpeg, which flags 
are the most important? Is there some way to run a simple movie playback 
benchmark to assess the impact of changes?




Missed this, you can use `vainfo` and it should tell you the profiles it 
supports.


Dan




Re: [gentoo-user] skylake and x265 movie display

2019-06-26 Thread Daniel Frey

On 6/25/19 11:53 PM, Adam Carter wrote:

This wouldn't happen to be a 10-bit encoded x265, would it? If it is,

10-bit hardware decoding is only supported in Kaby Lake or newer
(this
could explain it decoding in software/on CPU instead of GPU.)


  That's possible. Is there an easy way to tell?


Looked through the output of ffmpeg and found;

Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, 
bt2020nc/bt2020/smpte2084), 3840x1600 [SAR 1:1 DAR 12:5], 23.98 fps, 
23.98 tbr, 1k tbn, 23.98 tbc (default)


So it is a 10bit file.


Another tip: I found upgrading the NUC's firmware helped a lot. However, 
be warned that Intel has been removing support for Legacy booting in 
newer firmware. So you might want to get yours to boot in UEFI first, 
then try new firmware.


I suspect it's a hardware limitation, but you never know.

Dan



Re: [gentoo-user] skylake and x265 movie display

2019-06-26 Thread Daniel Frey

On 6/25/19 11:42 PM, Adam Carter wrote:


What about USE flags for mesa and libva?


  x11-libs/libva-2.4.0:0/2::gentoo  USE="X drm opengl -utils -vdpau 
-wayland"


media-libs/mesa-19.1.1::gentoo  USE="classic dri3 egl gallium gbm gles2 
llvm vaapi -d3d9 -debug -gles1 (-libglvnd) -lm_sensors -opencl -osmesa 
-pax_kernel -pic (-selinux) -test -unwind -valgrind -vdpau -vulkan 
-vulkan-overlay -wayland -xa -xvmc"



This wouldn't happen to be a 10-bit encoded x265, would it? If it is,
10-bit hardware decoding is only supported in Kaby Lake or newer (this
could explain it decoding in software/on CPU instead of GPU.)


  That's possible. Is there an easy way to tell?


I also had to boot with UEFI or no hardware decoding happened at all.
Mine was old enough to give you a choice but video performance suffered
in BIOS boot mode.

Damn - this is in BIOS mode... Very odd that makes a difference. Nice find.

When I got my celeron-based NUC I discovered that just because the CPU
has some hardware offloading doesn't mean software will use it. :(


This box is a NUC (NUC6i5SYB) that im using for a media PC.


Mine's an older Celeron. It struggled with 1080p video. I found back 
then (maybe six years ago?) a thread stating Intel locks out some 
hardware in BIOS mode so performance will suffer. All I did at the time 
was grind my teeth and fight it to get it to boot in UEFI mode, and I 
could see the hardware offload on 1080p was working correctly.


I see from your other reply it is a 10-bit file, that would explain why 
hardware offloading doesn't work - it's not supported on that CPU. Have 
you tried an 8-bit encoded file to see if the hardware offloading works?


Dan



Re: [gentoo-user] skylake and x265 movie display

2019-06-26 Thread Adam Carter
>
> This wouldn't happen to be a 10-bit encoded x265, would it? If it is,
>
>> 10-bit hardware decoding is only supported in Kaby Lake or newer (this
>> could explain it decoding in software/on CPU instead of GPU.)
>>
>
>  That's possible. Is there an easy way to tell?
>

Looked through the output of ffmpeg and found;

Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv,
bt2020nc/bt2020/smpte2084), 3840x1600 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98
tbr, 1k tbn, 23.98 tbc (default)

So it is a 10bit file.


Re: [gentoo-user] skylake and x265 movie display

2019-06-26 Thread Adam Carter
> What about USE flags for mesa and libva?
>

 x11-libs/libva-2.4.0:0/2::gentoo  USE="X drm opengl -utils -vdpau -wayland"

media-libs/mesa-19.1.1::gentoo  USE="classic dri3 egl gallium gbm gles2
llvm vaapi -d3d9 -debug -gles1 (-libglvnd) -lm_sensors -opencl -osmesa
-pax_kernel -pic (-selinux) -test -unwind -valgrind -vdpau -vulkan
-vulkan-overlay -wayland -xa -xvmc"


> This wouldn't happen to be a 10-bit encoded x265, would it? If it is,
> 10-bit hardware decoding is only supported in Kaby Lake or newer (this
> could explain it decoding in software/on CPU instead of GPU.)
>

 That's possible. Is there an easy way to tell?

>
> I also had to boot with UEFI or no hardware decoding happened at all.
> Mine was old enough to give you a choice but video performance suffered
> in BIOS boot mode.
>
> Damn - this is in BIOS mode... Very odd that makes a difference. Nice find.


> When I got my celeron-based NUC I discovered that just because the CPU
> has some hardware offloading doesn't mean software will use it. :(
>

This box is a NUC (NUC6i5SYB) that im using for a media PC.


Re: [gentoo-user] skylake and x265 movie display

2019-06-25 Thread Daniel Frey

On 6/25/19 4:57 PM, Adam Carter wrote:
My skylake (i3-6100U) system drops frames when watching x265 movies (in 
mpv and kodi), with all cores at 100% CPU. I've re-run through 
https://wiki.gentoo.org/wiki/Intel and tried changing from the intel 
driver to modsetting, and it appears to use less CPU for x264 at least. 
Still maxed out for x265 so I cant tell if there's a difference for that.


I'm going through the USE flags for kodi, mpv and ffmpeg, which flags 
are the most important? Is there some way to run a simple movie playback 
benchmark to assess the impact of changes?


Current settings;


What about USE flags for mesa and libva?

This wouldn't happen to be a 10-bit encoded x265, would it? If it is, 
10-bit hardware decoding is only supported in Kaby Lake or newer (this 
could explain it decoding in software/on CPU instead of GPU.)


I also had to boot with UEFI or no hardware decoding happened at all. 
Mine was old enough to give you a choice but video performance suffered 
in BIOS boot mode.


When I got my celeron-based NUC I discovered that just because the CPU 
has some hardware offloading doesn't mean software will use it. :(


Dan



[gentoo-user] skylake and x265 movie display

2019-06-25 Thread Adam Carter
My skylake (i3-6100U) system drops frames when watching x265 movies (in mpv
and kodi), with all cores at 100% CPU. I've re-run through
https://wiki.gentoo.org/wiki/Intel and tried changing from the intel driver
to modsetting, and it appears to use less CPU for x264 at least. Still
maxed out for x265 so I cant tell if there's a difference for that.

I'm going through the USE flags for kodi, mpv and ffmpeg, which flags are
the most important? Is there some way to run a simple movie playback
benchmark to assess the impact of changes?

Current settings;
CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2
ssse3 -3dnow -3dnowext -fma4 -xop"

ffmpeg USE: X alsa bzip2 encode gpl hardcoded-tables iconv libdrm mp3
network opengl openssl opus postproc pulseaudio sdl svg threads truetype
vaapi vorbis x264 xcb xvid zlib (-altivec) -amr -amrenc (-appkit) -bluray
-bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -debug -doc -fdk
-flite -fontconfig -frei0r -fribidi -gcrypt -gme -gmp -gnutls -gsm
-iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaom -libass -libcaca
-libilbc -libressl -librtmp -libsoxr -libv4l -libxml2 -lv2 -lzma
(-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -openal -opencl
-openh264 -oss -pic -rubberband -samba -snappy -speex -srt -ssh
-static-libs -test -theora -twolame -v4l -vdpau -vpx -wavpack -webp -x265
-zeromq -zimg -zvbi

mpv USE: X alsa cdda cli dvd egl iconv jpeg lcms libass lua luajit opengl
pulseaudio uchardet vaapi xv zlib (-aqua) -archive -bluray (-coreaudio)
-cplugins -cuda -doc -drm -dvb -gbm -jack -javascript -libcaca -libmpv
-openal -oss (-raspberry-pi) -rubberband -samba -sdl (-selinux) -test
-tools -v4l -vdpau -vulkan -wayland -zsh-completion

kodi USE: X alsa bluetooth css dbus dvd gles lcms opengl pulseaudio
(system-ffmpeg) systemd udev udisks upower vaapi xslt -airplay -bluray
-caps -cec -gbm -libressl -libusb -lirc -mariadb -mysql -nfs -samba -test
-upnp -vdpau -wayland -webserver -zeroconf