Re: [mythtv] [PATCH] Updated Patch to fix rounding errors from Aspect Ratio settings

2005-01-20 Thread Steve Hayles
Terry,

Don't know if this is completely related to this patch but the
behaviour seems to have changed since applying it.  I am using a DVB-t
card in the UK and on some channels broadcast at 704x576 the image is
still 'compressed' horizontally.

The wrong Mode is being selected in this instance which is easily
remedied by using the W key.  The slightly strange behaviour is that
if I select a channel where this happens with the display compressed
and I then start recording this channel by pressing the R key.  The
display goes blank as normal but then when it starts playing from the
recording the output is automatically scaled correctly.

Great work on the Epia output by the way,  I am getting a better
picture from my Myth box now than I am from a high quality Freeview
box via component video.


On Thu, 20 Jan 2005 07:36:32 +, Terry Barnaby <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> Any other feedback on the last mythtv-aspect3.patch I submitted
> a while ago ?
> It is working well here.
> Can it be put into the CVS tree ?
> 
> Terry
> 
> --
>   Dr Terry Barnaby BEAM Ltd
>   Phone: +44 1454 324512   Northavon Business Center, Dean Rd
>   Fax:   +44 1454 313172   Yate, Bristol, BS37 5NH, UK
>   Email: [EMAIL PROTECTED] Web: www.beam.ltd.uk
>   BEAM for: Visually Impaired X-Terminals, Parallel Processing,
> Software Dev
>  "Tandems are twice the fun !"
> 
> 
> ___
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> 
> 
>
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] Updated Patch to fix rounding errors from Aspect Ratio settings

2005-01-20 Thread Isaac Richards
On Thursday 20 January 2005 02:36 am, Terry Barnaby wrote:
> Hi All,
>
> Any other feedback on the last mythtv-aspect3.patch I submitted
> a while ago ?
> It is working well here.
> Can it be put into the CVS tree ?

I'm testing it right now - will commit shortly.

Isaac
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] Updated Patch to fix rounding errors from Aspect Ratio settings

2005-01-20 Thread Andrew Wilson
The only problem I have seen is with aspect-override switched on to
Fill, sometimes the OSD leaps over to the right by a few inches,
cutting off the right hand edge. Seems to happen when W is pressed for
the first time, but it doesn't always happen.

This bug gets reset once 'watch tv' is restarted.

thanks for the patch - it looks as good as my STB now on my TV.
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] Updated Patch to fix rounding errors from Aspect Ratio settings

2005-01-19 Thread Terry Barnaby
Hi All,
Any other feedback on the last mythtv-aspect3.patch I submitted
a while ago ?
It is working well here.
Can it be put into the CVS tree ?
Terry
--
  Dr Terry Barnaby BEAM Ltd
  Phone: +44 1454 324512   Northavon Business Center, Dean Rd
  Fax:   +44 1454 313172   Yate, Bristol, BS37 5NH, UK
  Email: [EMAIL PROTECTED] Web: www.beam.ltd.uk
  BEAM for: Visually Impaired X-Terminals, Parallel Processing, 
Software Dev
 "Tandems are twice the fun !"
___
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


Re: [mythtv] [PATCH] Updated Patch to fix rounding errors from Aspect Ratio settings

2005-01-10 Thread Terry Barnaby
Hi All,
This is an improved version of my patch to fix problems with rounding 
errors caused by the X-Servers rounding of the DisplaySize configuration 
parameter.

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
output device.
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 
necessary.

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
to appear.

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.
Cheers
Terry
--
  Dr Terry Barnaby BEAM Ltd
  Phone: +44 1454 324512   Northavon Business Center, Dean Rd
  Fax:   +44 1454 313172   Yate, Bristol, BS37 5NH, UK
  Email: [EMAIL PROTECTED] Web: www.beam.ltd.uk
  BEAM for: Visually Impaired X-Terminals, Parallel Processing, 
Software Dev
 "Tandems are twice the fun !"
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp,v
retrieving revision 1.401
diff -u -r1.401 NuppelVideoPlayer.cpp
--- libs/libmythtv/NuppelVideoPlayer.cpp	8 Dec 2004 04:23:16 -	1.401
+++ libs/libmythtv/NuppelVideoPlayer.cpp	10 Jan 2005 18:17:13 -
@@ -1692,7 +1692,7 @@
 if (!disablevideo)
 {
 int dispx = 0, dispy = 0, dispw = video_width, disph = video_height;
-videoOutput->GetDrawSize(dispx, dispy, dispw, disph);
+videoOutput->GetVisibleSize(dispx, dispy, dispw, disph);
 osd = new OSD(video_width, video_height, frame_interval,
   osdfontname, osdccfontname, osdprefix, osdtheme,
   dispx, dispy, dispw, disph);
Index: libs/libmythtv/tv_play.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/tv_play.cpp,v
retrieving revision 1.232
diff -u -r1.232 tv_play.cpp
--- libs/libmythtv/tv_play.cpp	29 Nov 2004 22:04:35 -	1.232
+++ libs/libmythtv/tv_play.cpp	10 Jan 2005 18:17:17 -
@@ -3381,11 +3381,13 @@
 
 switch (letterbox)
 {
-case kLetterbox_4_3: default: text = tr("4:3"); break;
+case kLetterbox_4_3:  text = tr("4:3"); break;
 case kLetterbox_16_9: text = tr("16:9"); break;
 case kLetterbox_4_3_Zoom: text = tr("4:3 Zoom"); break;
 case kLetterbox_16_9_Zoom:text = tr("16:9 Zoom"); break;
 case kLetterbox_16_9_Stretch: text = tr("16:9 Stretch"); break;
+case kLetterbox_Fill: text = tr("Fill"); break;
+default:  text = tr("Off"); break;
 }
 
 if (osd && !browsemode && !osd->IsRunningTreeMenu())
Index: libs/libmythtv/videooutbase.cpp
===
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videooutbase.cpp,v
retrieving revision 1.65
diff -u -r1.65 videooutbase.cpp
--- libs/libmythtv/videooutbase.cpp	2 Dec 2004 06:29:11 -	1.65
+++ libs/libmythtv/videooutbase.cpp	10 Jan 2005 18:17:18 -
@@ -75,7 +75,7 @@
 
 VideoOutput::VideoOutput()
 {
-letterbox = -1;
+letterbox = kLetterbox_Off;
 rpos = 0;
 vpos = 0;
 
@@ -138,8 +138,8 @@
 
 XJ_width = width;
 XJ_height = height;
-XJ_aspect = aspect;
-
+AspectSet(aspect);
+
 QString HorizScanMode = gConte