Kodi Community Forum

Full Version: HQ Upscalers, Mediacodec HW accelerators and Nvidia Shield
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I own a Nvidia Shield TV 2017 device, on it I've got Kodi Leia installed (latest update from Playstore). I'm using the Shield and Kodi, with a Samsung PS50C7000 TV, it's only a 1080p TV.

Mine problem, is that I have some 720p old content, and if I enable any kind MediaCodec HW Acceleration (normal, surface or both), I'm not able to use HQ Upscalers like Lanczos3, I only see bilinear or nearest neighbour.

I tried to enable it via advancedsettings.xml without luck.

If I disable both HW Acceleration via MediaCodecs, I can select lanczos3.

What could be the problem?

Thanks!
Yes as you have found - you can only enable the higher quality Software upscalers like Lanczsos3-optimised when CPU software decoding.

And to do that Mediacodec Hardware decoding has to be turned OFF. But that is a hassle when all other content does not Hardware decode.

Fear not hope is in sight, because after a LOT of hassling Android Kodi devs are finally considering implementing mpeg2, mpeg4 and h264 user configurable SW/HW decoding for Android. Which is what SPMC 16.x had included years ago. AMLogic LibreELEC users had this as well.

Have a read of this thread and install the .apk

341163 (thread)

Then play around setting the "HD and Up" options. 1080p content will still hardware decode that way. (Leave Mediacodec acceleration Enabled)

Make sure you also leave - Enable HD scalers for scaling above as default > 20%
The higher that figure is will dictate if the higher quality scaling options show up in On Screen > Video settings or not - when CPU software decoding.

When this high quality scaling works it works well to sharpen picture outputs for old SD only video content.
And with the SW/HW video acceleration user settings options added - it's "Set and Forget" - the way is should be Smile
(2019-02-22, 06:58)wrxtasy Wrote: [ -> ]Yes as you have found - you can only enable the higher quality Software upscalers like Lanczsos3-optimised when CPU software decoding.

And to do that Mediacodec Hardware decoding has to be turned OFF. But that is a hassle when all other content does not Hardware decode.

Fear not hope is in sight, because after a LOT of hassling Android Kodi devs are finally considering implementing mpeg2, mpeg4 and h264 user configurable SW/HW decoding for Android. Which is what SPMC 16.x had included years ago. AMLogic LibreELEC users had this as well.

Have a read of this thread and install the .apk

341163 (thread)

Then play around setting the "HD and Up" options. 1080p content will still hardware decode that way. (Leave Mediacodec acceleration Enabled)

Make sure you also leave - Enable HD scalers for scaling above as default > 20%
The higher that figure is will dictate if the higher quality scaling options show up in On Screen > Video settings or not - when CPU software decoding.

When this high quality scaling works it works well to sharpen picture outputs for old SD only video content.
And with the SW/HW video acceleration user settings options added - it's "Set and Forget" - the way is should be Smile
 Thanks for your help!, I'll take a look this weeked and post the results.

Best regards!
I've tested this .APK, looks promising, the options appears, but It isn't possible to enable lanczos3 or spline36, unless i disable hardware acceleration completely on each codec.

If I disable all hw acceleration, appears the ha scaling options, but appears that there is a bug, all the images are broken. (This doesn't happens with latest official release).

Anyway, thanks again for tour help.
(2019-02-22, 06:58)wrxtasy Wrote: [ -> ]Fear not hope is in sight, because after a LOT of hassling Android Kodi devs are finally considering implementing mpeg2, mpeg4 and h264 user configurable SW/HW decoding for Android.

Absolutely not.
(2019-02-23, 07:50)Martijn Wrote: [ -> ]
(2019-02-22, 06:58)wrxtasy Wrote: [ -> ]Fear not hope is in sight, because after a LOT of hassling Android Kodi devs are finally considering implementing mpeg2, mpeg4 and h264 user configurable SW/HW decoding for Android.

Absolutely not.

Could it be done, at least, with advancedsettings.xml? Could be a good idea for let advanced users and don't make the interface top much confusing for others.
(2019-02-23, 07:50)Martijn Wrote: [ -> ]
(2019-02-22, 06:58)wrxtasy Wrote: [ -> ]Fear not hope is in sight, because after a LOT of hassling Android Kodi devs are finally considering implementing mpeg2, mpeg4 and h264 user configurable SW/HW decoding for Android.

Absolutely not. 
Why not?
Tongue firmly planted in Cheek.....

Because Android users (inc new quite powerful FireTV Stick 4K), with decent ARM Chipsets would then get extra functionality like:

- better mpeg2 decoding with the ability to then also use top quality YADIF2x deinterlacing for problematic Interlaced DVD - and 480/576i broadcast Live TV
- quicker TV channel zapping due to software decoding.
- access to high quality picture upscalers for old mpeg2, mpeg4 and h264 SD content because you can setup Kodi for software decoding and software upscaling.



I'm sure Android users can wait a few more years, wishing and hoping in vain that Android (TV) vendors implement such legacy hardware decode support in their OS for such content.
In coming years Android TV OS device popularity will increase as Chipset vendors like AMLogic going all in with Android TV.
Such (increasingly powerful) devices will only support common video streaming standards - anything else be dammed, it's not a priority.

So the answer is NO if you want such features because seemingly changing minimal amounts of code in Kodi is NOT allowed for Android users only.



I would be interested to see what the other EASY TO USE solution for Android users actually is, without resorting to convoluted, ridiculous, hard to use options.

Any such SW/HW decode options can be hidden behind Kodi "Expert" settings anyway with all such options set to HW decode all the time by default.
(2019-02-23, 07:50)Martijn Wrote: [ -> ]Absolutely not. 
 I get that Kodi is free and a volunteer effort, so I don't want to sound like I don't appreciate all the work you guys do, but this sort of thing really makes me start to consider MrMC. There's already a working example in the SPMC code that's still available last I checked, then maybe a few #ifdefs to only enable it on builds for hardware that can handle it like the Shield and Stick 4K. Granted sometimes the simplest features can be the most difficult to implement, but it doesn't sound overly onerous. Not like trying to maintain special hacks for each chipset a la the "shitty" builds anyway.
Ok so what is the current state about HW/SW decoding and upscaling on the Shield?

I've just received and plug my Shield on my 1080p Sony TV, and picture quality for SD and 720p files is quite not as good compared to my little raspberry.

Is it not possible to let hardware decode the video, then apply a software upscaling ?
Why is it not possible to select each one individualy?
Is it a Shield GPU or Kodi limitation ?

Whatever, what are the right settings to have best PQ for SD, 720p and 1080p video on a FHD TV?
The hate for us shield users is unbelievable.. I haven't been able to use picture shifts to hide sports spoilers for several years now and I need to resort to MrMc and other stupid workarounds like turning on/off hw acceleration every time I switch channels..

Imho it's ridiculous not applying a minor fix, especially since it's been available since pre Krypton..
The codec factory with Android implementation was merged long ago, everything is configurable now.