I've finally finished a release-worthy version of the NES NTSC composite video filter library for use in a NES emulator. This has a ton of improvements and is very efficient. It's written in C and can easily be used from C or C++, and licensed under the GNU LGPL.
nes_ntsc-0.1.6.zip
* Standard TV controls: hue, saturation, contrast, brightness, sharpness
* Extra parameters: custom decoder matrix, adjustable "hue warping" that some TVs employ to keep flesh and sky tones from being off-hue
* Even/odd artifact merging for when host monitor's refresh rate doesn't match emulator's frame rate, or when taking a screenshot. No performance impact.
* Support for user-defined custom blitter, allowing customization of source NES pixel format, output format (32/24/16/15-bit RGB), scanline effects (doubling, darkening, etc.), and platform-specific optimization. Default blitter reads 6-bit NES pixels and writes 16-bit RGB pixels without any scanline effects.
* Built-in horizontal rescaling to proper width, leaving it up to the emulator to double vertically
* Support for PPU emphasis/color tint bits on a per-pixel basis (in custom blitter only)
* All-integer blitter loop for good performance
* Compensation for rounding errors eliminates speckles in solid color areas, even when using 15-bit RGB color output
* Adjustable output width, with presets for showing just the 256 NES pixels, as many will fit within a 640x480 screen (about 8 overscan pixels on each side), and enough to show the proper 15 left and 11 right overscan pixels.
* Includes demo that displays NES image with mouse control of parameters, using SDL multimedia library
* Includes simple benchmark program to find performance on your machine and help with optimizing a custom blitter
* Includes better documentation
Thanks to everyone who contributed or gave feedback. Reply here with any questions about using it in an emulator.
nes_ntsc-0.1.6.zip
* Standard TV controls: hue, saturation, contrast, brightness, sharpness
* Extra parameters: custom decoder matrix, adjustable "hue warping" that some TVs employ to keep flesh and sky tones from being off-hue
* Even/odd artifact merging for when host monitor's refresh rate doesn't match emulator's frame rate, or when taking a screenshot. No performance impact.
* Support for user-defined custom blitter, allowing customization of source NES pixel format, output format (32/24/16/15-bit RGB), scanline effects (doubling, darkening, etc.), and platform-specific optimization. Default blitter reads 6-bit NES pixels and writes 16-bit RGB pixels without any scanline effects.
* Built-in horizontal rescaling to proper width, leaving it up to the emulator to double vertically
* Support for PPU emphasis/color tint bits on a per-pixel basis (in custom blitter only)
* All-integer blitter loop for good performance
* Compensation for rounding errors eliminates speckles in solid color areas, even when using 15-bit RGB color output
* Adjustable output width, with presets for showing just the 256 NES pixels, as many will fit within a 640x480 screen (about 8 overscan pixels on each side), and enough to show the proper 15 left and 11 right overscan pixels.
* Includes demo that displays NES image with mouse control of parameters, using SDL multimedia library
* Includes simple benchmark program to find performance on your machine and help with optimizing a custom blitter
* Includes better documentation
Thanks to everyone who contributed or gave feedback. Reply here with any questions about using it in an emulator.