From 6fd54d9659aa556fede955f1d242dc10de448dfa Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 2 May 2014 19:12:56 +0200 Subject: [PATCH] Split up softfilter struct definitions into separate header file - so as to make it not part of the softfilter API header --- gfx/filters/2xbr.c | 38 +++++++++++------------ gfx/filters/2xsai.c | 2 ++ gfx/filters/blargg_ntsc_snes_composite.c | 2 ++ gfx/filters/blargg_ntsc_snes_rf.c | 2 ++ gfx/filters/blargg_ntsc_snes_rgb.c | 2 ++ gfx/filters/blargg_ntsc_snes_svideo.c | 2 ++ gfx/filters/darken.c | 2 ++ gfx/filters/epx.c | 2 ++ gfx/filters/scale2x.c | 2 ++ gfx/filters/softfilter.h | 22 ------------- gfx/filters/softfilter_prototypes.h | 39 ++++++++++++++++++++++++ gfx/filters/super2xsai.c | 2 ++ gfx/filters/supereagle.c | 2 ++ 13 files changed, 78 insertions(+), 41 deletions(-) create mode 100644 gfx/filters/softfilter_prototypes.h diff --git a/gfx/filters/2xbr.c b/gfx/filters/2xbr.c index ca3a6b9384..74af6503bf 100644 --- a/gfx/filters/2xbr.c +++ b/gfx/filters/2xbr.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -14,35 +15,34 @@ */ /* - Hyllian's 2xBR v3.3a - - Copyright (C) 2011, 2014 Hyllian/Jararaca - sergiogdb@gmail.com - - 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. - + * Hyllian's 2xBR v3.3a + * Copyright (C) 2011, 2014 Hyllian/Jararaca - sergiogdb@gmail.com + * + * 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. */ // Compile: gcc -o twoxbr.so -shared twoxbr.c -std=c99 -O3 -Wall -pedantic -fPIC #include "softfilter.h" +#include "softfilter_prototypes.h" #include #ifdef RARCH_INTERNAL #define softfilter_get_implementation twoxbr_get_implementation #endif - + #define TWOXBR_SCALE 2 static unsigned twoxbr_generic_input_fmts(void) diff --git a/gfx/filters/2xsai.c b/gfx/filters/2xsai.c index 8286a2e39e..e963995ee9 100644 --- a/gfx/filters/2xsai.c +++ b/gfx/filters/2xsai.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -16,6 +17,7 @@ // Compile: gcc -o twoxsai.so -shared twoxsai.c -std=c99 -O3 -Wall -pedantic -fPIC #include "softfilter.h" +#include "softfilter_prototypes.h" #include #ifdef RARCH_INTERNAL diff --git a/gfx/filters/blargg_ntsc_snes_composite.c b/gfx/filters/blargg_ntsc_snes_composite.c index 3e4a562762..225c1bdf10 100755 --- a/gfx/filters/blargg_ntsc_snes_composite.c +++ b/gfx/filters/blargg_ntsc_snes_composite.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -14,6 +15,7 @@ */ #include "softfilter.h" +#include "softfilter_prototypes.h" #include #include "boolean.h" diff --git a/gfx/filters/blargg_ntsc_snes_rf.c b/gfx/filters/blargg_ntsc_snes_rf.c index 51abf91a41..b9e912cbd4 100755 --- a/gfx/filters/blargg_ntsc_snes_rf.c +++ b/gfx/filters/blargg_ntsc_snes_rf.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -14,6 +15,7 @@ */ #include "softfilter.h" +#include "softfilter_prototypes.h" #include #include "boolean.h" diff --git a/gfx/filters/blargg_ntsc_snes_rgb.c b/gfx/filters/blargg_ntsc_snes_rgb.c index d14406b647..0052aa3cc9 100755 --- a/gfx/filters/blargg_ntsc_snes_rgb.c +++ b/gfx/filters/blargg_ntsc_snes_rgb.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -14,6 +15,7 @@ */ #include "softfilter.h" +#include "softfilter_prototypes.h" #include #include "boolean.h" diff --git a/gfx/filters/blargg_ntsc_snes_svideo.c b/gfx/filters/blargg_ntsc_snes_svideo.c index 9f33955a14..fe7b2052ec 100755 --- a/gfx/filters/blargg_ntsc_snes_svideo.c +++ b/gfx/filters/blargg_ntsc_snes_svideo.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -14,6 +15,7 @@ */ #include "softfilter.h" +#include "softfilter_prototypes.h" #include #include "boolean.h" diff --git a/gfx/filters/darken.c b/gfx/filters/darken.c index 0156173875..f9ae7c7333 100644 --- a/gfx/filters/darken.c +++ b/gfx/filters/darken.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -18,6 +19,7 @@ // Useless filter, just nice as a reference for other filters. #include "softfilter.h" +#include "softfilter_prototypes.h" #include #ifdef RARCH_INTERNAL diff --git a/gfx/filters/epx.c b/gfx/filters/epx.c index ee2941728f..54f3357496 100644 --- a/gfx/filters/epx.c +++ b/gfx/filters/epx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -16,6 +17,7 @@ // Compile: gcc -o epx.so -shared epx.c -std=c99 -O3 -Wall -pedantic -fPIC #include "softfilter.h" +#include "softfilter_prototypes.h" #include #ifdef RARCH_INTERNAL diff --git a/gfx/filters/scale2x.c b/gfx/filters/scale2x.c index 309a6bac0d..a0eba169d2 100644 --- a/gfx/filters/scale2x.c +++ b/gfx/filters/scale2x.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -16,6 +17,7 @@ // Compile: gcc -o scale2x.so -shared scale2x.c -std=c99 -O3 -Wall -pedantic -fPIC #include "softfilter.h" +#include "softfilter_prototypes.h" #include #ifdef RARCH_INTERNAL diff --git a/gfx/filters/softfilter.h b/gfx/filters/softfilter.h index 1a372fc8ab..31761bbd54 100644 --- a/gfx/filters/softfilter.h +++ b/gfx/filters/softfilter.h @@ -103,28 +103,6 @@ typedef void (*softfilter_get_work_packets_t)(void *data, typedef unsigned (*softfilter_query_num_threads_t)(void *data); ///// -struct softfilter_thread_data -{ - void *out_data; - const void *in_data; - size_t out_pitch; - size_t in_pitch; - unsigned colfmt; - unsigned width; - unsigned height; - int first; - int first_second; - int last; - int last_second; -}; - -struct filter_data -{ - unsigned threads; - struct softfilter_thread_data *workers; - unsigned in_fmt; -}; - struct softfilter_implementation { softfilter_query_input_formats_t query_input_formats; diff --git a/gfx/filters/softfilter_prototypes.h b/gfx/filters/softfilter_prototypes.h new file mode 100644 index 0000000000..0a0809e080 --- /dev/null +++ b/gfx/filters/softfilter_prototypes.h @@ -0,0 +1,39 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis + * + * RetroArch 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 Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch 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 RetroArch. + * If not, see . + */ + +#ifndef _RARCH_SOFTFILTER_PROTOTYPES_H +#define _RARCH_SOFTFILTER_PROTOTYPES_H + +struct softfilter_thread_data +{ + void *out_data; + const void *in_data; + size_t out_pitch; + size_t in_pitch; + unsigned colfmt; + unsigned width; + unsigned height; + int first; + int last; +}; + +struct filter_data +{ + unsigned threads; + struct softfilter_thread_data *workers; + unsigned in_fmt; +}; +#endif diff --git a/gfx/filters/super2xsai.c b/gfx/filters/super2xsai.c index 0f37f77bec..c51a3a8799 100644 --- a/gfx/filters/super2xsai.c +++ b/gfx/filters/super2xsai.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2010-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -16,6 +17,7 @@ // Compile: gcc -o supertwoxsai.so -shared supertwoxsai.c -std=c99 -O3 -Wall -pedantic -fPIC #include "softfilter.h" +#include "softfilter_prototypes.h" #include #ifdef RARCH_INTERNAL diff --git a/gfx/filters/supereagle.c b/gfx/filters/supereagle.c index 7fb7c08d6b..d83bb6378e 100644 --- a/gfx/filters/supereagle.c +++ b/gfx/filters/supereagle.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2014 - Daniel De Matteis * * RetroArch 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 Found- @@ -16,6 +17,7 @@ // Compile: gcc -o supereagle.so -shared supereagle.c -std=c99 -O3 -Wall -pedantic -fPIC #include "softfilter.h" +#include "softfilter_prototypes.h" #include #ifdef RARCH_INTERNAL