Kodi Community Forum
Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server (/showthread.php?tid=231955)



RE: New Era: VAAPI with EGL interoperation - noggin - 2015-07-31

(2015-07-30, 18:53)lmyllari Wrote: Sounds like I should revisit my kernel patch for limited range video. I think a better implementation would be to add a new driver property to select HDMI output range tagging (auto or limited), make Kodi switch to full range output on start up and set the new control based on the Kodi limited range setting.

I don't know how it would be received by upstream. fritsch, would you consider such patches for your OE builds?

Yes - though that would introduce two "Limited Range" settings potentially?

1. To configure the GPU to output Limited Range (which is currently the default for 720p and 1080i/p outputs - hence the requirement for the xrandr autostart mod to force the GPU into Full range output)
2. To configure Kodi to output "Limited Range for Full Range output", which is what we do to get 16-235 Limited Range video output from Kodi when the GPU is in "Full mode" but which minimises banding and enables <16 and >235 levels to be preserved, as they haven't been scaled to 0-255 at any point.

If the GPU defaulted to Full Range, then we'd also need Kodi to default to "Limited Range for Full Range output", otherwise the default install would deliver crushed blacks and clipped whites on displays which are configured for "Limited" which is the standard HDMI default range?


RE: New Era: VAAPI with EGL interoperation - Roby77 - 2015-07-31

Could it possible to make it auto based on gpu chipset ?

Example : if an intel chipset is detected oe auto add code in autostart

Or during oe setup ask to enable or disable full range

Popcorn hour for example has only a menĂ¹ where select 10-255/16-235


RE: New Era: VAAPI with EGL interoperation - trsqr - 2015-07-31

In general, I've been thinking about having some kind of predefined settings based on GPU auto-detection.

Example: detected 1 Intel Haswell-based GPU - now disable VDPAU, enable VAAPI, set deinterlacing to MCDI for 576i and 1080i material and use lanczos3 upscaling. Of course it will be impossible to cover all possible systems, but at least 70% should be pretty easily covered.

EDIT: Sorry for off-topic, let's not continue this discussion in this thread. Opened a new thread for this: http://forum.kodi.tv/showthread.php?tid=233846


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-07-31

it's rather simple,

a quick bash for running over the heads and setting the machines to full range when intel is detected. You can use the sysfs interface for that.


RE: New Era: VAAPI with EGL interoperation - Roby77 - 2015-07-31

(2015-07-31, 14:40)trsqr Wrote: In general, I've been thinking about having some kind of predefined settings based on GPU auto-detection.

Example: detected 1 Intel Haswell-based GPU - now disable VDPAU, enable VAAPI, set deinterlacing to MCDI for 576i and 1080i material and use lanczos3 upscaling. Of course it will be impossible to cover all possible systems, but at least 70% should be pretty easily covered.

EDIT: Sorry for off-topic, let's not continue this discussion in this thread.

Yes this would be fantastic

Sorry for ot Angel


RE: New Era: VAAPI with EGL interoperation - john.cord - 2015-08-01

I tested the Dev Build posted by fritsch on my Bedroom Intel 2820 NUC and 50fps Playback produces a lot of missed Frames. On my Livingroom Chromebox Celeron everything is fine...


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-01

No idea without debuglogs ...


RE: New Era: VAAPI with EGL interoperation - gdachs - 2015-08-02

I believe that the power button of the nuc should go to suspend2ram instead of powering it off.

I added
Code:
HandlePowerKey=suspend
to the file /etc/systemd/logind.conf to achieve this.

Gerald


RE: New Era: VAAPI with EGL interoperation - ep0ch - 2015-08-02

Hi fritsch,

I'm getting frameskips/drops every few mins (5-10 mins?). Anything you can help with?

logs: http://sprunge.us/bHid

I'm using the kodi build you posted on 25/07/2015

Thanks!!


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-02

Quote:09:15:34 T:140671026439936 ERROR: Decode - avcodec_decode_video returned failure
09:15:34 T:140671026439936 ERROR: Previous line repeats 1 times.
09:15:34 T:140671026439936 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
09:15:34 T:140671026439936 ERROR: Decode - avcodec_decode_video returned failure
09:15:34 T:140671026439936 ERROR: Previous line repeats 1 times.
09:15:34 T:140671026439936 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
09:15:34 T:140671026439936 ERROR: Decode - avcodec_decode_video returned failure
09:15:35 T:140671813920512 ERROR: Previous line repeats 6 times.

Can you produce with: http://solidrun.maltegrosse.de/~fritsch/1080i50_h264.ts or too short?

The above is plain bad data from the backend :-(


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-02

Quote:09:17:24 T:140670984476416 ERROR: failed to import VA buffer NV12 into EGL image: 12291
09:18:48 T:140671026439936 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
09:30:22 T:140670984476416 WARNING: Previous line repeats 20 times.
09:30:22 T:140670984476416 ERROR: failed to import VA buffer NV12 into EGL image: 12291
09:34:38 T:140671026439936 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
09:53:29 T:140670984476416 WARNING: Previous line repeats 24 times.
09:53:29 T:140670984476416 ERROR: failed to import VA buffer NV12 into EGL image: 12291
09:56:08 T:140671026439936 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
10:00:41 T:140670984476416 WARNING: Previous line repeats 5 times.
10:00:41 T:140670984476416 ERROR: failed to import VA buffer NV12 into EGL image: 12291
10:01:29 T:140671026439936 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
10:01:59 T:140670984476416 ERROR: failed to import VA buffer NV12 into EGL image: 12291
10:04:28 T:140671026439936 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
10:10:50 T:140673566910336 WARNING: Previous line repeats 1 times.

This is also good. It looks like the decode failure is propagated. It seems it is not handled, that when decoding a frame failes, that it won't spit a decoded surface ... but I am not expert enough here.

@FernetMenta: Any idea?


RE: New Era: VAAPI with EGL interoperation - ep0ch - 2015-08-02

Okay, may be ignore my post. I seem to have solved it, but not quite sure which change i made resolved it.
Could be rebooting the NAS, changing some de-interlace settings or setting "pause during refresh rate change" to "off".

Although I did just get some issues when i was navigating the kodi main menu and settings while watching a movie.

log: http://pastebin.com/9u98BjFV


RE: New Era: VAAPI with EGL interoperation - Ales - 2015-08-04

@FernetMenta & fritsch:

thank you for your help. So https://github.com/FernetMenta/xbmc/tree/EGL no longer exist and the code is included in master branch, right? From where could I build required mesa for this branch?


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-04

You can use mesa git. All patches have been integrated and will be in mesa 10.7


RE: New Era: VAAPI with EGL interoperation - Roby77 - 2015-08-04

So (to be sure) your and fernermenta tweaks will be in kodi 16 / next oe major upgrade ?

How could someone donate to you a couple of beers ?

Thanks for all