Opened 11 years ago

Closed 11 years ago

#11233 closed Patch - Bug Fix (Fixed)

DVD menu playback stutters when using VDPAU decoding

Reported by: peper03@… Owned by: stuartm
Priority: critical Milestone: 0.27
Component: MythTV - DVD Playback Version: 0.26-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

VDPAU decoding requires additional buffering but this is not done in DVD menus, which leads to stuttering audio and jerky video and can make it hard to navigate the menu.

The buffering is not performed in menus or when a still frame is shown. As far as I can tell, the check should only be for still frames.

The attached patch changes the call from IsInDiscMenuOrStillFrame? to IsInStillFrame? (and adds two new virtual methods to the ringbuffer base class that the DVD and Blu-Ray ringbuffer classes implemented anyway).

The patch is for 0.26-fixes but should apply to master cleanly as far as I can tell.

This patch has not been tested with Blu-Ray discs as I don't have any to test but I would expect the behaviour to follow that of DVDs.

See also http://www.gossamer-threads.com/lists/mythtv/users/528340

Attachments (2)

0001-When-processing-frames-from-DVD-Blu-ray-ringbuffer-m.patch (5.1 KB) - added by peper03@… 11 years ago.
storedpackets_debug.patch (725 bytes) - added by peper03@… 11 years ago.
Test patch to added logging of the state of the video buffer

Download all attachments as: .zip

Change History (10)

Changed 11 years ago by peper03@…

comment:1 Changed 11 years ago by stuartm

Milestone: unknown0.26.1
Owner: set to stuartm
Priority: minorcritical
Status: newaccepted

comment:2 Changed 11 years ago by stuartm

Thank you, this was driving me crazy but I hadn't found time to debug.

comment:3 Changed 11 years ago by stuartm

OK, unfortunately this doesn't solve the problem 100% of the time for me. I suspect there are also times when we're incorrectly flagging menus vs still frames, seems particularly not to work after skipping promos/anti-piracy stuff to get to the menu.

Even when it does work and it's obviously a vast improvement, the video isn't quite fluid enough. So there's still room for improvement.

Changed 11 years ago by peper03@…

Attachment: storedpackets_debug.patch added

Test patch to added logging of the state of the video buffer

comment:4 Changed 11 years ago by peper03@…

Are you getting the same 'Video is X.Y frames ahead of audio, doubling video frame interval to slow down.' error messages? What playback performance are you getting (std dev etc.)?

The playback seemed to be fine on the DVDs I tested but I'll try it again on a larger sample.

Since the conditions for whether to buffer a video frame or not have been relaxed, I would expect (if anything) too many frames to be buffered. There are several other places in the code where IsInDiscMenuOrStillFrame? is called but none that appeared to be related to the buffering.

Maybe you could also try the patch I just attached. It'll create a lot of noise but shows whether the storedpackets buffer keeps running empty or not (when storevideoframes==1 and count==0).

comment:5 Changed 11 years ago by Richard <peper03@…>

In a1c4f4fea13f8ac481ee8ce959f168a139922fb2/mythtv:

When processing frames from DVD/Blu-ray ringbuffer, menu frames are now buffered as necessary to ensure stutter-free playback.

Refs #11233

Signed-off-by: Stuart Morgan <smorgan@…>

comment:6 Changed 11 years ago by Richard <peper03@…>

In ace510a0319ebed57d76c019e3a36db470ad280f/mythtv:

When processing frames from DVD/Blu-ray ringbuffer, menu frames are now buffered as necessary to ensure stutter-free playback.

Refs #11233

Signed-off-by: Stuart Morgan <smorgan@…>
(cherry picked from commit 62816805dbbce996bd8ee61da3bdfca1bb1bcef9)

Conflicts:

mythtv/libs/libmythtv/Bluray/bdringbuffer.h
mythtv/libs/libmythtv/DVD/dvdringbuffer.h

comment:7 Changed 11 years ago by Richard <peper03@…>

In 5d8e8e17df880b362ed2305b65fd5d1cd18c426f/mythtv:

When processing frames from DVD/Blu-ray ringbuffer, menu frames are now buffered as necessary to ensure stutter-free playback.

Refs #11233

Signed-off-by: Stuart Morgan <smorgan@…>
(cherry picked from commit 62816805dbbce996bd8ee61da3bdfca1bb1bcef9)

Signed-off-by: Stuart Morgan <smorgan@…>

comment:8 Changed 11 years ago by stuartm

Milestone: 0.26.10.27
Resolution: Fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.