diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index b05bd4332d..111e1bbb0f 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -22,10 +22,6 @@ #include "video_driver.h" -#ifdef HAVE_CONFIG_H -#include "../config.h" -#endif - RETRO_BEGIN_DECLS #ifndef MAX_EGLIMAGE_TEXTURES diff --git a/gfx/video_filter.h b/gfx/video_filter.h index d8af27ad47..5921657b78 100644 --- a/gfx/video_filter.h +++ b/gfx/video_filter.h @@ -22,6 +22,7 @@ #include #define RARCH_SOFTFILTER_THREADS_AUTO 0 + typedef struct rarch_softfilter rarch_softfilter_t; rarch_softfilter_t *rarch_softfilter_new(const char *filter_path, diff --git a/gfx/video_frame.c b/gfx/video_frame.c index 4ccd8ba441..c1fca69aab 100644 --- a/gfx/video_frame.c +++ b/gfx/video_frame.c @@ -13,6 +13,8 @@ * If not, see . */ +#include + #include #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"); diff --git a/gfx/video_frame.h b/gfx/video_frame.h index 452ef76a26..da1ecfea7f 100644 --- a/gfx/video_frame.h +++ b/gfx/video_frame.h @@ -17,18 +17,19 @@ #define _VIDEO_FRAME_H #include +#include -#include +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