mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Cleanups
This commit is contained in:
parent
c0f3c5d083
commit
a9c8cf205d
@ -43,6 +43,27 @@ struct rarch_soft_plug
|
|||||||
const struct softfilter_implementation *impl;
|
const struct softfilter_implementation *impl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct rarch_softfilter
|
||||||
|
{
|
||||||
|
config_file_t *conf;
|
||||||
|
|
||||||
|
const struct softfilter_implementation *impl;
|
||||||
|
void *impl_data;
|
||||||
|
|
||||||
|
struct rarch_soft_plug *plugs;
|
||||||
|
unsigned num_plugs;
|
||||||
|
|
||||||
|
unsigned max_width, max_height;
|
||||||
|
enum retro_pixel_format pix_fmt, out_pix_fmt;
|
||||||
|
|
||||||
|
struct softfilter_work_packet *packets;
|
||||||
|
unsigned threads;
|
||||||
|
|
||||||
|
#ifdef HAVE_THREADS
|
||||||
|
struct filter_thread_data *thread_data;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
#include <rthreads/rthreads.h>
|
#include <rthreads/rthreads.h>
|
||||||
|
|
||||||
@ -84,27 +105,6 @@ static void filter_thread_loop(void *data)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct rarch_softfilter
|
|
||||||
{
|
|
||||||
config_file_t *conf;
|
|
||||||
|
|
||||||
const struct softfilter_implementation *impl;
|
|
||||||
void *impl_data;
|
|
||||||
|
|
||||||
struct rarch_soft_plug *plugs;
|
|
||||||
unsigned num_plugs;
|
|
||||||
|
|
||||||
unsigned max_width, max_height;
|
|
||||||
enum retro_pixel_format pix_fmt, out_pix_fmt;
|
|
||||||
|
|
||||||
struct softfilter_work_packet *packets;
|
|
||||||
unsigned threads;
|
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
|
||||||
struct filter_thread_data *thread_data;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct softfilter_implementation *
|
static const struct softfilter_implementation *
|
||||||
softfilter_find_implementation(rarch_softfilter_t *filt, const char *ident)
|
softfilter_find_implementation(rarch_softfilter_t *filt, const char *ident)
|
||||||
{
|
{
|
||||||
@ -537,7 +537,8 @@ void rarch_softfilter_process(rarch_softfilter_t *filt,
|
|||||||
output, output_stride, input, width, height, input_stride);
|
output, output_stride, input, width, height, input_stride);
|
||||||
|
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
if(filt->threads>1){
|
if (filt->threads > 1)
|
||||||
|
{
|
||||||
/* Fire off workers */
|
/* Fire off workers */
|
||||||
for (i = 0; i < filt->threads; i++)
|
for (i = 0; i < filt->threads; i++)
|
||||||
{
|
{
|
||||||
@ -562,12 +563,10 @@ void rarch_softfilter_process(rarch_softfilter_t *filt,
|
|||||||
scond_wait(filt->thread_data[i].cond, filt->thread_data[i].lock);
|
scond_wait(filt->thread_data[i].cond, filt->thread_data[i].lock);
|
||||||
slock_unlock(filt->thread_data[i].lock);
|
slock_unlock(filt->thread_data[i].lock);
|
||||||
}
|
}
|
||||||
} else {
|
return;
|
||||||
for (i = 0; i < filt->threads; i++)
|
|
||||||
filt->packets[i].work(filt->impl_data, filt->packets[i].thread_data);
|
|
||||||
}
|
}
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < filt->threads; i++)
|
for (i = 0; i < filt->threads; i++)
|
||||||
filt->packets[i].work(filt->impl_data, filt->packets[i].thread_data);
|
filt->packets[i].work(filt->impl_data, filt->packets[i].thread_data);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user