-static void SpuRenderCreateBlend( spu_t *p_spu, vlc_fourcc_t i_chroma, int i_aspect )
-{
- filter_t *p_blend;
-
- assert( !p_spu->p->p_blend );
-
- p_spu->p->p_blend =
- p_blend = vlc_custom_create( p_spu, sizeof(filter_t),
- VLC_OBJECT_GENERIC, "blend" );
- if( !p_blend )
- return;
-
- es_format_Init( &p_blend->fmt_in, VIDEO_ES, 0 );
-
- es_format_Init( &p_blend->fmt_out, VIDEO_ES, 0 );
- p_blend->fmt_out.video.i_x_offset = 0;
- p_blend->fmt_out.video.i_y_offset = 0;
- p_blend->fmt_out.video.i_chroma = i_chroma;
- p_blend->fmt_out.video.i_aspect = i_aspect;
-
- /* The blend module will be loaded when needed with the real
- * input format */
- p_blend->p_module = NULL;
-
- /* */
- vlc_object_attach( p_blend, p_spu );
-}
-static void SpuRenderUpdateBlend( spu_t *p_spu, int i_out_width, int i_out_height,
- const video_format_t *p_in_fmt )
-{
- filter_t *p_blend = p_spu->p->p_blend;
-
- assert( p_blend );
-
- /* */
- if( p_blend->p_module && p_blend->fmt_in.video.i_chroma != p_in_fmt->i_chroma )
- {
- /* The chroma is not the same, we need to reload the blend module
- * XXX to match the old behaviour just test !p_blend->fmt_in.video.i_chroma */
- module_unneed( p_blend, p_blend->p_module );
- p_blend->p_module = NULL;
- }
-
- /* */
- p_blend->fmt_in.video = *p_in_fmt;
-
- /* */
- p_blend->fmt_out.video.i_width =
- p_blend->fmt_out.video.i_visible_width = i_out_width;
- p_blend->fmt_out.video.i_height =
- p_blend->fmt_out.video.i_visible_height = i_out_height;
-
- /* */
- if( !p_blend->p_module )
- p_blend->p_module = module_need( p_blend, "video blending", NULL, false );
-}