Commit 418f6bca authored by Antoine Cellerier's avatar Antoine Cellerier

Remove useless argument to pf_video_blend

We were already blending directly on top of the destination
picture. This simplifies the code and should prevent further
confusion.
parent ff987196
......@@ -59,7 +59,7 @@ struct filter_t
picture_t * ( * pf_video_filter ) ( filter_t *, picture_t * );
block_t * ( * pf_audio_filter ) ( filter_t *, block_t * );
void ( * pf_video_blend ) ( filter_t *, picture_t *,
void ( * pf_video_blend ) ( filter_t *,
picture_t *, picture_t *,
int, int, int );
......
......@@ -124,7 +124,7 @@ VLC_EXPORT( subpicture_region_t *,__spu_MakeRegion, ( vlc_object_t *, video_form
#define spu_DestroyRegion(a,b) __spu_DestroyRegion(VLC_OBJECT(a),b)
VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * ) );
VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t, bool ) );
VLC_EXPORT( void, spu_RenderSubpictures, ( spu_t *, video_format_t *, picture_t *, picture_t *, subpicture_t *, int, int ) );
VLC_EXPORT( void, spu_RenderSubpictures, ( spu_t *, video_format_t *, picture_t *, subpicture_t *, int, int ) );
/** @}*/
......
......@@ -59,7 +59,6 @@ struct demux_sys_t
#ifdef SCREEN_MOUSE
picture_t *p_mouse;
filter_t *p_blend;
picture_t src;
picture_t dst;
#endif
......
......@@ -172,12 +172,6 @@ block_t *screen_Capture( demux_t *p_demux )
vlc_memcpy( p_block->p_buffer, image->data, i_size );
else
{
if( !p_sys->src.i_planes )
vout_InitPicture( p_demux, &p_sys->src,
p_sys->fmt.video.i_chroma,
p_sys->fmt.video.i_width,
p_sys->fmt.video.i_height,
p_sys->fmt.video.i_aspect );
if( !p_sys->dst.i_planes )
vout_InitPicture( p_demux, &p_sys->dst,
p_sys->fmt.video.i_chroma,
......@@ -208,13 +202,10 @@ block_t *screen_Capture( demux_t *p_demux )
}
if( p_sys->p_blend )
{
/* FIXME: why is this memcpy needed?!? (bug in blend?) */
vlc_memcpy( p_block->p_buffer, image->data, i_size );
p_sys->dst.p->p_pixels = p_block->p_buffer;
p_sys->src.p->p_pixels = image->data;
p_sys->p_blend->pf_video_blend( p_sys->p_blend,
&p_sys->dst,
&p_sys->src,
p_sys->p_mouse,
root_x,
root_y,
......
......@@ -2017,7 +2017,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
fmt.i_sar_num = fmt.i_aspect * fmt.i_height / fmt.i_width;
fmt.i_sar_den = VOUT_ASPECT_FACTOR;
spu_RenderSubpictures( p_sys->p_spu, &fmt, p_pic, p_pic, p_subpic,
spu_RenderSubpictures( p_sys->p_spu, &fmt, p_pic, p_subpic,
i_scale_width, i_scale_height );
}
......
This diff is collapsed.
......@@ -240,7 +240,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
mtime_t time = mdate();
for( int i_iter = 0; i_iter < p_sys->i_loops; ++i_iter )
{
p_blend->pf_video_blend( p_blend, p_sys->p_base_image,
p_blend->pf_video_blend( p_blend,
p_sys->p_base_image, p_sys->p_blend_image,
0, 0, p_sys->i_alpha );
}
......
......@@ -587,7 +587,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_inpic )
vout_DatePicture( p_sys->p_vout, p_outpic, p_inpic->date );
if( p_pic )
p_sys->p_blend->pf_video_blend( p_sys->p_blend, p_outpic, p_outpic,
p_sys->p_blend->pf_video_blend( p_sys->p_blend, p_outpic,
p_pic, p_sys->posx, p_sys->posy,
p_logo->i_alpha != -1 ? p_logo->i_alpha
: p_logo_list->i_alpha );
......
......@@ -351,7 +351,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
vout_CopyPicture( p_vout, PP_OUTPUTPICTURE[0], p_pic );
spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out,
PP_OUTPUTPICTURE[0], p_pic, p_subpic,
PP_OUTPUTPICTURE[0], p_subpic,
i_scale_width, i_scale_height );
vout_UnlockPicture( p_vout, PP_OUTPUTPICTURE[0] );
......@@ -378,7 +378,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
vout_CopyPicture( p_vout, PP_OUTPUTPICTURE[0], p_pic );
spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out,
PP_OUTPUTPICTURE[0], p_pic,
PP_OUTPUTPICTURE[0],
p_subpic, i_scale_width, i_scale_height );
vout_UnlockPicture( p_vout, PP_OUTPUTPICTURE[0] );
......@@ -415,7 +415,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
p_vout->p_chroma->pf_video_filter( p_vout->p_chroma, p_pic );
/* Render subpictures on the first direct buffer */
spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out, p_tmp_pic,
spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out,
p_tmp_pic, p_subpic,
i_scale_width, i_scale_height );
......@@ -435,7 +435,7 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
/* Render subpictures on the first direct buffer */
spu_RenderSubpictures( p_vout->p_spu, &p_vout->fmt_out,
&p_vout->p_picture[0], &p_vout->p_picture[0],
&p_vout->p_picture[0],
p_subpic, i_scale_width, i_scale_height );
}
......
......@@ -652,7 +652,7 @@ exit:
}
static void SpuRenderRegion( spu_t *p_spu,
picture_t *p_pic_dst, picture_t *p_pic_src,
picture_t *p_pic_dst,
subpicture_t *p_subpic, subpicture_region_t *p_region,
const int i_scale_width_orig, const int i_scale_height_orig,
const int pi_subpic_x[SCALE_SIZE],
......@@ -923,7 +923,7 @@ static void SpuRenderRegion( spu_t *p_spu,
if( p_spu->p_blend->p_module )
{
p_spu->p_blend->pf_video_blend( p_spu->p_blend, p_pic_dst,
p_pic_src, &p_region->picture, i_x_offset, i_y_offset,
&p_region->picture, i_x_offset, i_y_offset,
i_fade_alpha * p_subpic->i_alpha * p_region->i_alpha / 65025 );
}
else
......@@ -950,7 +950,7 @@ exit:
}
void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
picture_t *p_pic_dst, picture_t *p_pic_src,
picture_t *p_pic_dst,
subpicture_t *p_subpic,
int i_scale_width_orig, int i_scale_height_orig )
{
......@@ -1165,7 +1165,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
for( ; p_region != NULL; p_region = p_region->p_next )
SpuRenderRegion( p_spu, p_pic_dst, p_pic_src,
SpuRenderRegion( p_spu, p_pic_dst,
p_subpic, p_region, i_scale_width_orig, i_scale_height_orig,
pi_subpic_x, pi_scale_width, pi_scale_height,
p_fmt );
......
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