Kodi Community Forum

Full Version: Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(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?
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
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
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.
(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
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...
No idea without debuglogs ...
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
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!!
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 :-(
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?
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
@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?
You can use mesa git. All patches have been integrated and will be in mesa 10.7
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