[mythtv] recent playback optimisations -> LiveTV regression for me

Peter Bennett pb.mythtv at gmail.com
Mon Nov 19 22:24:45 UTC 2018



On 11/19/18 6:23 AM, Piotr Oniszczuk wrote:
> Peter
>
> FYI:
>
> 1) this commit
>
> https://github.com/MythTV/mythtv/commit/7a74d6a845b80e1223bdcefe669a079bbf7c7762
>
> causing on my system issues with LiveTV program transitions:
>
> sometimes (avg. 1 per 5-10 transitions) LiveTV playback becomes time-lapse (slowed-down jumpy).
> referring this commit shows no issue with test 100 transitions - so I think issue is within this commit.
>
>
> 2) Also I reverted:
>
> @@ -3996,6 +3996,14 @@
>           {
>               AVFrame tmppicture;
> .
> +            VideoFrame *xf = picframe;
> +            picframe = m_parent->GetNextVideoFrame();
> +
> +            unsigned char *buf = picframe->buf;
> +            av_image_fill_arrays(tmppicture.data, tmppicture.linesize,
> +                                 buf, AV_PIX_FMT_YUV420P, use_frame->width,
> +                                 use_frame->height, IMAGE_ALIGN);
> +
>               tmppicture.data[0] = buf + picframe->offsets[0];
>               tmppicture.data[1] = buf + picframe->offsets[1];
>               tmppicture.data[2] = buf + picframe->offsets[2];
>
> in
>
> https://github.com/MythTV/mythtv/commit/22de417da6437e877ef6c4d0ae5ee5b4121424c6
>
> as this causing sometimes 0.5-2sec pixelizations at beginning of new program at LiveTV program transition.
>
> br
>
>    

Hi Piotr

Please try the attached patch. It uses a different method to solve the 
skipping of video frames in live TV start or transition. I hope that 
fixes issue 1.

For issue 2, there is a problem. If you look at the commit, you will see 
that these three lines were moved up in the code:

+            VideoFrame *xf = picframe;
+            picframe = m_parent->GetNextVideoFrame();
+            unsigned char *buf = picframe->buf;

By Adding these back you will have them duplicated in two places. 
Putting them in two places will confuse the logic.

Possibly the av_image_fill_arrays has something to do with it. See if 
just adding that line back without the other three will fix the problem.

If you still get the transition problem with the patch, please try with 
-v playback and see if there are messages that explain why the video is 
jerky.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20181119_1607_transition_fix.patch
Type: text/x-patch
Size: 4498 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20181119/23767420/attachment.bin>


More information about the mythtv-dev mailing list