I am very satisfied with the last build and logs says all sync adjustments has been eliminated:
CDVDClock::ErrorAdjust
or
ActiveAE::SyncStream
and all debug logs posted are very similar.
There no dropouts exist that can be explained with debug log, then only can be attributed to external causes (different Shield settings, AVR, TV, etc.) maybe bitstrem generated is not compatible with some AVRs (in Denon AVR-X1600H for sure it works).
Also is confirmed that large padding blocs not cause a/v sync issues. At contrary, stream starts with -70 ms error and ends after 5 minutes with +5 ms error (with zero AE adjustments).
The same users who are having problems now were having problems with the previous MAT code. This alone rules out the MAT code itself.
I have done some more testing with MakeMKV v1.17.7 and now there are no problems when converting Cars Blu-Ray to MVK, it plays just as well as m2ts. This rules out MakeMKV (at least the latest version and I don't think they have changed anything right now).
The problems when playing from USB have also been solved (I can no longer reproduce the issues under these conditions, even with maxpassthroughoffsyncduration 96).
The seek has also improved considerably, that is, the audio returns much faster after seek because there is less error and no additional corrections are necessary.
It is true that there was a problem with the error calculation simply because the AE code does not aware that it is working with compressed data that is not distributed regularly in time. That is, the error in TrueHD MAT data does not corresponds to the real error (A/V ms diff) that it has once decoded to PCM.
e.g. when are 5 MAT frames in queue this is 5 * 20 = 100 ms of error that is not real, aditionally 100ms due maxpassthroughoffsyncduration
100 + 100 ms = 200 ms of error which are equivalent to 100ms (max. threshold) in real life. This is the reason of apply a correction factor of /2.
This factor will probably have to be raised to ~2.25 to leave a margin of safety but this is not going to change things for those who have problems now.
This is the only thing that has been fixed now, i.e. before with TrueHD it was working all the time at the limit of stability with an error very close to 100 or -100 threshold. Any small variation caused unnecessary corrections that seconds or minutes later were repeated in the opposite direction. This also explains the randomness of the issues.
This fix can also be applied to Omega since in fact it is an independent thing that has no relation with the new TrueHD MAT code.