diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-05-16 01:39:02 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-05-16 01:39:02 +0000 |
commit | ef5a89dd68b4636e7a7d2cca8ac25dcb8359be5b (patch) | |
tree | 0c6d27135b9b68f531ce7118128ebfc6fdf35609 /src | |
parent | f501530c0563b7b6f31481549d969bfbaae4da9e (diff) | |
download | xine-lib-ef5a89dd68b4636e7a7d2cca8ac25dcb8359be5b.tar.gz xine-lib-ef5a89dd68b4636e7a7d2cca8ac25dcb8359be5b.tar.bz2 |
i'm commiting some changes to both xine and tvtime cvs to bring them closer.
still just housekeeping.
CVS patchset: 7547
CVS date: 2005/05/16 01:39:02
Diffstat (limited to 'src')
-rw-r--r-- | src/post/deinterlace/deinterlace.c | 2 | ||||
-rw-r--r-- | src/post/deinterlace/deinterlace.h | 8 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/double.c | 9 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/greedy.c | 29 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/greedy2frame.c | 10 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/linear.c | 29 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/linearblend.c | 43 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/plugins.h | 46 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/scalerbob.c | 29 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/vfir.c | 29 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/weave.c | 29 | ||||
-rw-r--r-- | src/post/deinterlace/xine_plugin.c | 26 |
12 files changed, 125 insertions, 164 deletions
diff --git a/src/post/deinterlace/deinterlace.c b/src/post/deinterlace/deinterlace.c index 1f51adcc7..7928c1a64 100644 --- a/src/post/deinterlace/deinterlace.c +++ b/src/post/deinterlace/deinterlace.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2002 Billy Biggs <vektor@dumbterm.net>. + * Copyright (c) 2002, 2005 Billy Biggs <vektor@dumbterm.net>. * * 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 diff --git a/src/post/deinterlace/deinterlace.h b/src/post/deinterlace/deinterlace.h index 71e595c0f..3db336b47 100644 --- a/src/post/deinterlace/deinterlace.h +++ b/src/post/deinterlace/deinterlace.h @@ -106,9 +106,13 @@ struct deinterlace_frame_data_s uint8_t *f3; }; +/** + * Note: second_field is used in xine. For tvtime it should be the same as bottom_field. + */ typedef void (*deinterlace_frame_t)( uint8_t *output, int outstride, deinterlace_frame_data_t *data, - int bottom_field, int second_field, int width, int height ); + int bottom_field, int second_field, + int width, int height ); /** @@ -125,7 +129,7 @@ struct deinterlace_method_s deinterlace_interp_scanline_t interpolate_scanline; deinterlace_copy_scanline_t copy_scanline; deinterlace_frame_t deinterlace_frame; - int delaysfield; /* delays output by one field relative to input */ + int delaysfield; /* xine: this method delays output by one field relative to input */ const char *description[ 10 ]; }; diff --git a/src/post/deinterlace/plugins/double.c b/src/post/deinterlace/plugins/double.c index 6d10fb270..86f2e5210 100644 --- a/src/post/deinterlace/plugins/double.c +++ b/src/post/deinterlace/plugins/double.c @@ -73,12 +73,7 @@ static deinterlace_method_t doublemethod = "" } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void double_plugin_init( void ) -#endif +deinterlace_method_t *double_get_method( void ) { - register_deinterlace_method( &doublemethod ); + return &doublemethod; } - diff --git a/src/post/deinterlace/plugins/greedy.c b/src/post/deinterlace/plugins/greedy.c index 503f8dd34..8acb12c09 100644 --- a/src/post/deinterlace/plugins/greedy.c +++ b/src/post/deinterlace/plugins/greedy.c @@ -4,19 +4,20 @@ * * This code is ported from DScaler: http://deinterlace.sf.net/ * - * 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, or (at your option) - * any later version. + * This library 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 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H @@ -199,12 +200,8 @@ static deinterlace_method_t greedymethod = "deinterlacer from DScaler." } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void greedy_plugin_init( void ) -#endif +deinterlace_method_t *greedy_get_method( void ) { - register_deinterlace_method( &greedymethod ); + return &greedymethod; } diff --git a/src/post/deinterlace/plugins/greedy2frame.c b/src/post/deinterlace/plugins/greedy2frame.c index dac7d488c..2e0f6eeb2 100644 --- a/src/post/deinterlace/plugins/greedy2frame.c +++ b/src/post/deinterlace/plugins/greedy2frame.c @@ -51,7 +51,7 @@ static int GreedyTwoFrameThreshold2 = 8; #include "greedy2frame_template.c" #undef IS_SSE -static deinterlace_method_t greedymethod = +static deinterlace_method_t greedy2framemethod = { "Greedy - 2-frame (DScaler)", "Greedy2Frame", @@ -75,12 +75,8 @@ static deinterlace_method_t greedymethod = "" } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void greedy2frame_plugin_init( void ) -#endif +deinterlace_method_t *greedy2frame_get_method( void ) { - register_deinterlace_method( &greedymethod ); + return &greedy2framemethod; } diff --git a/src/post/deinterlace/plugins/linear.c b/src/post/deinterlace/plugins/linear.c index 8392cf185..4733cfbc8 100644 --- a/src/post/deinterlace/plugins/linear.c +++ b/src/post/deinterlace/plugins/linear.c @@ -1,19 +1,20 @@ /** * Copyright (C) 2002 Billy Biggs <vektor@dumbterm.net>. * - * 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, or (at your option) - * any later version. + * This library 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 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H @@ -75,12 +76,8 @@ static deinterlace_method_t linearmethod = "" } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void linear_plugin_init( void ) -#endif +deinterlace_method_t *linear_get_method( void ) { - register_deinterlace_method( &linearmethod ); + return &linearmethod; } diff --git a/src/post/deinterlace/plugins/linearblend.c b/src/post/deinterlace/plugins/linearblend.c index a0102fba4..10cd11c3a 100644 --- a/src/post/deinterlace/plugins/linearblend.c +++ b/src/post/deinterlace/plugins/linearblend.c @@ -1,24 +1,22 @@ /** - * Linear blend deinterlacing plugin. The algorithm for this filter is based - * on the mythtv sources, which took it from the mplayer sources. + * Linear blend deinterlacing plugin. The idea for this algorithm came + * from the linear blend deinterlacer which originated in the mplayer + * sources. * - * The file is postprocess_template.c in mplayer, and is + * This library 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 of the License, or (at your option) any later version. * - * Copyright (C) 2001-2002 Michael Niedermayer (michaelni@gmx.at) + * This library 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 + * Lesser General Public License for more details. * - * 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 - * (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. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H @@ -362,16 +360,13 @@ static deinterlace_method_t linearblendmethod = "" } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void linearblend_plugin_init( void ) -#endif +deinterlace_method_t *linearblend_get_method( void ) { #ifdef ARCH_X86 if( xine_mm_accel() & MM_ACCEL_X86_MMXEXT ) - register_deinterlace_method( &linearblendmethod_mmxext ); + return &linearblendmethod_mmxext; else #endif - register_deinterlace_method( &linearblendmethod ); + return &linearblendmethod; } + diff --git a/src/post/deinterlace/plugins/plugins.h b/src/post/deinterlace/plugins/plugins.h index b39623bc1..b42c0cbc8 100644 --- a/src/post/deinterlace/plugins/plugins.h +++ b/src/post/deinterlace/plugins/plugins.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2002 Billy Biggs <vektor@dumbterm.net>. + * Copyright (C) 2002, 2004 Billy Biggs <vektor@dumbterm.net>. * * 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 @@ -20,33 +20,27 @@ #define TVTIME_PLUGINS_H_INCLUDED /** - * tvtime has a plugin system for deinterlacer plugins. - * However, at this point it's a bit silly to bother using - * them as 'dynamic' plugins. So, for the standard plugins, - * we allow them to be built into the executable, and their - * initializer methods go here. + * tvtime was going to have a plugin system, but there + * was never any interest in it outside of tvtime, so instead + * we include all deinterlacer methods right in the tvtime + * executable. */ -void greedy_plugin_init( void ); -void greedy2frame_plugin_init( void ); -void twoframe_plugin_init( void ); -void linear_plugin_init( void ); -void weave_plugin_init( void ); -void videobob_plugin_init( void ); -void double_plugin_init( void ); -void linearblend_plugin_init( void ); -void scalerbob_plugin_init( void ); -void simplemo_plugin_init( void ); -void gamedither_plugin_init( void ); -void vfir_plugin_init( void ); +#include <deinterlace.h> -void dscaler_greedy2frame_plugin_init( void ); -void dscaler_twoframe_plugin_init( void ); -void dscaler_greedyh_plugin_init( void ); -void dscaler_greedy_plugin_init( void ); -void dscaler_videobob_plugin_init( void ); -void dscaler_videoweave_plugin_init( void ); -void dscaler_oldgame_plugin_init( void ); -void dscaler_tomsmocomp_plugin_init( void ); +deinterlace_method_t *greedy_get_method( void ); +deinterlace_method_t *greedy2frame_get_method( void ); +deinterlace_method_t *weave_get_method( void ); +deinterlace_method_t *double_get_method( void ); +deinterlace_method_t *linear_get_method( void ); +deinterlace_method_t *scalerbob_get_method( void ); +deinterlace_method_t *linearblend_get_method( void ); +deinterlace_method_t *vfir_get_method( void ); +deinterlace_method_t *dscaler_tomsmocomp_get_method( void ); +deinterlace_method_t *dscaler_greedyh_get_method( void ); +deinterlace_method_t *greedy_get_method( void ); +deinterlace_method_t *weave_get_method( void ); +deinterlace_method_t *weavetff_get_method( void ); +deinterlace_method_t *weavebff_get_method( void ); #endif /* TVTIME_PLUGINS_H_INCLUDED */ diff --git a/src/post/deinterlace/plugins/scalerbob.c b/src/post/deinterlace/plugins/scalerbob.c index a5318b4ea..e20dfd8ae 100644 --- a/src/post/deinterlace/plugins/scalerbob.c +++ b/src/post/deinterlace/plugins/scalerbob.c @@ -3,19 +3,20 @@ * * Copyright (C) 2002 Billy Biggs <vektor@dumbterm.net>. * - * 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, or (at your option) - * any later version. + * This library 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 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ @@ -63,12 +64,8 @@ static deinterlace_method_t scalerbobmethod = "" } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void scalerbob_plugin_init( void ) -#endif +deinterlace_method_t *scalerbob_get_method( void ) { - register_deinterlace_method( &scalerbobmethod ); + return &scalerbobmethod; } diff --git a/src/post/deinterlace/plugins/vfir.c b/src/post/deinterlace/plugins/vfir.c index f96111ce9..9274a5885 100644 --- a/src/post/deinterlace/plugins/vfir.c +++ b/src/post/deinterlace/plugins/vfir.c @@ -6,19 +6,20 @@ * * tvtime port Copyright (C) 2003 Billy Biggs <vektor@dumbterm.net>. * - * 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, or (at your option) - * any later version. + * This library 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 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H @@ -159,12 +160,8 @@ static deinterlace_method_t vfirmethod = "" } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void vfir_plugin_init( void ) -#endif +deinterlace_method_t *vfir_get_method( void ) { - register_deinterlace_method( &vfirmethod ); + return &vfirmethod; } diff --git a/src/post/deinterlace/plugins/weave.c b/src/post/deinterlace/plugins/weave.c index 06b34ad7a..77fe4bfa2 100644 --- a/src/post/deinterlace/plugins/weave.c +++ b/src/post/deinterlace/plugins/weave.c @@ -3,19 +3,20 @@ * * Copyright (C) 2002 Billy Biggs <vektor@dumbterm.net>. * - * 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, or (at your option) - * any later version. + * This library 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 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H @@ -73,12 +74,8 @@ static deinterlace_method_t weavemethod = "" } }; -#ifdef BUILD_TVTIME_PLUGINS -void deinterlace_plugin_init( void ) -#else -void weave_plugin_init( void ) -#endif +deinterlace_method_t *weave_get_method( void ) { - register_deinterlace_method( &weavemethod ); + return &weavemethod; } diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index f35b5b127..a7999585a 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_plugin.c,v 1.38 2005/05/15 02:41:03 miguelfreitas Exp $ + * $Id: xine_plugin.c,v 1.39 2005/05/16 01:39:02 miguelfreitas Exp $ * * advanced video deinterlacer plugin * Jun/2003 by Miguel Freitas @@ -302,24 +302,16 @@ static void *deinterlace_init_plugin(xine_t *xine, void *data) setup_speedy_calls(xine_mm_accel(),0); - linear_plugin_init(); - linearblend_plugin_init(); - greedy_plugin_init(); - greedy2frame_plugin_init(); - weave_plugin_init(); - double_plugin_init(); - vfir_plugin_init(); + register_deinterlace_method( linear_get_method() ); + register_deinterlace_method( linearblend_get_method() ); + register_deinterlace_method( greedy_get_method() ); + register_deinterlace_method( greedy2frame_get_method() ); + register_deinterlace_method( weave_get_method() ); + register_deinterlace_method( double_get_method() ); + register_deinterlace_method( vfir_get_method() ); + register_deinterlace_method( scalerbob_get_method() ); - scalerbob_plugin_init(); - /* - dscaler_greedyh_plugin_init(); - dscaler_twoframe_plugin_init(); - - dscaler_videobob_plugin_init(); - dscaler_videoweave_plugin_init(); - dscaler_tomsmocomp_plugin_init(); - */ filter_deinterlace_methods( config_flags, 5 /*fieldsavailable*/ ); if( !get_num_deinterlace_methods() ) { xprintf(xine, XINE_VERBOSITY_LOG, |