From: Marian Durkovic Date: Fri, 28 Oct 2005 09:15:51 +0000 (+0000) Subject: fix for HDTV-1080 format: window size now correct (1920x1080) X-Git-Tag: 0.8.4~113 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5e15330ddcf933d80aa2b912192a4a94155ad35f;p=vlc fix for HDTV-1080 format: window size now correct (1920x1080) --- diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 7ad7d4b39c..302dbc3041 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -356,6 +356,8 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt ) /* Initialize the dimensions of the video window */ InitWindowSize( p_vout, &p_vout->i_window_width, &p_vout->i_window_height ); + msg_Dbg( p_vout, "Window size: %dx%d", p_vout->i_window_width, + p_vout->i_window_height ); /* Create the vout thread */ p_vout->p_module = module_Need( p_vout, @@ -1256,29 +1258,31 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width, { *pi_width = (int)( i_width * ll_zoom / FP_FACTOR ); *pi_height = (int)( i_width * ll_zoom * VOUT_ASPECT_FACTOR / - p_vout->render.i_aspect / FP_FACTOR ); + p_vout->fmt_in.i_aspect / FP_FACTOR ); return; } else if( i_height > 0 ) { *pi_height = (int)( i_height * ll_zoom / FP_FACTOR ); - *pi_width = (int)( i_height * ll_zoom * p_vout->render.i_aspect / + *pi_width = (int)( i_height * ll_zoom * p_vout->fmt_in.i_aspect / VOUT_ASPECT_FACTOR / FP_FACTOR ); return; } - if( p_vout->render.i_height * p_vout->render.i_aspect - >= p_vout->render.i_width * VOUT_ASPECT_FACTOR ) + if( p_vout->fmt_in.i_visible_height * p_vout->fmt_in.i_aspect + >= p_vout->fmt_in.i_visible_width * VOUT_ASPECT_FACTOR ) { - *pi_width = (int)( p_vout->render.i_height * ll_zoom - * p_vout->render.i_aspect / VOUT_ASPECT_FACTOR / FP_FACTOR ); - *pi_height = (int)( p_vout->render.i_height * ll_zoom / FP_FACTOR ); + *pi_width = (int)( p_vout->fmt_in.i_visible_height * ll_zoom + * p_vout->fmt_in.i_aspect / VOUT_ASPECT_FACTOR / FP_FACTOR ); + *pi_height = (int)( p_vout->fmt_in.i_visible_height * ll_zoom + / FP_FACTOR ); } else { - *pi_width = (int)( p_vout->render.i_width * ll_zoom / FP_FACTOR ); - *pi_height = (int)( p_vout->render.i_width * ll_zoom - * VOUT_ASPECT_FACTOR / p_vout->render.i_aspect / FP_FACTOR ); + *pi_width = (int)( p_vout->fmt_in.i_visible_width * ll_zoom + / FP_FACTOR ); + *pi_height = (int)( p_vout->fmt_in.i_visible_width * ll_zoom + * VOUT_ASPECT_FACTOR / p_vout->fmt_in.i_aspect / FP_FACTOR ); } #undef FP_FACTOR diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c index 1a7c28279c..d1c43b3731 100644 --- a/src/video_output/vout_intf.c +++ b/src/video_output/vout_intf.c @@ -265,7 +265,7 @@ void vout_IntfInit( vout_thread_t *p_vout ) if( !i_aspect_num || !i_aspect_den ) { i_aspect_num = 4; - i_aspect_num = 3; + i_aspect_den = 3; } p_vout->i_par_num = i_aspect_num * 3 * 4; p_vout->i_par_den = i_aspect_den;