[mythtv-users] ION resolution switching

Andrew Gallatin gallatin at cs.duke.edu
Tue Jun 8 17:29:21 UTC 2010


Andrew Gallatin [gallatin at cs.duke.edu] wrote:
> Hi,
> 
> I'm setting up an Ion front end with 0.23 from MythDora.  It is
> connected to an older 1080p LCD panel.  I'm trying to
> get Myth to change the resolution to 720p (or 480p) to use the TV's
> scaler rather than computers' scaler.  I've ticked "Separate video
> modes for GUI and TV Playback" and setup overrides for 1080 and 720.

I've gone an intstrumented the code, and, unless I'm mistaken, I don't
see how the "separate video modes" can be used for anything other
than switching the frame rate currently.

It seems that the way things work is a table is initialized based on
the contents of the "separate video modes" screen.  Each override is
added to the table based on a key made up of the width, heigh, and
frame rate.  This is done in DisplayRes::Initialize.  Note that
the key is based on the "irate", which seems to always contain
a 0 value for the framerate -- changing the values in the GUI
only seem to change the "orate" frame rate, which is not reflected
in the key.

When videos are played back, the most appropriate mode is chosen in
DisplayRes::SwitchToVideo.  The problem seems to be that the
key is chosen as:

 uint key = DisplayResScreen::CalcKey(iwidth, iheight, frate);

Note frate is a non-zero value that is passed into the routine (eg,
59.9401).  This means the key can never match because the frame rate
is zero when the override table is initialzed.   Since the key
doesn't match, the default mode is used to generate the arguments
to FindBestMatch.   That results in the default size (1920x1080)
being used, regardless of what the actual size of the video
is. This must be a bug..

I've been able to hack around it by using 0 to generate the 
key:

 uint key = DisplayResScreen::CalcKey(iwidth, iheight, 0);



Drew




More information about the mythtv-users mailing list