Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7759 closed patch (fixed)

[PATCH] Add support for repeat_pict plus related AV-sync improvements

Reported by: tralph11@… Owned by: markk
Priority: minor Milestone: 0.23
Component: MythTV - Video Playback Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I've created a patch that implements the correct video delays when frames with the repeat_pict flag are processed. This dramatically improves playback for HD 720p and 1080i broadcast material. Also included are some AV-sync improvements which improve next trigger management. I'm including a complete patch and also in parts to allow ease of integration and discussion.

  • Part 1

This implements the repeat_pict delay logic in NVP and also increases the allowed delay by CalcDelay? in vsync.cpp

  • Part 2

The next trigger was being allowed to fall behind too far when trying to speed up video playback faster than possible. This caused severe playback issues when repeated frames were encountered or a frame dropped.

  • Part 3

This prevents the trigger from being advanced when a frame is dropped. If the frame is dropped but the next trigger is advanced you lose the benefit of dropping the frame.

This set of patches fully addresses all the problems I've seen in the past and also resolves some extreme cases reported in the following discussion:

http://www.gossamer-threads.com/lists/mythtv/users/412883

Attachments (7)

t7759_repeat_pict_v1.diff (5.8 KB) - added by tralph11@… 10 years ago.
Full patch including repeat_pict and AV-sync improvements
t7759_repeat_pict_v1_part1.diff (4.3 KB) - added by tralph11@… 10 years ago.
Part 1 only includes repeat_pict changes
t7759_repeat_pict_v1_part2.diff (896 bytes) - added by tralph11@… 10 years ago.
Part 2 only includes negative trigger handling
t7759_repeat_pict_v1_part3.diff (849 bytes) - added by tralph11@… 10 years ago.
Part 3 only includes drop frame enhancement
t7759_repeat_pict_v2.diff (5.8 KB) - added by tralph11@… 10 years ago.
small update for part 2
t7759_repeat_pict_v2_part2.diff (894 bytes) - added by tralph11@… 10 years ago.
small update for part 2
t7759_repeat_pict_v3.diff (5.8 KB) - added by taylor.ralph@… 10 years ago.
final update (trunk 23210)

Download all attachments as: .zip

Change History (12)

Changed 10 years ago by tralph11@…

Attachment: t7759_repeat_pict_v1.diff added

Full patch including repeat_pict and AV-sync improvements

Changed 10 years ago by tralph11@…

Part 1 only includes repeat_pict changes

Changed 10 years ago by tralph11@…

Part 2 only includes negative trigger handling

Changed 10 years ago by tralph11@…

Part 3 only includes drop frame enhancement

Changed 10 years ago by tralph11@…

Attachment: t7759_repeat_pict_v2.diff added

small update for part 2

Changed 10 years ago by tralph11@…

small update for part 2

comment:1 Changed 10 years ago by tralph11@…

For anyone interested in testing this please use the t7759_repeat_pict_v2.diff patch. The separate "part" patches are just to break it apart for integration and analysis purposes.

Changed 10 years ago by taylor.ralph@…

Attachment: t7759_repeat_pict_v3.diff added

final update (trunk 23210)

comment:2 Changed 10 years ago by markk

Owner: changed from Janne Grunau to markk
Status: newaccepted

comment:3 Changed 10 years ago by markk

Milestone: unknown0.23

comment:4 Changed 10 years ago by markk

Resolution: fixed
Status: acceptedclosed

(In [23321]) Add support for the repeat_pict count and improve the handling of certain A/V sync cases with patch from Taylor Ralph.

I'm guessing that there may still be extreme cases where the repeat_pict value is higher than the sync code can handle but otherwise this appears to be working well.

Closes #7759.

comment:5 Changed 10 years ago by tralph

(In [23562]) Backport [23321] to improve A/V sync handling for 720p/1080i MPEG-2 broadcasts, refs #7759.

Note: See TracTickets for help on using tickets.