mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Move scaler code over to libretro SDK
This commit is contained in:
parent
790775bc5f
commit
58f09ce79e
@ -123,13 +123,13 @@ OBJ += frontend/frontend.o \
|
|||||||
libretro-sdk/file/config_file.o \
|
libretro-sdk/file/config_file.o \
|
||||||
libretro-sdk/file/config_file_userdata.o \
|
libretro-sdk/file/config_file_userdata.o \
|
||||||
screenshot.o \
|
screenshot.o \
|
||||||
gfx/scaler/scaler.o \
|
libretro-sdk/gfx/scaler/scaler.o \
|
||||||
gfx/shader/shader_null.o \
|
gfx/shader/shader_null.o \
|
||||||
gfx/shader/shader_context.o \
|
gfx/shader/shader_context.o \
|
||||||
gfx/shader/shader_parse.o \
|
gfx/shader/shader_parse.o \
|
||||||
gfx/scaler/pixconv.o \
|
libretro-sdk/gfx/scaler/pixconv.o \
|
||||||
gfx/scaler/scaler_int.o \
|
libretro-sdk/gfx/scaler/scaler_int.o \
|
||||||
gfx/scaler/scaler_filter.o \
|
libretro-sdk/gfx/scaler/scaler_filter.o \
|
||||||
gfx/image/image_rpng.o \
|
gfx/image/image_rpng.o \
|
||||||
gfx/fonts/fonts.o \
|
gfx/fonts/fonts.o \
|
||||||
gfx/filter.o \
|
gfx/filter.o \
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "../driver.h"
|
#include "../driver.h"
|
||||||
#include "../performance.h"
|
#include "../performance.h"
|
||||||
#include <retro_miscellaneous.h>
|
#include <retro_miscellaneous.h>
|
||||||
#include "../gfx/scaler/scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
2
gfx/gl.c
2
gfx/gl.c
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "../driver.h"
|
#include "../driver.h"
|
||||||
#include "../performance.h"
|
#include "../performance.h"
|
||||||
#include "scaler/scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include "image/image.h"
|
#include "image/image.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "fonts/fonts.h"
|
#include "fonts/fonts.h"
|
||||||
#include "math/matrix.h"
|
#include "math/matrix.h"
|
||||||
#include "gfx_context.h"
|
#include "gfx_context.h"
|
||||||
#include "scaler/scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include "fonts/gl_font.h"
|
#include "fonts/gl_font.h"
|
||||||
#include "shader/shader_context.h"
|
#include "shader/shader_context.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
#include "scaler/scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include "gfx_common.h"
|
#include "gfx_common.h"
|
||||||
#include "gfx_context.h"
|
#include "gfx_context.h"
|
||||||
#include "fonts/fonts.h"
|
#include "fonts/fonts.h"
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
|
||||||
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef FILTER_H__
|
|
||||||
#define FILTER_H__
|
|
||||||
|
|
||||||
#include <boolean.h>
|
|
||||||
#include "scaler.h"
|
|
||||||
|
|
||||||
bool scaler_gen_filter(struct scaler_ctx *ctx);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
/* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SCALER_COMMON_H__
|
|
||||||
#define SCALER_COMMON_H__
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
static inline uint8_t clamp_8bit(int val)
|
|
||||||
{
|
|
||||||
if (val > 255)
|
|
||||||
return 255;
|
|
||||||
if (val < 0)
|
|
||||||
return 0;
|
|
||||||
return (uint8_t)val;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,34 +0,0 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
|
||||||
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SCALER_INT_H__
|
|
||||||
#define SCALER_INT_H__
|
|
||||||
|
|
||||||
#include "scaler.h"
|
|
||||||
|
|
||||||
void scaler_argb8888_vert(const struct scaler_ctx *ctx,
|
|
||||||
void *output, int stride);
|
|
||||||
|
|
||||||
void scaler_argb8888_horiz(const struct scaler_ctx *ctx,
|
|
||||||
const void *input, int stride);
|
|
||||||
|
|
||||||
void scaler_argb8888_point_special(const struct scaler_ctx *ctx,
|
|
||||||
void *output, const void *input,
|
|
||||||
int out_width, int out_height,
|
|
||||||
int in_width, int in_height,
|
|
||||||
int out_stride, int in_stride);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
#include "scaler/scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include "gfx_common.h"
|
#include "gfx_common.h"
|
||||||
#include "gfx_context.h"
|
#include "gfx_context.h"
|
||||||
#include "fonts/fonts.h"
|
#include "fonts/fonts.h"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
#include "scaler/scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include "gfx_common.h"
|
#include "gfx_common.h"
|
||||||
#include "gfx_context.h"
|
#include "gfx_context.h"
|
||||||
#include "fonts/fonts.h"
|
#include "fonts/fonts.h"
|
||||||
|
@ -477,10 +477,10 @@ DRIVERS
|
|||||||
/*============================================================
|
/*============================================================
|
||||||
SCALERS
|
SCALERS
|
||||||
============================================================ */
|
============================================================ */
|
||||||
#include "../gfx/scaler/scaler_filter.c"
|
#include "../libretro-sdk/gfx/scaler/scaler_filter.c"
|
||||||
#include "../gfx/scaler/pixconv.c"
|
#include "../libretro-sdk/gfx/scaler/pixconv.c"
|
||||||
#include "../gfx/scaler/scaler.c"
|
#include "../libretro-sdk/gfx/scaler/scaler.c"
|
||||||
#include "../gfx/scaler/scaler_int.c"
|
#include "../libretro-sdk/gfx/scaler/scaler_int.c"
|
||||||
|
|
||||||
/*============================================================
|
/*============================================================
|
||||||
FILTERS
|
FILTERS
|
||||||
|
@ -1,19 +1,26 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
*
|
||||||
* 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-
|
* The following license statement only applies to this file (pixconv.c).
|
||||||
* 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;
|
* Permission is hereby granted, free of charge,
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pixconv.h"
|
#include <gfx/scaler/pixconv.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
@ -1,22 +1,29 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
*
|
||||||
* 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-
|
* The following license statement only applies to this file (scaler.c).
|
||||||
* 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;
|
* Permission is hereby granted, free of charge,
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include "scaler_int.h"
|
#include <gfx/scaler/scaler_int.h>
|
||||||
#include "filter.h"
|
#include <gfx/scaler/filter.h>
|
||||||
#include "pixconv.h"
|
#include <gfx/scaler/pixconv.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
@ -1,21 +1,27 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
*
|
||||||
* 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-
|
* The following license statement only applies to this file (scaler_filter.c).
|
||||||
* 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;
|
* Permission is hereby granted, free of charge,
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <gfx/scaler/filter.h>
|
||||||
#include "filter.h"
|
#include <gfx/scaler/scaler_int.h>
|
||||||
#include "scaler_int.h"
|
|
||||||
#include <retro_miscellaneous.h>
|
#include <retro_miscellaneous.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
@ -1,19 +1,26 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
*
|
||||||
* 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-
|
* The following license statement only applies to this file (scaler_int.c).
|
||||||
* 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;
|
* Permission is hereby granted, free of charge,
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "scaler_int.h"
|
#include <gfx/scaler/scaler_int.h>
|
||||||
|
|
||||||
#ifdef SCALER_NO_SIMD
|
#ifdef SCALER_NO_SIMD
|
||||||
#undef __SSE2__
|
#undef __SSE2__
|
32
libretro-sdk/include/gfx/scaler/filter.h
Normal file
32
libretro-sdk/include/gfx/scaler/filter.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
|
*
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
* The following license statement only applies to this file (filter.h).
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge,
|
||||||
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LIBRETRO_SDK_SCALER_FILTER_H__
|
||||||
|
#define __LIBRETRO_SDK_SCALER_FILTER_H__
|
||||||
|
|
||||||
|
#include <boolean.h>
|
||||||
|
#include <gfx/scaler/scaler.h>
|
||||||
|
|
||||||
|
bool scaler_gen_filter(struct scaler_ctx *ctx);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,22 +1,29 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
*
|
||||||
* 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-
|
* The following license statement only applies to this file (pixconv.h).
|
||||||
* 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;
|
* Permission is hereby granted, free of charge,
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PIXCONV_H__
|
#ifndef __LIBRETRO_SDK_SCALER_PIXCONV_H__
|
||||||
#define PIXCONV_H__
|
#define __LIBRETRO_SDK_SCALER_PIXCONV_H__
|
||||||
|
|
||||||
#include "scaler_common.h"
|
#include <gfx/scaler/scaler_common.h>
|
||||||
|
|
||||||
void conv_0rgb1555_argb8888(void *output, const void *input,
|
void conv_0rgb1555_argb8888(void *output, const void *input,
|
||||||
int width, int height,
|
int width, int height,
|
@ -1,20 +1,27 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
||||||
*
|
*
|
||||||
* 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-
|
* The following license statement only applies to this file (scaler.h).
|
||||||
* 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;
|
* Permission is hereby granted, free of charge,
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
* PURPOSE. See the GNU General Public License for more details.
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
* If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SCALER_H__
|
#ifndef __LIBRETRO_SDK_SCALER_H__
|
||||||
#define SCALER_H__
|
#define __LIBRETRO_SDK_SCALER_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
37
libretro-sdk/include/gfx/scaler/scaler_common.h
Normal file
37
libretro-sdk/include/gfx/scaler/scaler_common.h
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
|
*
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
* The following license statement only applies to this file (scaler_common.h).
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge,
|
||||||
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LIBRETRO_SDK_SCALER_COMMON_H__
|
||||||
|
#define __LIBRETRO_SDK_SCALER_COMMON_H__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
static inline uint8_t clamp_8bit(int val)
|
||||||
|
{
|
||||||
|
if (val > 255)
|
||||||
|
return 255;
|
||||||
|
if (val < 0)
|
||||||
|
return 0;
|
||||||
|
return (uint8_t)val;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
41
libretro-sdk/include/gfx/scaler/scaler_int.h
Normal file
41
libretro-sdk/include/gfx/scaler/scaler_int.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/* Copyright (C) 2010-2014 The RetroArch team
|
||||||
|
*
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
* The following license statement only applies to this file (scaler_int.h).
|
||||||
|
* ---------------------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge,
|
||||||
|
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||||
|
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __LIBRETRO_SDK_SCALER_INT_H__
|
||||||
|
#define __LIBRETRO_SDK_SCALER_INT_H__
|
||||||
|
|
||||||
|
#include <gfx/scaler/scaler.h>
|
||||||
|
|
||||||
|
void scaler_argb8888_vert(const struct scaler_ctx *ctx,
|
||||||
|
void *output, int stride);
|
||||||
|
|
||||||
|
void scaler_argb8888_horiz(const struct scaler_ctx *ctx,
|
||||||
|
const void *input, int stride);
|
||||||
|
|
||||||
|
void scaler_argb8888_point_special(const struct scaler_ctx *ctx,
|
||||||
|
void *output, const void *input,
|
||||||
|
int out_width, int out_height,
|
||||||
|
int in_width, int in_height,
|
||||||
|
int out_stride, int in_stride);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -46,7 +46,7 @@ extern "C" {
|
|||||||
#include "../fifo_buffer.h"
|
#include "../fifo_buffer.h"
|
||||||
#include <rthreads/rthreads.h>
|
#include <rthreads/rthreads.h>
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
#include "../gfx/scaler/scaler.h"
|
#include <gfx/scaler/scaler.h>
|
||||||
#include <file/config_file.h>
|
#include <file/config_file.h>
|
||||||
#include "../audio/utils.h"
|
#include "../audio/utils.h"
|
||||||
#include "ffemu.h"
|
#include "ffemu.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user