Mailing List Archive

recent playback optimisations -> LiveTV regression for me
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



_______________________________________________
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: recent playback optimisations -> LiveTV regression for me [ In reply to ]
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
Re: recent playback optimisations -> LiveTV regression for me [ In reply to ]
Peter,
Thx.

I already applied patch and I’m under testing.

As this is a bit time consuming - I’ll return to You within few days.

Regarding second aspect (av_image_fill_arrays):

Indeed - code duplication was my overlook.
I added back just:

av_image_fill_arrays(tmppicture.data, tmppicture.linesize,
buf, AV_PIX_FMT_YUV420P, use_frame->width,
use_frame->height, IMAGE_ALIGN);

in it’s original place.

Will test and give You feedback

thx for so quick replay :-)


> Wiadomo?? napisana przez Peter Bennett <pb.mythtv@gmail.com> w dniu 19.11.2018, o godz. 23:24:
>
>
>
> 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
> <20181119_1607_transition_fix.patch>_______________________________________________
> 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: recent playback optimisations -> LiveTV regression for me [ In reply to ]
Peter,
Patch seems to fix issue with LiveTV transitions.
I think You can commit it into current master.

PS: I think also putting back av_image_fill_arrays is worth.

thx


> Wiadomo?? napisana przez Piotr Oniszczuk <piotr.oniszczuk@gmail.com> w dniu 20.11.2018, o godz. 15:45:
>
> Peter,
> Thx.
>
> I already applied patch and I’m under testing.
>
> As this is a bit time consuming - I’ll return to You within few days.
>
> Regarding second aspect (av_image_fill_arrays):
>
> Indeed - code duplication was my overlook.
> I added back just:
>
> av_image_fill_arrays(tmppicture.data, tmppicture.linesize,
> buf, AV_PIX_FMT_YUV420P, use_frame->width,
> use_frame->height, IMAGE_ALIGN);
>
> in it’s original place.
>
> Will test and give You feedback
>
> thx for so quick replay :-)
>
>
>> Wiadomo?? napisana przez Peter Bennett <pb.mythtv@gmail.com> w dniu 19.11.2018, o godz. 23:24:
>>
>>
>>
>> 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
>> <20181119_1607_transition_fix.patch>_______________________________________________
>> 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

_______________________________________________
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: recent playback optimisations -> LiveTV regression for me [ In reply to ]
Piotr
Please tell me what playback profile you used for the testing
av_image_fill_arrays, what decoder type (e.g. standard, VAAPI2, VDPAU.
etc.)?
Peter

On 11/22/18 3:51 PM, Piotr Oniszczuk wrote:
> Peter,
> Patch seems to fix issue with LiveTV transitions.
> I think You can commit it into current master.
>
> PS: I think also putting back av_image_fill_arrays is worth.
>
> thx
>
>
>> Wiadomo?? napisana przez Piotr Oniszczuk <piotr.oniszczuk@gmail.com> w dniu 20.11.2018, o godz. 15:45:
>>
>> Peter,
>> Thx.
>>
>> I already applied patch and I’m under testing.
>>
>> As this is a bit time consuming - I’ll return to You within few days.
>>
>> Regarding second aspect (av_image_fill_arrays):
>>
>> Indeed - code duplication was my overlook.
>> I added back just:
>>
>> av_image_fill_arrays(tmppicture.data, tmppicture.linesize,
>> buf, AV_PIX_FMT_YUV420P, use_frame->width,
>> use_frame->height, IMAGE_ALIGN);
>>
>> in it’s original place.
>>
>> Will test and give You feedback
>>
>> thx for so quick replay :-)
>>
>>
>>> Wiadomo?? napisana przez Peter Bennett <pb.mythtv@gmail.com> w dniu 19.11.2018, o godz. 23:24:
>>>
>>>
>>>
>>> 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
>>> <20181119_1607_transition_fix.patch>_______________________________________________
>>> 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
> _______________________________________________
> 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