RetroArch/hqflt/ntsc.c

20 lines
477 B
C
Raw Normal View History

2010-08-28 14:35:52 +00:00
#include "ntsc.h"
#include <stdlib.h>
2010-08-28 14:49:20 +00:00
#include <stdbool.h>
2010-08-28 14:35:52 +00:00
void ntsc_filter(uint16_t * restrict out, const uint16_t * restrict in, int width, int height)
{
static int phase = 0;
2010-08-28 14:49:20 +00:00
static snes_ntsc_t ntsc;
static bool inited = false;
if (inited == false)
2010-08-28 14:45:06 +00:00
{
2010-08-28 14:49:20 +00:00
snes_ntsc_init(&ntsc, &snes_ntsc_composite);
inited = true;
2010-08-28 14:45:06 +00:00
}
2010-08-28 14:35:52 +00:00
2010-08-28 14:49:20 +00:00
snes_ntsc_blit(&ntsc, in, width, phase, width, height, out, SNES_NTSC_OUT_WIDTH(width) * sizeof(uint16_t));
phase ^= 1;
2010-08-28 14:35:52 +00:00
}