]> git.sesse.net Git - vlc/blob - modules/codec/ffmpeg/swscale.c
Some more seperation of the different ffmpeg based modules. They're now completely...
[vlc] / modules / codec / ffmpeg / swscale.c
1 /*****************************************************************************
2  * swscale.c: scaling and chroma conversion using libswscale
3  *****************************************************************************
4  * Copyright (C) 1999-2008 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *          Gildas Bazin <gbazin@videolan.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 /*****************************************************************************
26  * Preamble
27  *****************************************************************************/
28 #ifdef HAVE_CONFIG_H
29 # include "config.h"
30 #endif
31
32 #include <vlc_common.h>
33 #include <vlc_plugin.h>
34
35 #include "swscale.h"
36
37 /****************************************************************************
38  * Local prototypes
39  ****************************************************************************/
40 static const int pi_mode_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
41 static const char *const ppsz_mode_descriptions[] =
42 { N_("Fast bilinear"), N_("Bilinear"), N_("Bicubic (good quality)"),
43   N_("Experimental"), N_("Nearest neighbour (bad quality)"),
44   N_("Area"), N_("Luma bicubic / chroma bilinear"), N_("Gauss"),
45   N_("SincR"), N_("Lanczos"), N_("Bicubic spline") };
46
47 /*****************************************************************************
48  * Module descriptor
49  *****************************************************************************/
50 vlc_module_begin();
51     set_description( N_("Video scaling filter") );
52     set_capability( "video filter2", 1000 );
53     set_category( CAT_VIDEO );
54     set_subcategory( SUBCAT_VIDEO_VFILTER );
55     set_callbacks( OpenScaler, CloseScaler );
56     add_integer( "swscale-mode", 0, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, true );
57         change_integer_list( pi_mode_values, ppsz_mode_descriptions, 0 );
58 vlc_module_end();