• 1
  • 159
  • 160
  • 161(current)
  • 162
  • 163
  • 553
Linux ChromeBox Kodi E-Z Setup Script (LibreELEC/Linux+Kodi) [2017/02/21]
To expand on my previous post... I've noticed something very strange in terms of greyscale reproduction (using the latest STABLE of OpenElec):

#1: OS RGB Full + Kodi Limited + TV Limited + No VAAPI = perfect greyscale reproduction, no banding
#2; OS RGB Full + Kodi Limited + TV Limited + VAAPI = significant black crush, banding

#3: OS RGB Full + Kodi Full + TV Full + No VAPPI = perfect greyscale reproduction, banding
#4: OS RGB Full + Kodi Full + TV Full + VAPPI = perfect greyscale reproduction, banding

#5: OS RGB Limited + TV Limited + No VAPPI = perfect greyscale reproduction, banding
#6: OS RGB Limited + TV Limited + VAPPI = perfect greyscale reproduction, banding

Based on this, the absolute best quality reproduction with my equipment is #1, AKA "RGB full made turned into limited with no VAAPI".

What concerns me, however, is I'm seeing significant black crush in the same environment merely by turning on VAAPI. Essentially, it is IGNORING Kodi's software limited mode setting and changing video levels to reproduce correctly in a "Full RGB" environment. Which is no doubt why if I force the TV into "Full" mode, then the VAAPI greyscale reproduces correctly.

#7: OS RGB Full + Kodi Limited + TV Full + No VAAPI = improper greyscale reproduction (see below 16, above 235), no banding
#8; OS RGB Full + Kodi Limited + TV Full + VAAPI = perfect greyscale reproduction (but GUI colors way elevated), banding

Any idea what's up here? Is it even possible to get VAAPI to not have banding?
Reply
Nothing and: this won't change.

Whenever VAAPI Render Method (helix) enabled or Use SW Filter (gotham) disabled. VAAPI will scale the image to full range RGB, this happens with vaPutSurface - we can absolutely do nothing about it, as the API does not give us the chance to receive the NV12 surfaces. With those two settings the "Use Limited Range" has absolutely no effect and VAAPI itself will produce full range RGB we (xbmc) cannot touch. This can only be scaled "back to limited" when using the Output in limited mode (gpu setting, e.g. xrandr).

The only chance to get a Limited Range out of xbmc is:
Helix: Disable "Use VAAPI Render Method" and _don't_ use MCDI or MADI or VAAPI BOB, as they will reenable this Render Method and set "Use Limited Range"
Gotham: "Use SW Filter" enabled and set "Use Limited Range" in xbmc while setting the GPU to full range (xrandr)

Use SW Filter is only an option in OpenELEC 4.x, it was never in mainline.

We hope to get an EGL version of VAAPI going after helix, that won't have this f*cking vaPutSurface needed, cause this also puts high load onto slow GPUs (e.g. Baytrails).
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Thanks for the information.

As you indicate, I was able to get proper Limited greyscale out of VAAPI in situation #6, however I could still see banding. Is this kind of banding inherent to VAAPI and/or whenever dynamic range conversion is required? I only ever saw perfectly smooth greyscales in situations #1 and (although otherwise improper for video reproduction) #7.
Reply
In fact there are those possiblities, that work "somehow":

Limited:
#6: OS RGB Limited + TV Limited + VAPPI (Kodi color setting has no influence)
#10: OS RGB FULL + Kodi Limited + TV Limited + VAAPI with (Prefer Render Method disabled / or Use SW Filter)

Full:
#4: OS RGB Full + TV Full + VAPPI ((Kodi color setting has no influence)
#$ OS RGB Full + Kodi Full + TV Full + VAAPI with Use SWfilter

Edit: Formulated it more clearly. And btw. think of what happens, if you scale a 16.235 image to a 0..255 range. Do a calculation for a: 16,17,18,...,235 gradient!
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2014-12-15, 11:37)fritsch Wrote: In fact there are those possiblities, that work "somehow":

Limited:
#6: OS RGB Limited + TV Limited + VAPPI (Kodi color setting has no influence)
#1: OS RGB FULL + Kodi Limited + TV Limited + VAAPI with (Prefer Render Method disabled / or Use SW Filter)

Full:
#4: OS RGB Full + TV Full + VAPPI ((Kodi color setting has no influence)
#3: OS RGB Full + Kodi Full + TV Full + VAAPI with Use SWfilter

Edit: Formulated it more clearly. And btw. think of what happens, if you scale a 16.235 image to a 0..255 range. Do a calculation for a: 16,17,18,...,235 gradient!

So is the banding because VAAPI is *always* expanding the 16-235 video range to 0-255?

Following the 4 scenarios you picked out:

#6 - 16-235 video range is expanded to 0-255 by VAAPI, then recompressed to 16-235 by xrandr, and then expanded to 0-255 by the TV (ouch).
#1 - 16-235 video range is maintained by Kodi, and then expanded to 0-255 by the TV.
#4 - 16-235 video range is expanded to 0-255 by VAAPI, then maintained by the TV.
#3 - 16-235 video range is expanded to 0-255 by Kodi, then maintained by the TV.

So all of those except for #1 involve some kind of Kodi-side range conversion. It looks like the only way to avoid that, is if you can feed VAAPI original 0-255 RGB data that it doesn't touch.

I'm guessing that for the best video quality, the current implementation of VAAPI is flawed... and that even with the Intel VAAPI hanging bug now fixed, there might be a valid reason to keep on using the "Use SW Filter" setting.
Reply
It really is a pity that there is no way of running XBMC with YCrCb Limited preserved from source file to display with no conversion to RGB and no conversion to Full range, and only an upscale to 4:2:2 or 4:4:4 from the 4:2:0 source media. However the complication of the difference BT601 (SD) and BT709 (HD) colourspace would be interesting... If you could somehow engineer a GUI/OSD overlay - allowing these elements to be rendered RGB by XBMC and then converted to YCrCb 4:2:2 or 4:4:4 when feeding YCrCb displays that would be an interesting approach (I think that is how many hardware devices like satellite receivers etc. run - or used to)

But I realise, architecturally, this isn't really an issue.

I guess the approach is either :
Let the OS handle levelspace (which means YCrCb->RGB conversion and Limited->Full and then optionally RGB->YCrCb and optionally Full->Limited)
Fool the OS and cheat it by pretending that Limited levelspace is Full levelspace (which allows you to preserve <16 and >235 levels in Limited content AND avoid the banding caused by the lack of transparent reversibility between YCrCb Limited and RGB Full at 8bits)
Reply
(2014-12-15, 12:40)Sunflux Wrote:
(2014-12-15, 11:37)fritsch Wrote: In fact there are those possiblities, that work "somehow":

Limited:
#6: OS RGB Limited + TV Limited + VAPPI (Kodi color setting has no influence)
#1: OS RGB FULL + Kodi Limited + TV Limited + VAAPI with (Prefer Render Method disabled / or Use SW Filter)

Full:
#4: OS RGB Full + TV Full + VAPPI ((Kodi color setting has no influence)
#3: OS RGB Full + Kodi Full + TV Full + VAAPI with Use SWfilter

Edit: Formulated it more clearly. And btw. think of what happens, if you scale a 16.235 image to a 0..255 range. Do a calculation for a: 16,17,18,...,235 gradient!

So is the banding because VAAPI is *always* expanding the 16-235 video range to 0-255?

Following the 4 scenarios you picked out:

#6 - 16-235 video range is expanded to 0-255 by VAAPI, then recompressed to 16-235 by xrandr, and then expanded to 0-255 by the TV (ouch).
#1 - 16-235 video range is maintained by Kodi, and then expanded to 0-255 by the TV.
#4 - 16-235 video range is expanded to 0-255 by VAAPI, then maintained by the TV.
#3 - 16-235 video range is expanded to 0-255 by Kodi, then maintained by the TV.

So all of those except for #1 involve some kind of Kodi-side range conversion. It looks like the only way to avoid that, is if you can feed VAAPI original 0-255 RGB data that it doesn't touch.

I'm guessing that for the best video quality, the current implementation of VAAPI is flawed... and that even with the Intel VAAPI hanging bug now fixed, there might be a valid reason to keep on using the "Use SW Filter" setting.

Please read my posts in detail and don't introduce new problems, that are not existent.

Use SWFilter is the inverse of Prefer VAAPI Render Method.

As long as you have Prefer VAAPi Render Method _disabled_ and don't use MCDI, MADI or VAAPI-BOB (which is only relevant when you want to do deinterlacing anyways). This does exactly what "Use SWFilter" does.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
I'm not confused by how the "Prefer VAAPI Render Method" and "Use Sw Filter" settings work... but I'm still on Gotham, so I just pick the one that's staring me in the face. :-)

But, I do know that using VAAPI Rendering offers a noticeable improvement on CPU usage, which is why I had been eagerly waiting for someone to fix the hanging bug... but now, I'm learning there doesn't seem to be any way to use VAAPI Rendering AND avoid banding. Also, that the only way to use it with Limited RGB range involves double range conversion. Is the double conversion transparent (such that the second conversion doesn't make banding worse)?
Reply
Hi all,
Is there a way to change the location for the temporary streaming file?

I'm using a dualboot setup with my Asus Chromebox, I guess I have about 7GB in /storage
Because of space limitations, I'm not able to stream movies bigger than 7GB (using Genesis or xbmctorrent for example).

If there is no way to change this, can I increase the OPENELEC partition without having to format it?

Thanks for your help
Reply
(2014-12-15, 13:14)Sunflux Wrote: I'm not confused by how the "Prefer VAAPI Render Method" and "Use Sw Filter" settings work... but I'm still on Gotham, so I just pick the one that's staring me in the face. :-)

But, I do know that using VAAPI Rendering offers a noticeable improvement on CPU usage, which is why I had been eagerly waiting for someone to fix the hanging bug... but now, I'm learning there doesn't seem to be any way to use VAAPI Rendering AND avoid banding. Also, that the only way to use it with Limited RGB range involves double range conversion. Is the double conversion transparent (such that the second conversion doesn't make banding worse)?

It's quite hard to answer. In fact, when we use the vaPutSurface path a Full RGB conversion is done, we can "hint" 701 or 601 color format, which we do. Kodi does not touch this data anymore, as we use the VAAPi Upload to display those.
The OS driver then does the conversion back to "limited range".

We know, that this sucks like hell - and as we both, Fernetmenta and me are running VAAPI at home (Fernet in full RGB) and me (with a clamping AVR) with OS set to limited, really want to solve that by moving towards EGL, but this is not that easy, cause we don't have a Reference Clock for now, though the newly developed DRM Reference Clock could work.

Yeah, there is nothing we can "talk correct" or something - it's just fucked up as is. And the EGL codepath for vaapi is not even yet in the stable vaapi drivers, bleeding edge - nobody cared (on vendor side) for a much too long time.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2014-12-15, 08:45)Matt Devo Wrote:
(2014-12-15, 07:39)christoofar Wrote: Thanks Matt. Well, bummer. Sad

honestly, with Netflix working now under Ubuntu (and others), and the ability to access it via the NetfliXBMC add-on, the (media center related) reasons for dual booting ChromeOS are pretty minimal IMO
Since I'm not very well versed in Linux (played with some distros a few years back on an old PC laying around, but not much else), I'm a bit leery of going that route.OE pretty much just works "out of the box", with ubuntu, seems there is some general knowledge & tweaking required (audio & other stuff?)
Nvidia ShieldTV (2017)+Nexus
Reply
(2014-12-15, 10:15)dmalovic Wrote: I want to gave an option to play with several OS'es, have a dedicated swap partition, maybe even try windows, so I don't want to worry about 3+1 MBR limitation. Worked on this until 4AM this morning, and after waking up remembered I can manually create GPT partition scheme and manually create partitions. Looking forward to your new script, as IIRC, you said you were working on dual OS install with the standalone firmware.

Thanks for all your work and help!

you must have misread, as I don't have any plans to add a non-ChromeOS dual boot setup to my script. Dual (or more) booting with the standalone firmware is no different than a "regular" PC, and there's no need for me to reinvent the wheel there.

(2014-12-15, 14:44)jtadeia Wrote: Hi all,
Is there a way to change the location for the temporary streaming file?

I'm using a dualboot setup with my Asus Chromebox, I guess I have about 7GB in /storage
Because of space limitations, I'm not able to stream movies bigger than 7GB (using Genesis or xbmctorrent for example).

If there is no way to change this, can I increase the OPENELEC partition without having to format it?

Thanks for your help

you shouldn't have any issues streaming files larger than your OE storage partition, if you are, then your streaming add-on is "doing it wrong," but you're not going to get any support for those types of add-ons here.
Reply
(2014-12-15, 16:49)christoofar Wrote:
(2014-12-15, 08:45)Matt Devo Wrote:
(2014-12-15, 07:39)christoofar Wrote: Thanks Matt. Well, bummer. Sad

honestly, with Netflix working now under Ubuntu (and others), and the ability to access it via the NetfliXBMC add-on, the (media center related) reasons for dual booting ChromeOS are pretty minimal IMO
Since I'm not very well versed in Linux (played with some distros a few years back on an old PC laying around, but not much else), I'm a bit leery of going that route.OE pretty much just works "out of the box", with ubuntu, seems there is some general knowledge & tweaking required (audio & other stuff?)

Granted I'm one data point, but Ubuntu is actually pretty solid these days. Last time I did Ubuntu + xbmc was 4 years ago, was much more annoying then. But now HDMI outputs, video and sound, have worked perfectly for me with zero setup on two machines, with and without XBMC. The sole Ubuntu related issue I had was this CPU idling issue, which was trivial to fix with Matt's help (also probably my fault for downloading the LTS Ubuntu instead of the most up to date one). Performance wise it's also quite good, keep in mind that you can (and should) log directly into XBMC. This means that in general Unity is not running at all. Although, even logged into Unity I was only using about 500 MB of memory I believe, and it was quite smooth. So if you ever have a a one-off need that can't easily be addressed in XBMC, you have the advantage that you can just log into Unity and do just about anything.

For me, the biggest plus with Ubuntu is that (from my limited knowledge) it's superior if you also want to setup your htpc as a server. If you want to be able to control torrent downloading, or access your files over ssh, non-locally, Ubuntu has the edge. If you have separate htpc and server machines then this is irrelevant.
Reply
I'm sure there is a knowledge or language barrier here somewhere, but I'm more confused than ever about VAAPI and how to deal with it to achieve best picture results.

Here is my situation:

1) I do not need deinterlacing as far as I'm aware (no "i" content)
2) I had perfect greyscale ramp before this improvement with VAAPI
3) I had to significantly change my settings to get almost (but not) perfect ramp after installing the test compile with VAAPI fix

So, since no interlaced content to deal with, should I just disable VAAPI altogether? Is there a significant performance hit, one that may hinder high quality content such as 30Mbps+ 1080p from disabling VAAPI?

Lastly, how do I ensure I do not use MCDI, MADI or VAAPI-BOB ? Is this inherent in disabling VAAPI?

Frankly, I was having almost no freeze ups before, so I'm thinking just roll back and go with my previous setup. However, once VAAPI fix goes mainline and options change, I want to know what to do.
Reply
(2014-12-15, 19:43)quicknir Wrote:
(2014-12-15, 16:49)christoofar Wrote:
(2014-12-15, 08:45)Matt Devo Wrote: honestly, with Netflix working now under Ubuntu (and others), and the ability to access it via the NetfliXBMC add-on, the (media center related) reasons for dual booting ChromeOS are pretty minimal IMO
Since I'm not very well versed in Linux (played with some distros a few years back on an old PC laying around, but not much else), I'm a bit leery of going that route.OE pretty much just works "out of the box", with ubuntu, seems there is some general knowledge & tweaking required (audio & other stuff?)

Granted I'm one data point, but Ubuntu is actually pretty solid these days. Last time I did Ubuntu + xbmc was 4 years ago, was much more annoying then. But now HDMI outputs, video and sound, have worked perfectly for me with zero setup on two machines, with and without XBMC. The sole Ubuntu related issue I had was this CPU idling issue, which was trivial to fix with Matt's help (also probably my fault for downloading the LTS Ubuntu instead of the most up to date one). Performance wise it's also quite good, keep in mind that you can (and should) log directly into XBMC. This means that in general Unity is not running at all. Although, even logged into Unity I was only using about 500 MB of memory I believe, and it was quite smooth. So if you ever have a a one-off need that can't easily be addressed in XBMC, you have the advantage that you can just log into Unity and do just about anything.

For me, the biggest plus with Ubuntu is that (from my limited knowledge) it's superior if you also want to setup your htpc as a server. If you want to be able to control torrent downloading, or access your files over ssh, non-locally, Ubuntu has the edge. If you have separate htpc and server machines then this is irrelevant.
I'll be exploring this option at some point. For now, I'm able to use a workaround (my trusty Logitech N5901) which is recognized at bootup, thankfully.
Nvidia ShieldTV (2017)+Nexus
Reply
  • 1
  • 159
  • 160
  • 161(current)
  • 162
  • 163
  • 553

Logout Mark Read Team Forum Stats Members Help
ChromeBox Kodi E-Z Setup Script (LibreELEC/Linux+Kodi) [2017/02/21]37