Commit e206fb1c authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Revert change of: VLC_FOURCC('Y','U','V','P') into p_region->fmt.i_chrom on...

Revert change of: VLC_FOURCC('Y','U','V','P') into p_region->fmt.i_chrom on line 449 and fixed some identation for readibility.
parent 295bda2b
......@@ -499,14 +499,16 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
p_spu->p_blend->fmt_out.video.i_y_offset = 0;
p_spu->p_blend->fmt_out.video.i_aspect = p_fmt->i_aspect;
p_spu->p_blend->fmt_out.video.i_chroma = p_fmt->i_chroma;
p_spu->p_blend->fmt_in.video.i_chroma = p_region->fmt.i_chroma;
p_spu->p_blend->fmt_in.video.i_chroma = VLC_FOURCC('Y','U','V','P');
/* FIXME: We'll also be using it for YUVA and RGBA blending ... */
p_spu->p_blend->p_module =
module_Need( p_spu->p_blend, "video blending", 0, 0 );
}
/* Load the text rendering module */
if( !p_spu->p_text && p_region && p_region->fmt.i_chroma == VLC_FOURCC('T','E','X','T') )
if( !p_spu->p_text && p_region &&
( p_region->fmt.i_chroma == VLC_FOURCC('T','E','X','T') ) )
{
char *psz_modulename = NULL;
......@@ -580,21 +582,22 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
/* Set default subpicture aspect ratio */
if( p_region && p_region->fmt.i_aspect &&
(!p_region->fmt.i_sar_num || !p_region->fmt.i_sar_den) )
( !p_region->fmt.i_sar_num || !p_region->fmt.i_sar_den ) )
{
p_region->fmt.i_sar_den = p_region->fmt.i_aspect;
p_region->fmt.i_sar_num = VOUT_ASPECT_FACTOR;
}
if( p_region &&
(!p_region->fmt.i_sar_num || !p_region->fmt.i_sar_den) )
( !p_region->fmt.i_sar_num || !p_region->fmt.i_sar_den ) )
{
p_region->fmt.i_sar_den = p_fmt->i_sar_den;
p_region->fmt.i_sar_num = p_fmt->i_sar_num;
}
/* Take care of the aspect ratio */
if( p_region && p_region->fmt.i_sar_num * p_fmt->i_sar_den !=
p_region->fmt.i_sar_den * p_fmt->i_sar_num )
if( p_region &&
( ( p_region->fmt.i_sar_num * p_fmt->i_sar_den ) !=
( p_region->fmt.i_sar_den * p_fmt->i_sar_num ) ) )
{
i_scale_width = i_scale_width *
(int64_t)p_region->fmt.i_sar_num * p_fmt->i_sar_den /
......@@ -611,6 +614,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
p_spu->p_scale->fmt_out.video.i_chroma =
p_spu->p_scale->fmt_in.video.i_chroma =
VLC_FOURCC('Y','U','V','P');
/* FIXME: We'll also be using it for YUVA and RGBA blending ... */
p_spu->p_scale->fmt_in.video.i_width =
p_spu->p_scale->fmt_in.video.i_height = 32;
p_spu->p_scale->fmt_out.video.i_width =
......@@ -641,7 +646,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
/* Force palette if requested */
if( p_spu->b_force_palette &&
(VLC_FOURCC('Y','U','V','P') == p_region->fmt.i_chroma) )
( VLC_FOURCC('Y','U','V','P') == p_region->fmt.i_chroma ) )
{
memcpy( p_region->fmt.p_palette->palette,
p_spu->palette, 16 );
......@@ -661,9 +666,9 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
}
if( (i_scale_width != 1000 || i_scale_height != 1000) &&
if( ( ( i_scale_width != 1000 ) || ( i_scale_height != 1000 ) ) &&
p_spu->p_scale && !p_region->p_cache &&
VLC_FOURCC('R','G','B','A') != p_region->fmt.i_chroma /* FIXME */ )
( VLC_FOURCC('R','G','B','A') != p_region->fmt.i_chroma /* FIXME */ ) )
{
picture_t *p_pic;
......@@ -703,7 +708,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
free( p_pic );
}
}
if( (i_scale_width != 1000 || i_scale_height != 1000) &&
if( ( ( i_scale_width != 1000 ) || ( i_scale_height != 1000 ) ) &&
p_spu->p_scale && p_region->p_cache )
{
p_region = p_region->p_cache;
......@@ -741,7 +746,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
i_x_offset = __MAX( i_x_offset, 0 );
i_y_offset = __MAX( i_y_offset, 0 );
if( p_spu->i_margin != 0 && p_spu->b_force_crop == VLC_FALSE )
if( p_spu->i_margin != 0 && ( p_spu->b_force_crop == VLC_FALSE ) )
{
int i_diff = 0;
int i_low = i_y_offset - p_spu->i_margin;
......
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