/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <string.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <vlc/vlc.h>
#include <vlc_sout.h>
filter_sys_t *p_sys;
char *psz_filename;
+ switch( p_filter->fmt_in.video.i_chroma )
+ {
+ case VLC_FOURCC('I','4','2','0'):
+ case VLC_FOURCC('I','Y','U','V'):
+ case VLC_FOURCC('J','4','2','0'):
+ case VLC_FOURCC('Y','V','1','2'):
+
+ case VLC_FOURCC('I','4','2','2'):
+ case VLC_FOURCC('J','4','2','2'):
+ break;
+
+ default:
+ msg_Err( p_filter, "Unsupported input chroma (%4s)",
+ (char*)&(p_filter->fmt_in.video.i_chroma) );
+ return VLC_EGENERIC;
+ }
+
/* Allocate structure */
p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
if( p_filter->p_sys == NULL )
picture_t *p_outpic;
if( !p_pic ) return NULL;
- switch( p_pic->format.i_chroma )
- {
- case VLC_FOURCC('I','4','2','0'):
- case VLC_FOURCC('I','Y','U','V'):
- case VLC_FOURCC('J','4','2','0'):
- case VLC_FOURCC('Y','V','1','2'):
-
- case VLC_FOURCC('I','4','2','2'):
- case VLC_FOURCC('J','4','2','2'):
- break;
- default:
- msg_Warn( p_filter, "Unsupported input chroma (%4s)",
- (char*)&(p_pic->format.i_chroma) );
- if( p_pic->pf_release )
- p_pic->pf_release( p_pic );
- return NULL;
- }
p_outpic = p_filter->pf_vout_buffer_new( p_filter );
if( !p_outpic )
i_height = __MIN( i_visible_lines - i_y - 2, i_height );
/* Make sure that we start at least 2 lines from the top (since our
* bluring algorithm uses the 2 previous lines) */
- y = __MAX(i_y-2,0);
+ y = __MAX(i_y,2);
p_outpix = p_outpic->p[i_plane].p_pixels + (i_y+y)*i_pitch + i_x;
for( ; y < i_height; y++, p_mask += i_mask_pitch, p_outpix += i_pitch )
{