github pannal/CoreELEC T2
Release T2

latest releases: T3b, T3a, T3...
one month ago

p3i T2

This is the continuation of the initial T1 release with a lot of changes. In terms of GUI improvements it's not as game-changing as T1 was, but still has a lot of benefits, this time less around idle CPU usage, more around live GUI performance during usage.

UI rendering improvements

T1 was heavily focused on idle CPU reduction, T2 focuses on GUI transitions and large list performance. Here's a short summary of what's changed:

More detailed rundown
  ┌─────┬──────────────────────────────────┬───────────────┬──────────────┬───────────────┬────────────────────────────┐
  │  #  │           Optimization           │   Frequency   │  Complexity  │  Frame Time   │           Notes            │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │ 1   │ Cache render items vector        │ Every frame,  │ Heap alloc → │ ~2-5%         │ Biggest win; 10-50 item    │
  │     │                                  │ list views    │  reuse       │               │ vectors per frame on ARM   │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │     │ std::optional caches (scroll     │               │ Skip         │               │ Most impactful in          │
  │ 2   │ bar, panel, button alpha,        │ Every frame   │ redundant    │ ~1-3%         │ GUIControlGroupList (page  │
  │     │ control group list)              │               │ setters      │               │ control skip)              │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │ 3   │ CGUIImage batch dirty marking    │ Every frame   │ 6+ calls → 1 │ ~1-2%         │ Only during active         │
  │     │                                  │ during fades  │              │               │ cross-fade transitions     │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │     │ CGUIImage skip redundant diffuse │ Every frame,  │ Compare      │               │ Saves per-image work when  │
  │ 4   │  color                           │ per image     │ before       │ ~0.5-1%       │ color unchanged            │
  │     │                                  │               │ update       │               │                            │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │     │ GUIFadeLabelControl dirty        │ Every frame,  │              │               │ Fewer fade labels than     │
  │ 5   │ consolidation                    │ scrolling     │ 2 calls → 1  │ ~0.5-1%       │ images typically           │
  │     │                                  │ labels        │              │               │                            │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │     │ Message deduplication            │ Per GUI       │ Prevent      │               │ Reduces message processing │
  │ 6   │ (std::any_of)                    │ message       │ duplicate    │ ~0.5%         │  overhead                  │
  │     │                                  │               │ queue        │               │                            │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │     │                                  │ Every frame,  │ Skip         │               │                            │
  │ 7   │ CGUITexture ready state cache    │ per texture   │ redundant    │ ~0.5%         │ Minor per-texture saving   │
  │     │                                  │               │ eval         │               │                            │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │     │ GUILargeTextureManager O(1)      │ Per frame,    │              │               │                            │
  │ 8   │ lookups                          │ thumbnail     │ O(n) → O(1)  │ ~1-5ms/frame  │ 100+ loaded thumbnails     │
  │     │                                  │ views         │              │               │                            │
  ├─────┼──────────────────────────────────┼───────────────┼──────────────┼───────────────┼────────────────────────────┤
  │ 9   │ Binary search letter navigation  │ On user input │ O(n) → O(log │ imperceptible │ Correctness optimization   │
  │     │                                  │  only         │  n)          │               │                            │
  └─────┴──────────────────────────────────┴───────────────┴──────────────┴───────────────┴────────────────────────────┘
  Summary by scenario:
  ┌───────────────────────────────────────────────┬───────────────────────────────┐
  │                   Scenario                    │     Estimated Improvement     │
  ├───────────────────────────────────────────────┼───────────────────────────────┤
  │ Typical list/panel views                      │ ~3-8%                         │
  ├───────────────────────────────────────────────┼───────────────────────────────┤
  │ During cross-fade transitions                 │ ~5-10%                        │
  ├───────────────────────────────────────────────┼───────────────────────────────┤
  │ Large library (1000+ items) scrolling/refresh │ ~10-20%                       │
  ├───────────────────────────────────────────────┼───────────────────────────────┤
  │ Letter navigation in large lists              │ instant vs. potentially laggy │
  └───────────────────────────────────────────────┴───────────────────────────────┘

By now a big chunk of my GUI improvements have made it into Kodi itself and thus will be available to any Kodi user in the future.

Other notable changes

  • Add a very subtle boot animation to show we haven't crashed (the ring around the power button pulses)
  • Add DV Video Processor support and align with avdvplus
    I've carefully rebased our settings and video path on avdvplus R6's state, adopting the video processing logic and all the other features (and caveats of this in R6). Our DV and video paths are now not based on CPM anymore, but were carefully tested including full compatibility with PM4K and LAV filters without issues.
    Dissected from avdvplus in xbmc and kernel
  • AMLCodec: Improve VC-1 hardware decoding (not a definitive fix)
    Based on fixes from CoreELEC and avdvplus R5.
  • LAV/PackerMAT: Preserve numberOfSamplesOffset across seamless branch points
    This results in better A/V sync at seamless branching branch points
    Based on SamuriHL aa0b362 and avdvplus R6.
  • Add avdvplus R6 HDR10+/DV improvements
  • [ActiveAE] Allow configure "Low latency mode" during playback
    Via thexai, Kodi 22
  • VideoPlayer: Reset PTS offset on flush
    Guarantees continuous perfect subtitle sync after multiple seek attempts. Slightly changes seeking (with certain, especially PCM audio codecs, this leads to a small blip after seeking which resolves itself after a second); optional setting, on by default
    Via neo1973, Kodi 22
  • AEStreamInfo: fix AC3 duration when sample rate is different from 48 KHz
    Via thexai, Kodi 22
  • VideoPlayer: increase correction threshold to 1000ms (for DTS "classic" only)
    This fixes issue #26647 increasing the threshold for timestamp sync correction from 500ms to 1000ms avoiding correction issues for videos having the first keyframe between 500ms and 1000ms.
    Partially via seppiola, Kodi 22
  • Addition of Player.GetChapters in JSON RPC
    Via albaintor, Kodi 22
  • JSON RPC: added notifications (Player.OnPropertyChanged)
    Via albaintor, Kodi 22
  • [GUI] GUIWindowManager: Use shared_ptr for window ownership
    Fixes a crash during ReloadSkin (update) when a modal dialog was active
    Via enen92, Kodi 22, 1, 2, 3
  • Fix playback of tcp streams
    Via enen92, Kodi 22
  • VideoPlayer: Seek demuxer on embedded subtitle stream change
    Fixes a long standing Kodi issue where embedded subtitles could take up to 20-30 seconds to show up. This adds a very short seek-back hitch when changing (to) embedded subtitles, but shows them instantly.
    Via myself
  • Settings/System/CoreELEC: LAV: Adjust setting label and values
  • Settings/System/CoreELEC: Move LAV into separate group

CoreELEC Settings Addon

  • MainWindow: Scroll address label to accomodate larger fonts
    IP addresses could've been hidden when non-default fonts were selected
  • Fix slow shutdown by making LOOP_THREAD a daemon thread
  • Fix Bluetooth device not being trusted after pairing (long standing issue)
  • Backport LibreELEC-Settings' journald log persistence (logs can now be persisted during reboots to make identifying core issues easier)
  • Improve bluetooth discovery and pairing
  • Clean up device on pairing failure

General info on this release

All in all T2 should improve over T1 in general, adding the nice new features from R6, a lot of A/V sync improvements (LAV totally unnecessary right now, unless seamless branching titles are used), while retaining full compatibility. Should you run into any weird buffering issues, reflash and/or increase your Kodi cache slightly.

Should you have issues with bluetooth remotes, please unpair them, disable bluetooth, reboot, enable bluetooth, then pair again. Make sure you have another navigation device ready (TV remote via CEC, Kodi Kore).

Any active forced DV to X conversion video processor mode aside from HDR2 (Auto off) can result in a pink UI during playback. This is currently unsolved in both R6 and T2.

As stated above briefly, we've had multiple core changes to ensure perfect A/V sync in almost all scenarios (VC-1 is the exception), which leads to slightly different behaviour during seeking. This is expected and shows up predominantly when using non hw passthrough audio codecs, such as AAC (PCM). A short audio/video catch-up phase after seeking was deemed less intrusive than potential A/V desync issues.

Installation

1. Dirty

Drop the update tar into your CoreELEC update folder and reboot - this can be used as a dirty upgrade from CPM A14 or any of the U3k and avdvplus builds.

Should hitting reboot result in a black screen (long standing issue with any build), wait 10 seconds to make sure this wasn't just a fluke, then unplug and re-plug the device's power. The upgrade will commence afterwards.

Caution

Resetting Settings/System/CoreELEC to defaults after doing this is necessary. Not the CoreELEC Settings Addon!

2. Dirty (safe)

Drop the update tar into your CoreELEC update folder, shut down the device, pull the power plug for 30 seconds, replug.

Caution

Resetting Settings/System/CoreELEC to defaults after doing this is necessary. Not the CoreELEC Settings Addon!

3. Flash

Use the provided Flash img.gz to prepare your SD card as you would with any other CoreELEC build.

advancedsettings.xml

If you'd like, you can add the following to your advancedsettings.xml, which further improves UI rendering, but is not strictly necessary:

<advancedsettings version="1.0">
  <gui>
      <fronttobackrendering>true</fronttobackrendering>
      <geometryclear>false</geometryclear>
  </gui>
</advancedsettings>

Make sure the XML format is correct, otherwise the file will not be read at all. If you already have such a file, only add the <gui></gui> parts.

Thanks

A massive shoutout to everyone involved in this build!

Full Changelog (Kodi core): https://github.com/pannal/xbmc/commits/T2
Full Changelog (CoreELEC-Settings): https://github.com/pannal/service.coreelec.settings/commits/T2
Full Changelog (Kernel): https://github.com/pannal/linux-amlogic/commits/T2

Don't miss a new CoreELEC release

NewReleases is sending notifications on new releases.