RetroArch/hqflt/ntsc.c

17 lines
464 B
C
Raw Normal View History

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