Mailing List Archive

Android OpenGL Performance
In the latest master, Android OpenGL performance is now unacceptable.
I notice the UYVY option has been removed from settings. Does this mean
UYVY is now the default?

In most cases OpenGL is not able to keep up with playback and frames are
being dropped, where before it was keeping up successfully.

NVidia Shield
With default setting (YV12 unchecked) - dropping frames on 1080i and
720p content
 - SD (480i) picture jumps up and down in a most disconcerting fashion
(both Linear Blend and kernel deint)
With YV12 checked - 1080i is OK but dropping frames on 720p content
 - SD (480i) picture is OK with linear blend

Amazon Fire 4K
With default setting (YV12 unchecked) - dropping frames on 1080i and
720p content
 - SD (480i) picture jumps up and down in a most disconcerting fashion
With YV12 checked - dropping frames with 1080i, 720p is OK
 - SD (480i) picture is OK
Fire 4K still needs "extra stage" checked otherwise sometimes the screen
is blank.

Peter

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Android OpenGL Performance [ In reply to ]
On Mon, Dec 31, 2018 at 05:05:33PM -0500, Peter Bennett wrote:
> In the latest master, Android OpenGL performance is now unacceptable.
> I notice the UYVY option has been removed from settings. Does this mean UYVY
> is now the default?

That settings has been gone for a more than a week. I think the
default is now RGBA.

> In most cases OpenGL is not able to keep up with playback and frames are
> being dropped, where before it was keeping up successfully.
>
> NVidia Shield
> With default setting (YV12 unchecked) - dropping frames on 1080i and 720p
> content

That's probably what I reported to Mark. I don't remember seeing it
with 720p, though. I'll try to retest it later.

> ?- SD (480i) picture jumps up and down in a most disconcerting fashion (both
> Linear Blend and kernel deint)

I didn't try SD.

> With YV12 checked - 1080i is OK but dropping frames on 720p content
> ?- SD (480i) picture is OK with linear blend

I didn't distinctly notice any dropping with 1080i but a/v sync seemed
to take longer than before after skipping.

> Amazon Fire 4K
> With default setting (YV12 unchecked) - dropping frames on 1080i and 720p
> content
> ?- SD (480i) picture jumps up and down in a most disconcerting fashion
> With YV12 checked - dropping frames with 1080i, 720p is OK
> ?- SD (480i) picture is OK
> Fire 4K still needs "extra stage" checked otherwise sometimes the screen is
> blank.

I haven't tried my Stick yet with the recent code yet.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Android OpenGL Performance [ In reply to ]
On 12/31/18 6:26 PM, David Engel wrote:
> On Mon, Dec 31, 2018 at 05:05:33PM -0500, Peter Bennett wrote:
>> In the latest master, Android OpenGL performance is now unacceptable.
>> I notice the UYVY option has been removed from settings. Does this mean UYVY
>> is now the default?
> That settings has been gone for a more than a week. I think the
> default is now RGBA.
>
>> In most cases OpenGL is not able to keep up with playback and frames are
>> being dropped, where before it was keeping up successfully.
>>
>> NVidia Shield
>> With default setting (YV12 unchecked) - dropping frames on 1080i and 720p
>> content
> That's probably what I reported to Mark. I don't remember seeing it
> with 720p, though. I'll try to retest it later.
>
>>  - SD (480i) picture jumps up and down in a most disconcerting fashion (both
>> Linear Blend and kernel deint)
> I didn't try SD.
>
>> With YV12 checked - 1080i is OK but dropping frames on 720p content
>>  - SD (480i) picture is OK with linear blend
> I didn't distinctly notice any dropping with 1080i but a/v sync seemed
> to take longer than before after skipping.
>
>> Amazon Fire 4K
>> With default setting (YV12 unchecked) - dropping frames on 1080i and 720p
>> content
>>  - SD (480i) picture jumps up and down in a most disconcerting fashion
>> With YV12 checked - dropping frames with 1080i, 720p is OK
>>  - SD (480i) picture is OK
>> Fire 4K still needs "extra stage" checked otherwise sometimes the screen is
>> blank.
> I haven't tried my Stick yet with the recent code yet.
>
> David
I changed the parameters in AndroidManifest.xml.in to -v playback. I
think maybe we should use that as default so that users can easily see
from the log if there are playback issues such as dropped frames. Some
of the combinations were dropping fewer frames, so it was less
noticeable visually.

Peter
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Android OpenGL Performance [ In reply to ]
On Mon, Dec 31, 2018 at 06:43:42PM -0500, Peter Bennett wrote:
> On 12/31/18 6:26 PM, David Engel wrote:
> > On Mon, Dec 31, 2018 at 05:05:33PM -0500, Peter Bennett wrote:
> > > In the latest master, Android OpenGL performance is now unacceptable.
> > > I notice the UYVY option has been removed from settings. Does this mean UYVY
> > > is now the default?
> > That settings has been gone for a more than a week. I think the
> > default is now RGBA.
> >
> > > In most cases OpenGL is not able to keep up with playback and frames are
> > > being dropped, where before it was keeping up successfully.
> > >
> > > NVidia Shield
> > > With default setting (YV12 unchecked) - dropping frames on 1080i and 720p
> > > content
> > That's probably what I reported to Mark. I don't remember seeing it
> > with 720p, though. I'll try to retest it later.
> >
> > > ?- SD (480i) picture jumps up and down in a most disconcerting fashion (both
> > > Linear Blend and kernel deint)
> > I didn't try SD.
> >
> > > With YV12 checked - 1080i is OK but dropping frames on 720p content
> > > ?- SD (480i) picture is OK with linear blend
> > I didn't distinctly notice any dropping with 1080i but a/v sync seemed
> > to take longer than before after skipping.
> >
> > > Amazon Fire 4K
> > > With default setting (YV12 unchecked) - dropping frames on 1080i and 720p
> > > content
> > > ?- SD (480i) picture jumps up and down in a most disconcerting fashion
> > > With YV12 checked - dropping frames with 1080i, 720p is OK
> > > ?- SD (480i) picture is OK
> > > Fire 4K still needs "extra stage" checked otherwise sometimes the screen is
> > > blank.
> > I haven't tried my Stick yet with the recent code yet.
> >
> > David
> I changed the parameters in AndroidManifest.xml.in to -v playback. I think
> maybe we should use that as default so that users can easily see from the
> log if there are playback issues such as dropped frames. Some of the
> combinations were dropping fewer frames, so it was less noticeable visually.

I don't have a problem with making -v general,playback the default on
Android. Though, if the user can is capable of running adb logcat, they
are proably capable of connecting to the control socket to change the
verbose setting too.

Here is my latest testing with with git version cc25495b on my Shield.

YV12 mpeg2 480i : No problems (including at 2x).

YV12 mpeg2 720p : No problems (including at 2x).

YV12 mpeg2 1080i : No problems (including at 2x).

no-YV12 mpeg2 480i : No problems (including at 2x).

no-YV12 mpeg2 720p : No problems (including at 2x).

no-YV12 mpeg2 1080i : Jittery at 1xx. I uploaded a -v playback log at
https://pastebin.com/rD9Wvjv5 .

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Android OpenGL Performance [ In reply to ]
On 12/31/18 10:53 PM, David Engel wrote:
> I don't have a problem with making -v general,playback the default on
> Android. Though, if the user can is capable of running adb logcat, they
> are proably capable of connecting to the control socket to change the
> verbose setting too.
>
I just learned how to do that so I do not think we need to change the
default.


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Android OpenGL Performance [ In reply to ]
Peter/David

As mentioned on IRC, I've gone through the OpenGL changes. I spotted a
couple of potential issues for the YV12 code and performance in
general and have pushed some updates. Can you see if they help?

For the android build, you might also want to have a look at a couple
of lines in MythRenderOpenGL that may need fixing:

Firstly, in MythRenderOpenGL::setWidget there is a call to winId. The
QOpenGLWidget documentation specifically recommends against calling
this as it reduces performance - but we only use a QWidget. Not sure
why we don't use a QOpenGLWidget (I'm guessing one of the 101
workarounds for windowing issues) or whether the winId call hurts
performance. That said the android build then sets the window surface
type to OpenGL. I'd recommend just creating MythRenderOpenGLAndroid
(subclass of MythRenderOpenGLES) and remove all of the hacks and
workarounds (just use a QOpenGLWidget).

Secondly - MythRenderOpenGL::doneCurrent no longer actually calls
doneCurrent. I expect this will cause problems on some platforms.

regards
Mark
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Android OpenGL Performance [ In reply to ]
On 02/01/2019 01:04, Mark Kendall wrote:
> Peter/David
>
> As mentioned on IRC, I've gone through the OpenGL changes. I spotted a
> couple of potential issues for the YV12 code and performance in
> general and have pushed some updates. Can you see if they help?
>
> For the android build, you might also want to have a look at a couple
> of lines in MythRenderOpenGL that may need fixing:
>
> Firstly, in MythRenderOpenGL::setWidget there is a call to winId. The
> QOpenGLWidget documentation specifically recommends against calling
> this as it reduces performance - but we only use a QWidget. Not sure
> why we don't use a QOpenGLWidget (I'm guessing one of the 101
> workarounds for windowing issues) or whether the winId call hurts
> performance. That said the android build then sets the window surface
> type to OpenGL. I'd recommend just creating MythRenderOpenGLAndroid
> (subclass of MythRenderOpenGLES) and remove all of the hacks and
> workarounds (just use a QOpenGLWidget).
>

Moving stuff to a QOpenGLWidget is a piece of work that can wait
until after we cut fixes/30

Regards
Stuart

> Secondly - MythRenderOpenGL::doneCurrent no longer actually calls
> doneCurrent. I expect this will cause problems on some platforms.
>
> regards
> Mark
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Android OpenGL Performance [ In reply to ]
On 1/1/19 8:04 PM, Mark Kendall wrote:
> Peter/David
>
> As mentioned on IRC, I've gone through the OpenGL changes. I spotted a
> couple of potential issues for the YV12 code and performance in
> general and have pushed some updates. Can you see if they help?
>
> For the android build, you might also want to have a look at a couple
> of lines in MythRenderOpenGL that may need fixing:
>
> Firstly, in MythRenderOpenGL::setWidget there is a call to winId. The
> QOpenGLWidget documentation specifically recommends against calling
> this as it reduces performance - but we only use a QWidget. Not sure
> why we don't use a QOpenGLWidget (I'm guessing one of the 101
> workarounds for windowing issues) or whether the winId call hurts
> performance. That said the android build then sets the window surface
> type to OpenGL. I'd recommend just creating MythRenderOpenGLAndroid
> (subclass of MythRenderOpenGLES) and remove all of the hacks and
> workarounds (just use a QOpenGLWidget).
>
> Secondly - MythRenderOpenGL::doneCurrent no longer actually calls
> doneCurrent. I expect this will cause problems on some platforms.
>
> regards
> Mark
>

With latest master

Fire stick 4K 1080i content Linear Blend (2x) YV12 unchecked, extra
stage checked
Drops 22 frames per second (i.e. only manages 8 frames per second?)
With the Nov 20th version and UVYV checked these settings play with No
dropped frames.

Fire stick 4K 1080i content Linear Blend YV12 unchecked, extra stage checked
Drops 24 frames per second (i.e. only manages to display 6 frames per
second)
With the Nov 20th version and UYVY checked these settings play with No
dropped frames.

Fire stick 4K 1080i content Linear Blend (2x) YV12 CHECKED, extra stage
checked
Drops 6 frames per second (i.e. only manages 24 frames per second)
With the Nov 20th version drops 6 frames per second, the same.

With the latest version if I don't check "extra stage" the playback is
now consistently blank with all settings. With the November version if I
don't check "extra stage" the video is intermittently blank when using YV12.

To summarize, with the November version I get perfect playback with
UYVY, but with latest master it is terrible. With both November and
latest versions I get mediocre results using YV12.

Peter
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org