[mythtv] Android Release builds

Mark Spieth mark at digivation.com.au
Thu Sep 20 04:32:10 UTC 2018


On 20/09/18 14:07, David Engel wrote:
> On Wed, Sep 19, 2018 at 02:46:07PM -0500, David Engel wrote:
>> On Wed, Sep 19, 2018 at 02:55:06PM -0400, Peter Bennett wrote:
>>> On 09/19/2018 11:05 AM, David Engel wrote:
>>>> Not coincidentally, I'd started building my own Android package with
>>>> --compile-type=profile on Sunday.  I later noticed that skips were
>>>> considerably longer on my Shield.  The video took around .5 to .8
>>>> seconds to resume instead of about .1 seconds like before.  In
>>>> addition, the audio started right away while the video was still
>>>> frozen.  It made for a jarring and unpleasant effect.
>>>>
>>>> I hand't built an Android package in over a week so my first suspicion
>>>> was the new, vaapi2 changes were to blame.  After, several test
>>>> builds, I finally confirmed last that it wasn't the vaapi2 changes.
>>>> Rather, it was using compile type profile.  For as yet unknown
>>>> reasons, compile type profile produces worse code than compile type
>>>> debug on Android, at least when measuered by skip performance.
>>> I built using the release mythbuild.sh option, which now does compile type
>>> "profile". I find skips to still be instantaneous. Are you using a recording
>>> or a video? Does the recording have a seek table? Maybe the seek table
>>> actually slows it down? Personally I am suspicious of the seek table and
>>> would like to get rid of it.
>> The seek tables are fine and I always used the same recordings when
>> doing before and after comparisons.
> This is partially but still not totally solved.
>
> When I built with profile before, I simply changed
> CONFIGUREBUILDTYPE="debug --enable-small" to
> CONFIGUREBUILDTYPE="profile --enable-small".  With "profile
> --enable-small", skips were noticeably slower as I reported.
>
> Tonight, I built with simply "profile".  With "profile", skips at 1x
> speed were comparable to "debug --enable-small" (good).  At higher
> 1.8x, however, skips were noticeably slower again (bad).
>
> In short, dropping "--enable-small" helped but there is still an
> issue.  I'm going to try some other option combinations.
>
The seek table for any recording (injected or not) uses the seek table 
in the db for that recording which gets written during record or the 
first time its played back. This is important for TS files since there 
is no embedded seek info/metadata in it. If MFE has trouble getting the 
seek info (which it has to do on skip) then that will delay completion 
of the skip. If there is no seek table, ts seeking is a "guess" algo and 
then play until the requested pts is found, after which it starts 
"playing". Any errors in the TS will also delay sync after a blind file 
seek.

This is why wifi does not work as well as wired network (AFAIK).

Video as opposed to Watch Recordings uses ffmpeg to do the seeking which 
uses any file metadata to look up the desired pts in the file. TS does 
hunting as described above since there is no metadata for this purpose 
(its a stream).

That said, there should be no difference in skip performance between any 
of the build types. You would expect release to be better %CPU than 
profile than debug depending on opt levels. This is arm so the cache 
sizes are smaller.

Smaller tighter binaries may benefit from cache localization. May 
explain what you are seeing.

Other than that, IDK and YMMV.

HTH
Mark




More information about the mythtv-dev mailing list