fixed pixels input & output for NTSC filters

This commit is contained in:
ekeeke31 2012-02-01 22:55:42 +00:00
parent 67bed12429
commit cca17c642f
4 changed files with 17 additions and 11 deletions

View File

@ -137,11 +137,11 @@ struct md_ntsc_t {
}
/* x is always zero except in snes_ntsc library */
#ifdef USE_15BPP_RENDERING
#if MD_NTSC_OUT_DEPTH == 15
#define MD_NTSC_RGB_OUT_( rgb_out, x ) {\
rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\
}
#else
#elif MD_NTSC_OUT_DEPTH == 16
#define MD_NTSC_RGB_OUT_( rgb_out, x ) {\
rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\
}

View File

@ -3,18 +3,22 @@
#ifndef MD_NTSC_CONFIG_H
#define MD_NTSC_CONFIG_H
/* Format of source pixels */
/* Format of source & output pixels (RGB555 or RGB565 only)*/
#ifdef USE_15BPP_RENDERING
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB15
#define MD_NTSC_OUT_DEPTH 15
#else
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB16
#define MD_NTSC_OUT_DEPTH 16
#endif
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB16
/* Original CRAM format */
/* Original CRAM format (not used) */
/* #define MD_NTSC_IN_FORMAT MD_NTSC_BGR9 */
/* Type of input pixel values */
/* The following affect the built-in blitter only; a custom blitter can
handle things however it wants. */
/* Type of input pixel values (fixed to 16-bit) */
#define MD_NTSC_IN_T unsigned short
/* Each raw pixel input value is passed through this. You might want to mask

View File

@ -137,11 +137,11 @@ struct sms_ntsc_t {
}
/* x is always zero except in snes_ntsc library */
#ifdef USE_15BPP_RENDERING
#if SMS_NTSC_OUT_DEPTH == 15
#define SMS_NTSC_RGB_OUT_( rgb_out, x ) {\
rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\
}
#else
#elif SMS_NTSC_OUT_DEPTH == 16
#define SMS_NTSC_RGB_OUT_( rgb_out, x) {\
rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\
}

View File

@ -3,20 +3,22 @@
#ifndef SMS_NTSC_CONFIG_H
#define SMS_NTSC_CONFIG_H
/* Format of source pixels */
/* Format of source & output pixels (RGB555 or RGB565 only) */
#ifdef USE_15BPP_RENDERING
#define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB15
#define SMS_NTSC_OUT_DEPTH 15
#else
#define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB16
#define SMS_NTSC_OUT_DEPTH 16
#endif
/* Original CRAM format */
/* Original CRAM format (not used) */
/* #define SMS_NTSC_IN_FORMAT SMS_NTSC_BGR12 */
/* The following affect the built-in blitter only; a custom blitter can
handle things however it wants. */
/* Type of input pixel values */
/* Type of input pixel values (fixed to 16-bit)*/
#define SMS_NTSC_IN_T unsigned short
/* Each raw pixel input value is passed through this. You might want to mask