/*****************************************************************************
* croppadd.c: Crop/Padd image filter
*****************************************************************************
- * Copyright (C) 2008 the VideoLAN team
+ * Copyright (C) 2008 VLC authors and VideoLAN
* $Id$
*
* Authors: Antoine Cellerier <dionoea @t videolan dot org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
#include <vlc_common.h>
#include <vlc_plugin.h>
-#include "vlc_filter.h"
+#include <vlc_filter.h>
#include "filter_picture.h"
/****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin ()
+ set_shortname( N_("Cropadd") )
set_description( N_("Video scaling filter") )
set_capability( "video filter2", 0 )
set_callbacks( OpenFilter, CloseFilter )
+ set_category( CAT_VIDEO )
+ set_subcategory( SUBCAT_VIDEO_VFILTER );
+
set_section( N_("Crop"), NULL )
- add_integer_with_range( CFG_PREFIX "croptop", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "croptop", 0, 0, INT_MAX,
CROPTOP_TEXT, CROPTOP_LONGTEXT, false )
- add_integer_with_range( CFG_PREFIX "cropbottom", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "cropbottom", 0, 0, INT_MAX,
CROPBOTTOM_TEXT, CROPBOTTOM_LONGTEXT, false )
- add_integer_with_range( CFG_PREFIX "cropleft", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "cropleft", 0, 0, INT_MAX,
CROPLEFT_TEXT, CROPLEFT_LONGTEXT, false )
- add_integer_with_range( CFG_PREFIX "cropright", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "cropright", 0, 0, INT_MAX,
CROPRIGHT_TEXT, CROPRIGHT_LONGTEXT, false )
set_section( N_("Padd"), NULL )
- add_integer_with_range( CFG_PREFIX "paddtop", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "paddtop", 0, 0, INT_MAX,
PADDTOP_TEXT, PADDTOP_LONGTEXT, false )
- add_integer_with_range( CFG_PREFIX "paddbottom", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "paddbottom", 0, 0, INT_MAX,
PADDBOTTOM_TEXT, PADDBOTTOM_LONGTEXT, false )
- add_integer_with_range( CFG_PREFIX "paddleft", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "paddleft", 0, 0, INT_MAX,
PADDLEFT_TEXT, PADDLEFT_LONGTEXT, false )
- add_integer_with_range( CFG_PREFIX "paddright", 0, 0, INT_MAX, NULL,
+ add_integer_with_range( CFG_PREFIX "paddright", 0, 0, INT_MAX,
PADDRIGHT_TEXT, PADDRIGHT_LONGTEXT, false )
vlc_module_end ()
p_in += i_ycrop * p_plane->i_pitch;
/* Padd on the top */
- vlc_memset( p_out, i_padd_color, i_ypadd * p_outplane->i_pitch );
+ memset( p_out, i_padd_color, i_ypadd * p_outplane->i_pitch );
p_out += i_ypadd * p_outplane->i_pitch;
int i_line;
p_in += i_xcrop * i_pixel_pitch;
/* Padd on the left */
- vlc_memset( p_out, i_padd_color, i_xpadd * i_pixel_pitch );
+ memset( p_out, i_padd_color, i_xpadd * i_pixel_pitch );
p_out += i_xpadd * i_pixel_pitch;
/* Copy the image and crop on the right */
- vlc_memcpy( p_out, p_in, i_width * i_pixel_pitch );
+ memcpy( p_out, p_in, i_width * i_pixel_pitch );
p_out += i_width * i_pixel_pitch;
p_in += i_width * i_pixel_pitch;
/* Padd on the right */
- vlc_memset( p_out, i_padd_color,
+ memset( p_out, i_padd_color,
( i_outwidth - i_xpadd - i_width ) * i_pixel_pitch );
/* Got to begining of the next line */
}
/* Padd on the bottom */
- vlc_memset( p_out, i_padd_color,
+ memset( p_out, i_padd_color,
( i_outheight - i_ypadd - i_height ) * p_outplane->i_pitch );
}