From abfc129ef8ea1c1aab406a72cb7f21496f2e69e8 Mon Sep 17 00:00:00 2001 From: James Courtier-Dutton Date: Thu, 5 Sep 2002 05:51:14 +0000 Subject: XV Video out at least loads now and we see the xine logo again. The DVD plugin now loads, but audio and spu info is lost. What happened to xine_get_spu_channel and xine_get_audio_channel? CVS patchset: 2607 CVS date: 2002/09/05 05:51:14 --- src/xine-engine/vo_scale.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src/xine-engine/vo_scale.c') diff --git a/src/xine-engine/vo_scale.c b/src/xine-engine/vo_scale.c index 25ebd7265..3d11ac946 100644 --- a/src/xine-engine/vo_scale.c +++ b/src/xine-engine/vo_scale.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: vo_scale.c,v 1.5 2002/09/04 23:31:13 guenter Exp $ + * $Id: vo_scale.c,v 1.6 2002/09/05 05:51:15 jcdutton Exp $ * * Contains common code to calculate video scaling parameters. * In short, it will map frame dimensions to screen/window size. @@ -97,7 +97,26 @@ void vo_scale_compute_ideal_size (vo_scale_t *this) { default: desired_ratio = 4.0 / 3.0; } - + + corr_factor = this->display_ratio * desired_ratio / image_ratio ; + + if (fabs(corr_factor - 1.0) < 0.005) { + this->ideal_width = this->delivered_width; + this->ideal_height = this->delivered_height; + + } else { + + if (corr_factor >= 1.0) { + this->ideal_width = this->delivered_width * corr_factor + 0.5; + this->ideal_height = this->delivered_height; + } else { + this->ideal_width = this->delivered_width; + this->ideal_height = this->delivered_height / corr_factor + 0.5; + } + } + + +#if 0 this->video_pixel_aspect = desired_ratio / image_ratio; assert (this->gui_pixel_aspect != 0.0); @@ -105,6 +124,7 @@ void vo_scale_compute_ideal_size (vo_scale_t *this) { < 0.005) { this->video_pixel_aspect = this->gui_pixel_aspect; } +#endif #if 0 @@ -343,6 +363,7 @@ void vo_scale_init(vo_scale_t *this, double display_ratio, memset( this, 0, sizeof(vo_scale_t) ); this->display_ratio = display_ratio; + this->gui_pixel_aspect = display_ratio; this->support_zoom = support_zoom; this->scaling_disabled = scaling_disabled; this->force_redraw = 1; -- cgit v1.2.3