This commit is contained in:
twinaphex 2016-09-12 17:29:01 +02:00
parent 6f23a8ac0d
commit b4d75fbafd
4 changed files with 30 additions and 17 deletions

View File

@ -22,10 +22,6 @@
#include "video_driver.h"
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
RETRO_BEGIN_DECLS
#ifndef MAX_EGLIMAGE_TEXTURES

View File

@ -22,6 +22,7 @@
#include <libretro.h>
#define RARCH_SOFTFILTER_THREADS_AUTO 0
typedef struct rarch_softfilter rarch_softfilter_t;
rarch_softfilter_t *rarch_softfilter_new(const char *filter_path,

View File

@ -13,6 +13,8 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <gfx/scaler/scaler.h>
#include <libretro.h>
#include "../performance_counters.h"
@ -21,12 +23,14 @@
#include "video_frame.h"
void video_frame_convert_rgb16_to_rgb32(
struct scaler_ctx *scaler,
void *data,
void *output,
const void *input,
int width, int height,
int in_pitch)
{
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
if (width != scaler->in_width || height != scaler->in_height)
{
scaler->in_width = width;
@ -46,7 +50,7 @@ void video_frame_convert_rgb16_to_rgb32(
}
void video_frame_scale(
struct scaler_ctx *scaler,
void *data,
void *output,
const void *input,
enum scaler_pix_fmt format,
@ -57,6 +61,8 @@ void video_frame_scale(
unsigned height,
unsigned pitch)
{
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
if (
width != (unsigned)scaler->in_width
|| height != (unsigned)scaler->in_height
@ -80,7 +86,7 @@ void video_frame_scale(
}
void video_frame_record_scale(
struct scaler_ctx *scaler,
void *data,
void *output,
const void *input,
unsigned scaler_width,
@ -91,6 +97,8 @@ void video_frame_record_scale(
unsigned pitch,
bool bilinear)
{
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
if (
width != (unsigned)scaler->in_width
|| height != (unsigned)scaler->in_height
@ -114,10 +122,12 @@ void video_frame_record_scale(
}
void video_frame_convert_argb8888_to_abgr8888(
struct scaler_ctx *scaler,
void *data,
void *output, const void *input,
int width, int height, int in_pitch)
{
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
if (width != scaler->in_width || height != scaler->in_height)
{
scaler->in_width = width;
@ -136,11 +146,13 @@ void video_frame_convert_argb8888_to_abgr8888(
}
void video_frame_convert_to_bgr24(
struct scaler_ctx *scaler,
void *data,
void *output, const void *input,
int width, int height, int in_pitch,
bool bgr24)
{
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
scaler->in_width = width;
scaler->in_height = height;
scaler->out_width = width;
@ -179,11 +191,12 @@ void video_frame_convert_rgba_to_bgr(
}
bool video_pixel_frame_scale(
struct scaler_ctx *scaler,
void *scaler_data,
void *output, const void *data,
unsigned width, unsigned height,
size_t pitch)
{
struct scaler_ctx *scaler = (struct scaler_ctx*)scaler_data;
static struct retro_perf_counter video_frame_conv = {0};
performance_counter_init(&video_frame_conv, "video_frame_conv");

View File

@ -17,18 +17,19 @@
#define _VIDEO_FRAME_H
#include <stdint.h>
#include <retro_common_api.h>
#include <gfx/scaler/scaler.h>
RETRO_BEGIN_DECLS
void video_frame_convert_rgb16_to_rgb32(
struct scaler_ctx *scaler,
void *data,
void *output,
const void *input,
int width, int height,
int in_pitch);
void video_frame_scale(
struct scaler_ctx *scaler,
void *data,
void *output,
const void *input,
enum scaler_pix_fmt format,
@ -40,7 +41,7 @@ void video_frame_scale(
unsigned pitch);
void video_frame_record_scale(
struct scaler_ctx *scaler,
void *data,
void *output,
const void *input,
unsigned scaler_width,
@ -52,12 +53,12 @@ void video_frame_record_scale(
bool bilinear);
void video_frame_convert_argb8888_to_abgr8888(
struct scaler_ctx *scaler,
void *data,
void *output, const void *input,
int width, int height, int in_pitch);
void video_frame_convert_to_bgr24(
struct scaler_ctx *scaler,
void *data,
void *output, const void *input,
int width, int height, int in_pitch,
bool bgr24);
@ -68,10 +69,12 @@ void video_frame_convert_rgba_to_bgr(
unsigned width);
bool video_pixel_frame_scale(
struct scaler_ctx *scaler,
void *scaler_data,
void *output,
const void *data,
unsigned width, unsigned height,
size_t pitch);
RETRO_END_DECLS
#endif