View Full Version : Request: Avisynth compatible "NTSC filter"?
Flux
5th November 2009, 09:33
When monitors were too expensive and LCDs too primitive, people used common CRT tube TVs as gaming displays. This was the standard in 80's - 90's. The picture wasn't as good as modern CRT TVs. Connection between console and TV was mostly bad. Consoles had low resolution. Lower than TV's could produce. Compromises had to be made. Especially NTSC TV's (America, Japan area) are famous of their "never the same color" phenomenon. Game graphics were often designed around these flaws. Therefore old console games don't look correct with modern displays. Especially some colors are wrong and "weird".
However, I would like to preserve these TV artifacts because that is the way how people experienced old console games and that is how game developers meant them to be played. That is how I like people to see them when most prefer to look videos instead getting old consoles or do it other ways.
The good thing is that there is "NTSC filter" which mimics old TV artifacts quite well. Probably near perfect. The bad thing is that there is no way to use it for videos unless someone makes for example Avisynth compatible plugin for it. And I'm asking someone to do it. :D
Source code for "NTSC filter" can be found from the link below. It is written with C/C++. There is few for different consoles, but SNES probably would be good because it was quite common and good console.
http://www.fly.net/~ant/libs/ntsc.html
hanfrunz
6th November 2009, 16:59
I looked at the three libs from "Blargg's NTSC Libraries" (Nintendo NES, Nintendo Super NES and Sega Master System/Game Gear). All of them accept RGB in different flavours (6, 9, 12, 15 or 16 bit) but not 24 or 32 bit. If we can only use 16 bit we loose a lot of colors 24bit=16777216 16bit=65536!. So we would need a 24/32bit library...
hanfrunz
setarip_old
8th November 2009, 03:01
@Flux
Hi!Therefore old console games don't look correct with modern displays. Especially some colors are wrong and "weird".There are dozens of emulators out there that accurately reproduce the colors - and TV scanlines, if you like. For those of us who own the original roms and/or eeproms from the original standalone game machines, the (in my opinion) premier emulator, MAME can faithfully reproduce the original colors, resolutions, joystick handling, etc. for these, as well as for myriad console systems.
Therefore, I'd suggest that there's no need to "reinvent the wheel" ;>}
Flux
10th November 2009, 21:57
I looked at the three libs from "Blargg's NTSC Libraries" (Nintendo NES, Nintendo Super NES and Sega Master System/Game Gear). All of them accept RGB in different flavours (6, 9, 12, 15 or 16 bit) but not 24 or 32 bit. If we can only use 16 bit we loose a lot of colors 24bit=16777216 16bit=65536!. So we would need a 24/32bit library...
hanfrunz
Is it possible to use those libs to make it work in 32-bit mode and accept only 16-bit color range? As far as I know, SNES emulators use only 16-bit colors so it is maximum for them, but they run also in 32-bit mode if windowed. So there shouldn't actually be color losses or something.
@Flux
Hi!There are dozens of emulators out there that accurately reproduce the colors - and TV scanlines, if you like. For those of us who own the original roms and/or eeproms from the original standalone game machines, the (in my opinion) premier emulator, MAME can faithfully reproduce the original colors, resolutions, joystick handling, etc. for these, as well as for myriad console systems.
Therefore, I'd suggest that there's no need to "reinvent the wheel" ;>}
Yes. NTSC filter is also used in many emulators, but the point was that I need to use it for videos as post processing. Emulators don't have internal recording features which include filters. They output "raw" pixels. I tried Fraps which doesn't work for me and other solutions are too choppy when I want solid 30 or 60 fps. Emulator internal recording is fast enough because it renders frame by frame to the video file. No frame skipping or anything.
nevragain
11th November 2009, 03:39
I must mention MESS the sister project of MAME that emulates consoles rather then arcade games. It is also designed to be accurate like MAME.
scharfis_brain
11th November 2009, 08:27
@Flux: just put out the video over composite tv-out and capture it simultanously with a TV-Card without adaptive comb filter.
Flux
11th November 2009, 15:37
Nice idea, but don't have TV-card. Would be a lot of work anyway, even if it probably could give better results than software NTSC filter.
LocalH
20th November 2009, 02:33
This would also be interesting to feed "normal" video into, and have it appear like it was video output from the console itself (outside of the other hardware limitations on the console's output). The NES filter is useless for this, as it only accepts native NES palette values (with or without PPU color emphasis bits). As well, the SNES and SMS/Genesis filters are different, as the artifacts generated by each are different enough to warrant separate filters. Thus, if this were to be done, I would recommend porting both. As far as it being 16-bit only, that would at least suffice for a proof-of-concept port, even if one has to temporarily downsample the video and then re-upsample the output. Plus, such a proof-of-concept would still work just fine for postprocessing already-existing "clean" emulator output (since even the SNES tops out at 15-bit color).
scharfis_brain: What you're suggesting will not give the result that Flux wants. These older consoles did not output "legal" NTSC signals, so their artifacts are somewhat different from standard NTSC artifacts For example, even in interlaced mode the Sega Genesis does not exhibit chroma crawl, but instead exhibits a loss of resolution in highly saturated areas as easily seen in the upper left quadrant of the sms_ntsc screenshot. Also, the SNES generates artifacts that are three-phase rather than the standard two-phase NTSC artifacts.
xbox360
10th February 2011, 13:08
Any news on the developement of this NTSC Filter ?
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.