[mythtv] [PATCH] Updated Patch to fix rounding errors from Aspect
terry1 at beam.ltd.uk
Mon Jan 10 15:21:33 EST 2005
This is an improved version of my patch to fix problems with rounding
errors caused by the X-Servers rounding of the DisplaySize configuration
I have tidied us some more of the Aspect setting code so that:
1. Fill mode works the same from the Global settings and the "W" key.
The fill mode is especially useful when using a 4:3 TV as
2. The Global settings now match the "W" keys operation.
3. The OSD size is set corectly in Fill and other modes.
4. I have included Robert Clark's patch to snap to display size.
5. Aspect setting now remains inforce when changing channel.
Pevious info on the patch:
This patch fixes problems with rounding errors caused by the X-Servers
rounding of the DisplaySize configuration parameter.
The patch also adds a new Aspect setting "Fill" which will take the
incoming Video and "fill" the display with the picture cropping as
In the current MythTv, the Aspect rounding errors, cause the display
size to not exactly match the incomming picture size, even when the
display has the same aspect and number of pixels as the Video being
displayed. This results in some scaling being applied to the Video
stream even when un-necessary.
On my system I am trying to set MythTv to not scale the incoming 720x576
DVB DTV image when displaying on my 720x576 TV display to improve the
display quality. This is especially necessary as an interlaced TV is
being used for output and if any scaling is used motion artifacts start
For information the XServer rounds the DisplaySize configuration
parameter as thus:
Displaysize is set in mi/miscrinit.c
pScreen->mmWidth = (xsize * 254 + dpix * 5) / (dpix * 10);
pScreen->mmHeight = (ysize * 254 + dpiy * 5) / (dpiy * 10);
After using this patch the xorg.conf file's DisplaySize parameter can be
set to: "300 225" for 4:3 and "400 225" for 16:9.
Could someone check this code to make sure it will not break anything ?
The patch works well for me, I now have a good quality picture on my
Via EPIA M10K box with a digital TV source.
Dr Terry Barnaby BEAM Ltd
Phone: +44 1454 324512 Northavon Business Center, Dean Rd
Fax: +44 1454 313172 Yate, Bristol, BS37 5NH, UK
Email: terry at beam.ltd.uk Web: www.beam.ltd.uk
BEAM for: Visually Impaired X-Terminals, Parallel Processing,
"Tandems are twice the fun !"
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12975 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050110/f1162ffe/mythtv-aspect3.bin
More information about the mythtv-dev