mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Cleanups
This commit is contained in:
parent
6f23a8ac0d
commit
b4d75fbafd
@ -22,10 +22,6 @@
|
|||||||
|
|
||||||
#include "video_driver.h"
|
#include "video_driver.h"
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "../config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RETRO_BEGIN_DECLS
|
RETRO_BEGIN_DECLS
|
||||||
|
|
||||||
#ifndef MAX_EGLIMAGE_TEXTURES
|
#ifndef MAX_EGLIMAGE_TEXTURES
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
|
|
||||||
#define RARCH_SOFTFILTER_THREADS_AUTO 0
|
#define RARCH_SOFTFILTER_THREADS_AUTO 0
|
||||||
|
|
||||||
typedef struct rarch_softfilter rarch_softfilter_t;
|
typedef struct rarch_softfilter rarch_softfilter_t;
|
||||||
|
|
||||||
rarch_softfilter_t *rarch_softfilter_new(const char *filter_path,
|
rarch_softfilter_t *rarch_softfilter_new(const char *filter_path,
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <gfx/scaler/scaler.h>
|
||||||
|
|
||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
|
|
||||||
#include "../performance_counters.h"
|
#include "../performance_counters.h"
|
||||||
@ -21,12 +23,14 @@
|
|||||||
#include "video_frame.h"
|
#include "video_frame.h"
|
||||||
|
|
||||||
void video_frame_convert_rgb16_to_rgb32(
|
void video_frame_convert_rgb16_to_rgb32(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output,
|
void *output,
|
||||||
const void *input,
|
const void *input,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
int in_pitch)
|
int in_pitch)
|
||||||
{
|
{
|
||||||
|
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
|
||||||
|
|
||||||
if (width != scaler->in_width || height != scaler->in_height)
|
if (width != scaler->in_width || height != scaler->in_height)
|
||||||
{
|
{
|
||||||
scaler->in_width = width;
|
scaler->in_width = width;
|
||||||
@ -46,7 +50,7 @@ void video_frame_convert_rgb16_to_rgb32(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void video_frame_scale(
|
void video_frame_scale(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output,
|
void *output,
|
||||||
const void *input,
|
const void *input,
|
||||||
enum scaler_pix_fmt format,
|
enum scaler_pix_fmt format,
|
||||||
@ -57,6 +61,8 @@ void video_frame_scale(
|
|||||||
unsigned height,
|
unsigned height,
|
||||||
unsigned pitch)
|
unsigned pitch)
|
||||||
{
|
{
|
||||||
|
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
width != (unsigned)scaler->in_width
|
width != (unsigned)scaler->in_width
|
||||||
|| height != (unsigned)scaler->in_height
|
|| height != (unsigned)scaler->in_height
|
||||||
@ -80,7 +86,7 @@ void video_frame_scale(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void video_frame_record_scale(
|
void video_frame_record_scale(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output,
|
void *output,
|
||||||
const void *input,
|
const void *input,
|
||||||
unsigned scaler_width,
|
unsigned scaler_width,
|
||||||
@ -91,6 +97,8 @@ void video_frame_record_scale(
|
|||||||
unsigned pitch,
|
unsigned pitch,
|
||||||
bool bilinear)
|
bool bilinear)
|
||||||
{
|
{
|
||||||
|
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
width != (unsigned)scaler->in_width
|
width != (unsigned)scaler->in_width
|
||||||
|| height != (unsigned)scaler->in_height
|
|| height != (unsigned)scaler->in_height
|
||||||
@ -114,10 +122,12 @@ void video_frame_record_scale(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void video_frame_convert_argb8888_to_abgr8888(
|
void video_frame_convert_argb8888_to_abgr8888(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output, const void *input,
|
void *output, const void *input,
|
||||||
int width, int height, int in_pitch)
|
int width, int height, int in_pitch)
|
||||||
{
|
{
|
||||||
|
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
|
||||||
|
|
||||||
if (width != scaler->in_width || height != scaler->in_height)
|
if (width != scaler->in_width || height != scaler->in_height)
|
||||||
{
|
{
|
||||||
scaler->in_width = width;
|
scaler->in_width = width;
|
||||||
@ -136,11 +146,13 @@ void video_frame_convert_argb8888_to_abgr8888(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void video_frame_convert_to_bgr24(
|
void video_frame_convert_to_bgr24(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output, const void *input,
|
void *output, const void *input,
|
||||||
int width, int height, int in_pitch,
|
int width, int height, int in_pitch,
|
||||||
bool bgr24)
|
bool bgr24)
|
||||||
{
|
{
|
||||||
|
struct scaler_ctx *scaler = (struct scaler_ctx*)data;
|
||||||
|
|
||||||
scaler->in_width = width;
|
scaler->in_width = width;
|
||||||
scaler->in_height = height;
|
scaler->in_height = height;
|
||||||
scaler->out_width = width;
|
scaler->out_width = width;
|
||||||
@ -179,11 +191,12 @@ void video_frame_convert_rgba_to_bgr(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool video_pixel_frame_scale(
|
bool video_pixel_frame_scale(
|
||||||
struct scaler_ctx *scaler,
|
void *scaler_data,
|
||||||
void *output, const void *data,
|
void *output, const void *data,
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
size_t pitch)
|
size_t pitch)
|
||||||
{
|
{
|
||||||
|
struct scaler_ctx *scaler = (struct scaler_ctx*)scaler_data;
|
||||||
static struct retro_perf_counter video_frame_conv = {0};
|
static struct retro_perf_counter video_frame_conv = {0};
|
||||||
|
|
||||||
performance_counter_init(&video_frame_conv, "video_frame_conv");
|
performance_counter_init(&video_frame_conv, "video_frame_conv");
|
||||||
|
@ -17,18 +17,19 @@
|
|||||||
#define _VIDEO_FRAME_H
|
#define _VIDEO_FRAME_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <retro_common_api.h>
|
||||||
|
|
||||||
#include <gfx/scaler/scaler.h>
|
RETRO_BEGIN_DECLS
|
||||||
|
|
||||||
void video_frame_convert_rgb16_to_rgb32(
|
void video_frame_convert_rgb16_to_rgb32(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output,
|
void *output,
|
||||||
const void *input,
|
const void *input,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
int in_pitch);
|
int in_pitch);
|
||||||
|
|
||||||
void video_frame_scale(
|
void video_frame_scale(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output,
|
void *output,
|
||||||
const void *input,
|
const void *input,
|
||||||
enum scaler_pix_fmt format,
|
enum scaler_pix_fmt format,
|
||||||
@ -40,7 +41,7 @@ void video_frame_scale(
|
|||||||
unsigned pitch);
|
unsigned pitch);
|
||||||
|
|
||||||
void video_frame_record_scale(
|
void video_frame_record_scale(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output,
|
void *output,
|
||||||
const void *input,
|
const void *input,
|
||||||
unsigned scaler_width,
|
unsigned scaler_width,
|
||||||
@ -52,12 +53,12 @@ void video_frame_record_scale(
|
|||||||
bool bilinear);
|
bool bilinear);
|
||||||
|
|
||||||
void video_frame_convert_argb8888_to_abgr8888(
|
void video_frame_convert_argb8888_to_abgr8888(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output, const void *input,
|
void *output, const void *input,
|
||||||
int width, int height, int in_pitch);
|
int width, int height, int in_pitch);
|
||||||
|
|
||||||
void video_frame_convert_to_bgr24(
|
void video_frame_convert_to_bgr24(
|
||||||
struct scaler_ctx *scaler,
|
void *data,
|
||||||
void *output, const void *input,
|
void *output, const void *input,
|
||||||
int width, int height, int in_pitch,
|
int width, int height, int in_pitch,
|
||||||
bool bgr24);
|
bool bgr24);
|
||||||
@ -68,10 +69,12 @@ void video_frame_convert_rgba_to_bgr(
|
|||||||
unsigned width);
|
unsigned width);
|
||||||
|
|
||||||
bool video_pixel_frame_scale(
|
bool video_pixel_frame_scale(
|
||||||
struct scaler_ctx *scaler,
|
void *scaler_data,
|
||||||
void *output,
|
void *output,
|
||||||
const void *data,
|
const void *data,
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
size_t pitch);
|
size_t pitch);
|
||||||
|
|
||||||
|
RETRO_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user