picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
subpicture_t *p_subpic )
{
- video_format_t fmt;
int i_scale_width, i_scale_height;
if( p_pic == NULL )
{
/* XXX: subtitles */
-
return NULL;
}
- fmt.i_aspect = p_vout->output.i_aspect;
- fmt.i_chroma = p_vout->output.i_chroma;
- fmt.i_width = p_vout->output.i_width;
- fmt.i_height = p_vout->output.i_height;
- fmt.i_sar_num = p_vout->output.i_aspect * fmt.i_height / fmt.i_width;
- fmt.i_sar_den = VOUT_ASPECT_FACTOR;
- i_scale_width = p_vout->output.i_width * 1000 / p_vout->render.i_width;
- i_scale_height = p_vout->output.i_height * 1000 / p_vout->render.i_height;
+ i_scale_width = p_vout->fmt_out.i_visible_width * 1000 /
+ p_vout->fmt_in.i_visible_width;
+ i_scale_height = p_vout->fmt_out.i_visible_height * 1000 /
+ p_vout->fmt_in.i_visible_height;
if( p_pic->i_type == DIRECT_PICTURE )
{
* subtitles. */
vout_CopyPicture( p_vout, PP_OUTPUTPICTURE[0], p_pic );
- spu_RenderSubpictures( p_vout->p_spu, &fmt,
+ spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out,
PP_OUTPUTPICTURE[0], p_pic, p_subpic,
i_scale_width, i_scale_height );
/* Picture is in a direct buffer but isn't used by the
* decoder. We can safely render subtitles on it and
* display it. */
- spu_RenderSubpictures( p_vout->p_spu, &fmt, p_pic, p_pic, p_subpic,
- i_scale_width, i_scale_height );
+ spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out, p_pic, p_pic,
+ p_subpic, i_scale_width, i_scale_height );
return p_pic;
}
return NULL;
vout_CopyPicture( p_vout, PP_OUTPUTPICTURE[0], p_pic );
- spu_RenderSubpictures( p_vout->p_spu, &fmt, PP_OUTPUTPICTURE[0],
- p_pic, p_subpic, i_scale_width, i_scale_height);
+ spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out,
+ PP_OUTPUTPICTURE[0], p_pic,
+ p_subpic, i_scale_width, i_scale_height );
if( PP_OUTPUTPICTURE[0]->pf_unlock )
PP_OUTPUTPICTURE[0]->pf_unlock( p_vout, PP_OUTPUTPICTURE[0] );
if( p_tmp_pic->i_status == FREE_PICTURE )
{
vout_AllocatePicture( VLC_OBJECT(p_vout),
- p_tmp_pic, p_vout->output.i_chroma,
- p_vout->output.i_width,
- p_vout->output.i_height,
- p_vout->output.i_aspect );
+ p_tmp_pic, p_vout->fmt_out.i_chroma,
+ p_vout->fmt_out.i_width,
+ p_vout->fmt_out.i_height,
+ p_vout->fmt_out.i_aspect );
p_tmp_pic->i_type = MEMORY_PICTURE;
p_tmp_pic->i_status = RESERVED_PICTURE;
}
p_vout->chroma.pf_convert( p_vout, p_pic, p_tmp_pic );
/* Render subpictures on the first direct buffer */
- spu_RenderSubpictures( p_vout->p_spu, &fmt, p_tmp_pic,
+ spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out, p_tmp_pic,
p_tmp_pic, p_subpic,
i_scale_width, i_scale_height );
p_vout->chroma.pf_convert( p_vout, p_pic, &p_vout->p_picture[0] );
/* Render subpictures on the first direct buffer */
- spu_RenderSubpictures( p_vout->p_spu, &fmt, &p_vout->p_picture[0],
- &p_vout->p_picture[0], p_subpic,
- i_scale_width, i_scale_height );
+ spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out,
+ &p_vout->p_picture[0], &p_vout->p_picture[0],
+ p_subpic, i_scale_width, i_scale_height );
}
if( p_vout->p_picture[0].pf_unlock )
if( (i_width <= 0) || (i_height <=0) )
{
*pi_width = *pi_height = *pi_x = *pi_y = 0;
-
return;
}