(Scaler) Fix Griffin - we can't have two identical static inline

functions that are named the same because of Griffin
This commit is contained in:
twinaphex 2013-11-20 18:15:44 +01:00
parent ef2bf910c7
commit 82e9048288
5 changed files with 33 additions and 20 deletions

View File

@ -672,16 +672,6 @@ void conv_argb8888_abgr8888(void *output_, const void *input_,
}
}
static inline uint8_t clamp_8bit(int val)
{
if (val > 255)
return 255;
else if (val < 0)
return 0;
else
return val;
}
#define YUV_SHIFT 6
#define YUV_OFFSET (1 << (YUV_SHIFT - 1))
#define YUV_MAT_Y (1 << 6)

View File

@ -16,6 +16,8 @@
#ifndef PIXCONV_H__
#define PIXCONV_H__
#include "scaler_common.h"
void conv_0rgb1555_argb8888(void *output, const void *input,
int width, int height,
int out_stride, int in_stride);

View File

@ -19,6 +19,7 @@
#include <stdint.h>
#include <stddef.h>
#include "../../boolean.h"
#include "scaler_common.h"
#define FILTER_UNITY (1 << 14)

View File

@ -0,0 +1,30 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
* Copyright (C) 2011-2013 - 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__
static inline uint8_t clamp_8bit(int val)
{
if (val > 255)
return 255;
else if (val < 0)
return 0;
else
return (uint8_t)val;
}
#endif

View File

@ -31,16 +31,6 @@ static inline uint64_t build_argb64(uint16_t a, uint16_t r, uint16_t g, uint16_t
return ((uint64_t)a << 48) | ((uint64_t)r << 32) | ((uint64_t)g << 16) | ((uint64_t)b << 0);
}
static inline uint8_t clamp_8bit(int16_t col)
{
if (col > 255)
return 255;
else if (col < 0)
return 0;
else
return (uint8_t)col;
}
// ARGB8888 scaler is split in two:
//
// First, horizontal scaler is applied.