Commit ff375771 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/video_output.c, modules/codec/ogt: got rid of vout_AspectRatio().

parent d2b5c3ac
......@@ -291,16 +291,6 @@ struct subpicture_t
/*****************************************************************************
* Prototypes
*****************************************************************************/
/**
* vout_AspectRatio
*
* Set the i_aspect_x and i_aspect_y from the encoded aspect ratio i_aspect.
* \param i_aspect the encoded aspect ratio
* \param i_aspect_x the decoded x-axis portion of i_aspect. This is set.
* \param i_aspect_y the decoded y-axis portion of i_aspect This is set.
*/
VLC_EXPORT( void, vout_AspectRatio, ( unsigned int i_aspect, unsigned int *i_aspect_x, unsigned int *i_aspect_y ) );
/**
* vout_CopyPicture
*
......
......@@ -2,7 +2,7 @@
* Common SVCD and CVD subtitle routines.
*****************************************************************************
* Copyright (C) 2003, 2004 VideoLAN
* $Id: common.c,v 1.13 2004/02/22 10:52:23 rocky Exp $
* $Id$
*
* Author: Rocky Bernstein <rocky@panix.com>
* based on code from:
......@@ -349,7 +349,7 @@ VCDSubHandleScaling( subpicture_t *p_spu, decoder_t *p_dec )
vlc_object_t * p_input = p_spu->p_sys->p_input;
vout_thread_t *p_vout = vlc_object_find( p_input, VLC_OBJECT_VOUT,
FIND_CHILD );
unsigned int i_aspect_x, i_aspect_y;
int i_aspect_x, i_aspect_y;
uint8_t *p_dest = (uint8_t *)p_spu->p_sys->p_data;
if (p_vout) {
......@@ -405,11 +405,12 @@ VCDSubHandleScaling( subpicture_t *p_spu, decoder_t *p_dec )
break;
}
/* We get here only for scaled chromas. */
vout_AspectRatio( p_vout->render.i_aspect, &i_aspect_y,
&i_aspect_x );
vlc_reduce( &i_aspect_x, &i_aspect_y, p_vout->render.i_aspect,
VOUT_ASPECT_FACTOR, 0 );
} else {
/* User knows best? */
vout_AspectRatio( i_new_aspect, &i_aspect_x, &i_aspect_y );
vlc_reduce( &i_aspect_x, &i_aspect_y, p_vout->render.i_aspect,
VOUT_ASPECT_FACTOR, 0 );
}
VCDSubScaleX( p_dec, p_spu, i_aspect_x, i_aspect_y );
}
......
......@@ -4,7 +4,7 @@
* by DVD subtitles.
*****************************************************************************
* Copyright (C) 2003, 2004 VideoLAN
* $Id: render.c,v 1.29 2004/02/02 12:53:20 fenrir Exp $
* $Id$
*
* Author: Rocky Bernstein <rocky@panix.com>
* based on code from:
......@@ -1044,10 +1044,10 @@ BlendRV24( vout_thread_t *p_vout, picture_t *p_pic,
int32_t i_x_start, i_y_start, i_x_end, i_y_end;
struct subpicture_sys_t *p_sys = p_spu->p_sys;
unsigned int i_aspect_x, i_aspect_y;
int i_aspect_x, i_aspect_y;
vout_AspectRatio( p_vout->render.i_aspect, &i_aspect_y,
&i_aspect_x );
vlc_reduce( &i_aspect_x, &i_aspect_y, p_vout->render.i_aspect,
VOUT_ASPECT_FACTOR, 0 );
i_xscale = (( p_vout->output.i_width << ASCALE ) * i_aspect_x)
/ (i_aspect_y * p_vout->render.i_width);
......@@ -1336,10 +1336,10 @@ BlendRV32( vout_thread_t *p_vout, picture_t *p_pic,
int32_t i_x_start, i_y_start, i_x_end, i_y_end;
struct subpicture_sys_t *p_sys = p_spu->p_sys;
unsigned int i_aspect_x, i_aspect_y;
int i_aspect_x, i_aspect_y;
vout_AspectRatio( p_vout->render.i_aspect, &i_aspect_y,
&i_aspect_x );
vlc_reduce( &i_aspect_x, &i_aspect_y, p_vout->render.i_aspect,
VOUT_ASPECT_FACTOR, 0 );
i_xscale = (( p_vout->output.i_width << ASCALE ) * i_aspect_x)
/ (i_aspect_y * p_vout->render.i_width);
......@@ -1683,10 +1683,10 @@ BlendRGB2( vout_thread_t *p_vout, picture_t *p_pic,
int i_x_start, i_y_start, i_x_end, i_y_end;
struct subpicture_sys_t *p_sys = p_spu->p_sys;
unsigned int i_aspect_x, i_aspect_y;
int i_aspect_x, i_aspect_y;
vout_AspectRatio( p_vout->render.i_aspect, &i_aspect_y,
&i_aspect_x );
vlc_reduce( &i_aspect_x, &i_aspect_y, p_vout->render.i_aspect,
VOUT_ASPECT_FACTOR, 0 );
i_xscale = (( p_vout->output.i_width << ASCALE ) * i_aspect_x)
/ (i_aspect_y * p_vout->render.i_width);
......
......@@ -63,20 +63,6 @@ static int DeinterlaceCallback( vlc_object_t *, char const *,
static int FilterCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
/**
* vout_AspectRatio
*
* Set the i_aspect_x and i_aspect_y from i_aspect.
*/
void vout_AspectRatio( unsigned int i_aspect,
/*out*/ unsigned int *i_aspect_x,
/*out*/ unsigned int *i_aspect_y )
{
unsigned int i_pgcd = ReduceHeight( i_aspect );
*i_aspect_x = i_aspect / i_pgcd;
*i_aspect_y = VOUT_ASPECT_FACTOR / i_pgcd;
}
/*****************************************************************************
* vout_Request: find a video output thread, create one, or destroy one.
*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment