Composite video scaler to 720p HDMI with filters - Page 1
Forum section: electronics / projects

author: victor_spa
author_rank: Newbie
timestamp: December 20, 2015, 09:49:04 pm
content: Hi, I'm a software developer, but I've been interested in electronics for almost my entire life.Now I'm designing and etching my own analog, AVR based projects.I've been wondering why there are not composite/rgb to HDMI scalers with CRT filters.I bought a Verilog book on Amazon and yeah.. it seems you have to pump a lot of datato the HDMI bus.The most logical system design to me is kind of a GPU deferred approach.It includes an IC to decode all the possible variations of composite video to digital andsave it to an SRAM through the FPGA. And processing the 720p (1 megapixels) usingseveral modules fetching the input data/texture already saved, using some kind of cache.I guess a critical part is using a double buffer for the output that way you cansend the last result while processing the next frame as GPUs do, while the fpgaretrieves the next frame from the composite video again in a double buffer,and several modules process the current frame buffer to feed onto the next frame.The SRAM is a a bottle neck and doesn't seem even possible usinga regular fpga board you could just buy for a few euros like and Arty.Not to mention the delay between input and output issue.Am I just crazy to consider something like this? I think so.It's a same not to have a product doing this kind of stuff.I guess it would be too expensive and add too much lag.VGA output could be doable? It looks like an alternative.A composite video scaler to VGA.Look at this shader:https://www.shadertoy.com/view/Ms23DRDoesn't it look sexy?Greetings from Spain

author: marshallh
author_rank: Unknown
timestamp: December 20, 2015, 10:40:51 pm
content: The most sensible way is to use a SoC with dedicated video hardware.I've made a FPGA-based HDMI upscaler with CRT effects. Some effects are "easy" to do on a scanline basis and some are very difficult.Consider your screen curvature. Each output scanline contains several actual input scanlines. So you have to buffer them internally, or work much faster.Also, scanlines look better on 1080p, 720p you can get moire artifacts.Also you will require a lot more ram bandwidth. asynchronous SRAM is very slow. SSRAM is much better, but expensive and you migt as well use SDRAM or DDR.As a starting point, trying implementing a small kernel based convolution filter on a static image.

author: Rasz
author_rank: Super Contributor
timestamp: December 20, 2015, 11:56:46 pm
content: Quote from: victor_spa on December 20, 2015, 09:49:04 pmbecause the idea itself is inherently stupidyou are taking perfectly good video and SHIT ALL OVER IT in order to make it look as bad as 30 years ago.

author: NiHaoMike
author_rank: Super Contributor
timestamp: December 20, 2015, 11:56:57 pm
content: How about a Raspberry Pi and a USB video capture device?

author: hamster_nz
author_rank: Super Contributor
timestamp: December 21, 2015, 02:51:53 am
content: Quote from: victor_spa on December 20, 2015, 09:49:04 pmAlthough it is technically feasible to make, there is not a large enough market for them to be cost effective to bring it to market. It would however be a reasonably interesting hobby project...The biggest problem would be deinterlacing and pulldown of the video source, which is particularly tricky to achieve without a lot of resources (at design time and in the hardware). Even commercial products do a poor job of this (e.g playing back NTSC DVDs with PAL output). Have a read ofhttps://en.wikipedia.org/wiki/Deinterlacingandhttps://en.wikipedia.org/wiki/Telecineif interested

author: victor_spa
author_rank: Newbie
timestamp: December 21, 2015, 07:47:40 am
content: I don't think adding scan lines and curvature makes the image look worse.Those artifacts were part of the final image and new generations deserveto see old devices as the were intended to appear on screen.I'll have to ponder how to do it. Quite tricky.Thanks for the answers.

author: miguelvp
author_rank: Super Contributor
timestamp: December 21, 2015, 08:29:46 am
content: Quote from: victor_spa on December 21, 2015, 07:47:40 amIt is possible to do that effect on LCDs, but not using the Composite Video, because it will become a mess as others mentioned.Link to that thread:https://www.eevblog.com/forum/projects/make-use-of-an-old-cga-monitor/msg700329/#msg700329

author: stmdude
author_rank: Frequent Contributor
timestamp: December 29, 2015, 11:16:31 am
content: I've been into retro gaming (and restoration) for a while now, and I've avoided asking this question on the video-game boards I frequent, as the technical know-how there are usually quite a bit lower than over here (for example).Where do you get the idea that scanlines were present on home consoles + CRT TVs? Is it perhaps an NTSC phenomenon? (I'm PAL).Yup, the image was blurry, colors bled, ghosting was present, and some slight barrel-distortion in the corners, but I haven't seen scanlines (as presented by shaders these days) on a PAL CRT TV..( Some arcade games and older computer monitors do show scanlines though )I have been playing around with the idea of doing quite the opposite of what you're trying to do though. A video-sharpener that does RGB->HDMI, that removes the remaining artifacts and gives you nice sharp pixels with color-correction to the palette of the attached system.

author: miguelvp
author_rank: Super Contributor
timestamp: December 29, 2015, 11:50:16 am
content: Quote from: stmdude on December 29, 2015, 11:16:31 amWell I've done the same, and the skipping a scanline does look a bit better, well, at least to meEdit: no scanline skip:

author: marshallh
author_rank: Unknown
timestamp: December 29, 2015, 11:15:56 pm
content: Quote from: stmdude on December 29, 2015, 11:16:31 amScanlines are because broadcast TV was designed to be interlaced. 2 non-overlapped, interlaced fields. So each would average the same brightness as the rest.Normally every other field is sent with a half-life delay so that the beam scans with an offset.240/288p just scan the fields with no offset, so the beam overlaps the two fields. This gives you double frame rate and half resolution.Because the beam strikes the same place twice, but the spacing is still intended for interlaced, you get dark areas, which are visible. Hence the scanlines.Now, it gets more complicated because the phosphor "blooms" and the beam effective area increases with brighter data. So with mid-to-full brightness, you can't see the scanlines very well.Here is my FPGA-based retro upscaler displaying on an LCD:

author: miguelvp
author_rank: Super Contributor
timestamp: December 29, 2015, 11:31:54 pm
content: That look way better than not doing scan linesPicture of my (on-hold and pretty much abandoned) console to VGA project:https://www.eevblog.com/forum/beginners/converting-15khz-analog-rgb-to-digital/msg459236/#msg459236Edit: This is how it looks on a proper CRT:

author: stmdude
author_rank: Frequent Contributor
timestamp: December 29, 2015, 11:36:02 pm
content: @miguelvp - Saturn! Nice. Needs a new CR2032 though.