tepples wrote:
If you can't use blargg's snes_ntsc for whatever reason, here's my recipe for approximate NTSC simulation entirely inside GIMP:
- Image > Mode > RGB
You can't apply most filters in indexed mode. - Image > Scale Image, factor 200%, interpolation None (i.e. nearest neighbor)
Horizontally because each pixel lasts 2/3 of a color subcarrier period, and vertically because each of two fields has its own phase. - Filters > Distorts > Video, 3x3, additive off, rotated on
This encodes the image using pixel-sequential RGB, which has similar but not identical properties to the YUV/YIQ QAM that NTSC uses, with a phase offset from one row to the next similar to that of the NES PPU and Super NES S-PPU. - Filters > Generic > Convolution Matrix, center row [0 1 1 1 0], divisor 1, offset 0, normalize off
This decodes pixel-sequential RGB. - Filters > Blur > Pixelize, width 1, height 2
This blends the even and odd fields. - Image > Scale, width 114%, height 100%, interpolation Linear
This corrects the pixel aspect ratio.
It would probably be more accurate if you convert color spaces so that Red, Green and Blue represent wave heights at different phases.
Okay, got the conversion matrixes:
R' = .905R + .286G - .191B
G' = -.16R + 1.177G - .017B
B' = .152R + .298G + .55B
R = .991R' - .326G' + .333B'
G = .129R' + .801G' + .069B'
B = -.344R' - .344G' + 1.689B'