Hardware acceleration options need to be extended... On both ARM builds and x86 builds...

  • I cant actually believe someone needs to make a thread about the almost useless Hardware Acceleration options we have right now.

    Right now I can chose on the Nvidia Shield, Minix U9 and Intel NUC between:

    Hardware Acceleration: Always, Never and HD and up.

    HD and up is whats so freaking useless to be honest with you, which means Hardware Acceleration enabled at 720p or higher resolution.

    99% of all the android and other SoCs have one thing in common- the upscaling quality is trash. It equals "bilinear" upscaling quality, which is absolutely trash. The only thing to change this is to use software scaling, like "Lanczos 3 optimized" which looks much better than the built-in scaling capabilities of 99% of all those ARM SoCs out there.

    The problem being is that when "HD and up" hardware acceleration is selected, all the 720p (and higher than 720p) content gets upscaled by the SoC, you cant use software scaling on it. Which means very bad upscaling quality.

    The thing is- the majority of ARM cpus, even in the cheap boxes, most likely have no issues decoding + software scaling 720p content with Lanczos 3 optimized. Thats why its absolutely stupid to have "HD and up" option for hardware acceleration.

    I mean I kinda get it why it is this way, when this option was implemented, they probably worked with devices like RPi1 which have super slow garbage hardware.

    99% of TVs out there nowadays are either 1080p TVs or 4K TVs. Thats why the "hardware acceleration" option should also include "Full HD and up" AND "4K and up" for h264 and mp4 content.

    Honestly, its probably just a few lines of code to implement this change, but it will probably take 5-10 years untill those 2 options will ever get introduced in a Kodi build... ("Full HD and up" AND "4K and up").

    If you have a 1080p TV, you most likely want Hardware Acceleration to start with 1080p content (or higher). Everything below 1080p is most optimal when upscaled by software Lanczos3. And most players have decent CPUs nowadays that can handle it.

    If you have a 4K TV, you most likely want Hardware Acceleration to start with 4K content or higher, provided that your media player has a decent CPUs, like Nvidia Shield or Intel NUC. All the content below 4K, youd want to decode + upscale with software Lanczos 3.

    As it is right now, I have to turn the Hardware Acceleration completely off, to be able to upscale 720p video with Lanczos 3, which is not an optimal way, since Id still want 1080p content to have hardware acceleration, because it doesnt need to be upscaled...

  • I think you are confused a little bit.

    On amlogic hardware you get the option to enable/disable using amcodec completely. With it enabled you get the options for mpeg2, mpeg4, and h264. The options are off, HD only, and always. These options have nothing to do with video scaling. These options allow using the hardware video decoder that is present in amlogic chipsets.

    Because amlogic uses it's own decoder and renderer there no possibility to use the HQ scalers when amcodec is in use. The same goes for mediacodec on android.

    I can show you the code if you'd like.

    PS. I'm not sure what you are talking about with the NUC. It has completely different HW accel options however the HQ scalers can be used all the time when VAAPI is enabled or not.

  • Its called "HD and up", not "HD only". Unfortunately "HD and up" means "720p and higher resolution".

    The thing is, when hardware acceleration is used for 720p content, its using the upscaling built into the ARM SoC. That means its a shitty upscaling quality.

    The optimal setting would be "1080p and up", so that everything below 1080p would be decoded and upscaled by the CPU! Some ARM SoCs have strong CPUs and ideally all content that is not native 1080p, should be decoded by software and also upscaled by software, like Lancszos 3.

    1080p doesnt need to be upscaled (on a 1080p TV), thats why the optimal setting here would be to use hardware acceleration starting with 1080p.

    What Im saying is, there should be more options to "HD and up". Like "Full HD and up" and also "4K and up".


    Let me use the Nvidia Shield as an example with SPMC. It has a powerful CPU, that can decode 1080p content easily by software. Or decode 720p with software and upscale with Software it, f. e. as Lanczos 3.

    What would be ideal here is to have "Full HD and up" hardware acceleration, which would mean that all 1080p content would be decoded by the hardware. And all resolutions below, would then be decoded by software plus upscaled by software.

    that "HD and up" is very unoptimal, because it uses hardware acceleration for 720p content with shitty upscaling quality. It needs more settings, f. e.:


    Always

    Never

    "HD and up"

    "Full HD and up"

    "4K and up"

    Right now with Shield and SPMC- If I want to decode 720p material by software and upscale it by software (lanczos 3), I have to DISABLE the hardware acceleration COMPLETELY. Why? Because the setting "HD and up" begins using hardware acceleration with 720p resolution, which is dumb.

    I DONT want to disable hardware acceleration comepletely. I only want to use hardware acceleration with 1080p content or higher resolution than 1080p. And everything below 1080p to use software decoding + upscaling.

    I dont know, if you still dont get it after this post, just forget it alltogether.. It seems like understanding basic things is sometimes hard.

  • I thought it was best to let your TV do the upscaling?

  • I dont know, if you still dont get it after this post, just forget it alltogether.. It seems like understanding basic things is sometimes hard.

    Understanding the request is easy. People would still understand it if you wrote one short polite email rather than the unnecessarily long rants above. Your apparent sense of entitlement does nothing to help your cause, The point is, Kodi and LibreELEC are open source projects developed, maintained and supported by volunteers. If you don't like the way they work, you can change them. I have done so in the past for my own use, and without knowing how it all works, and it's a very rewarding process to go through. Building LibreELEC is not that difficult. Simple code changes are not difficult. But everything that is done for the released builds has to be debugged and tested across a wide variety of platforms without disruption to the existing user base. What you preceive as a simple change may be simple to implement, or may be incredibly involved. but it may have implications which prevent widespread adpoption.