[mythtv-commits] Ticket #5643: Match refreshrate with input framerate to reduce judder.

MythTV mythtv at cvs.mythtv.org
Mon Feb 16 03:06:30 UTC 2009


#5643: Match refreshrate with input framerate to reduce judder.
---------------------------------------+------------------------------------
 Reporter:  henrik.sorensen at gmail.com  |        Owner:  ijr    
     Type:  enhancement                |       Status:  new    
 Priority:  minor                      |    Milestone:  unknown
Component:  mythtv                     |      Version:  unknown
 Severity:  medium                     |   Resolution:         
  Mlocked:  0                          |  
---------------------------------------+------------------------------------

Comment(by jyavenard at gmail.com):

 Hi

 I have worked on a patch using this one as a starting point.
 It also gives a mechanism to properly handle Nvidia's xrandr unique
 refresh rate.
 Nvidia drivers by default with DynamicTwinView will generate a unique
 refresh rate for all the various resolutions and screen.
 So the refresh rate returned by the xrandr API doesn't match the effective
 refresh rate..
 For example, on my system xrandr would return:
    1920x1080      50.0*    51.0     52.0     53.0     54.0     55.0
 56.0     57.0     58.0     59.0     60.0     61.0     62.0     63.0
 64.0     65.0     66.0
    1680x1050      67.0     68.0
    1440x900       69.0
    1400x1050      70.0     71.0
    1360x768       72.0     73.0
    1280x1024      74.0     75.0     76.0
 Note that all refresh rates start at 50 and keeps increasing by one.

 where 1920x1080 50Hz would be 50Hz
 1920x1080 51Hz would be 60Hz
 1920x1080 52Hz would be 24Hz etc...

 As such, mythtv configuration UI in setting custom TV playback video mode
 ; will report values that are pretty much useless.
 It also prevents this patch for correctly determining which refresh rate
 should be used say if the video is encoded at 24fps when the xrandr
 effective rate to be used is say 52.

 Another issues is that MythTV interface to control the refresh rates are
 using short.
 In the US, 24p is really 23.976Hz ; while in PAL countries it would be
 exactly 24Hz.
 Most 24p TV would handle both framerates ; however as this refresh rate is
 so close to 24 .. X11 will only allow you to use on or the other. Not both
 at the same time.

 This patch also adds support for using non integer framerates; like
 23.976Hz or 59.94Hz.

 Call me anal, but there is a difference with all those rates ; and so far
 MythTV couldn't use them.

 As the rate used by mythtv and XRANDR are integers ; those rates weren't
 supported before.

 In MythTV setup -> Appearance, check Separate Video modes for GUI and TV
 playback.
 If for the rate you use "Any" this is when MythTV will try to match the TV
 refresh rate with the video one.

 A new field has been added at the bottom of this configuration screen:
 Custom screen rate definition file.
 Here you enter the path to a text file containing the description of the
 video rate.
 The format of the file is as follow:
 width,height,real_rate,xrandr_rate
 like this:
 #50 - "1920x1080 at 50"
 #51 - "1920x1080 at 60"
 #52 - "1920x1080 at 24"
 #53 - "1920x1080 at 23.976"
 #54 - "1920x1080 at 50i"
 #55 - "1920x1080 at 60i"
 #56 - "1920x1080 at 59.94"
 #57 - "1920x1080 at 59.94i"
 #1920x1080 mode:
 1920,1080,50,50
 1920,1080,60,51
 1920,1080,24,52
 1920,1080,23.976,53
 1920,1080,59.94,56

 this will tell mythtv that to use a 60Hz refresh rate, the 51 xrandr rate
 should be used.
 Note that it handles floating point rates like 1920x1080 @ 23.976Hz.

 If a given resolution is defined in this definition file, it will replace
 the rates automatically calculated by X11.
 MythTV setup screen will also use and display the real rate (24, 50, 60
 etc..) rather than the rate returned by xrandr (50,51,52 etc)...

 I'm sure there should be a way to determine what the real refresh rate is
 from the xrandr ; but I haven't found how yet.

 This patch is for 0.21-fixes only ... Will work on a trunk one soon.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/5643#comment:5>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list