+/*****************************************************************************
+ * Builders
+ *****************************************************************************/
+static int BuildChromaResize( filter_t *p_filter )
+{
+ filter_sys_t *p_sys = p_filter->p_sys;
+ es_format_t fmt_mid;
+ int i_ret;
+
+ /* Lets try resizing and then doing the chroma conversion */
+ msg_Dbg( p_filter, "Trying to build resize+chroma" );
+ EsFormatMergeSize( &fmt_mid, &p_filter->fmt_in, &p_filter->fmt_out );
+ i_ret = CreateChain( p_sys->p_chain, &fmt_mid );
+ es_format_Clean( &fmt_mid );
+ if( i_ret == VLC_SUCCESS )
+ return VLC_SUCCESS;
+
+ /* Lets try it the other way arround (chroma and then resize) */
+ msg_Dbg( p_filter, "Trying to build chroma+resize" );
+ EsFormatMergeSize( &fmt_mid, &p_filter->fmt_out, &p_filter->fmt_in );
+ i_ret = CreateChain( p_sys->p_chain, &fmt_mid );
+ es_format_Clean( &fmt_mid );
+ if( i_ret == VLC_SUCCESS )
+ return VLC_SUCCESS;
+
+ return VLC_EGENERIC;
+}
+
+static int BuildChromaChain( filter_t *p_filter )
+{
+ filter_sys_t *p_sys = p_filter->p_sys;
+ es_format_t fmt_mid;
+ int i_ret;
+ int i;