[mythtv] OpenGL Performance problems - specific commit that causes the problem
mark.kendall at gmail.com
Thu Jan 3 22:45:35 UTC 2019
On Thu, 3 Jan 2019 at 21:12, Peter Bennett <pb.mythtv at gmail.com> wrote:
> I ran a bisect. Before the below commit, UYVY playback on Fire Stick 4K
> 30fps was perfect. After this commit it can only play 5 or 10 fps. Note
> that after this commit the color also went wrong, color was later fixed
> but the 5-10 fps limitation remained consistent after this commit.
> commit 43b64d5c1fdb08f1334ac18fafdfa7245a23dcfa
> Author: Mark Kendall <mark.kendall at gmail.com>
> Date: Tue Dec 18 08:54:40 2018 +0000
> OpenGLVideo: Remove custom UYVY packing code
> - opengl video now defaults to regular UYVY input textures.
> - this fixes the interlaced chroma upsampling bug and works around
> precision issues on some OpenGLES implementations.
> - this avoid the extra filter stage required for the old code but
> use a larger texture in video memory
> - FFmpeg conversion is avoided (as it does not handle interlaced
> chroma) so we use our own packing code. This is MMX assisted where
> - TODO add NEON SIMD support to packing code
I'm really sorry - I should have been clearer earlier. I was pretty
sure this commit was causing the non-YV12 slowdown but have been
mulling over how best to address it - whilst also making sure there
aren't any other 'generic' performance issues covering both YV12 and
The problem is the last 2 comments in the commit. Previously the
YV420P to UYVY conversion was done with FFmpeg but this doesn't handle
interlaced chroma (a known issue). So I switched it to our own code -
that has no arm/NEON optimisations (and is fundamentally slightly more
expensive for interlaced content anyway).
In an ideal world, either the default or YV12 would work without issue
but given that isn't the case, I'm thinking the following is the best
- add a setting to force using FFmpeg for conversion.
- title it something along the lines of "Low quality chroma sampling
for UYVY textures"
- I want to emphasise the quality issue - I could call it faster but
people would infer that is better...
- enable it only for arm code - I don't think it will ever be an issue
on anything x86
- I'm ambivalent over what the default should be:)
I also have a couple of smaller fixes that may have a bearing on the
blank output problem.
More information about the mythtv-dev