{"id":511,"date":"2008-07-01T16:00:19","date_gmt":"2008-07-01T23:00:19","guid":{"rendered":"https:\/\/www.reenigne.org\/blog\/?p=511"},"modified":"2008-05-23T16:42:28","modified_gmt":"2008-05-23T23:42:28","slug":"ntsc-decoder","status":"publish","type":"post","link":"https:\/\/www.reenigne.org\/blog\/ntsc-decoder\/","title":{"rendered":"NTSC decoder"},"content":{"rendered":"<p>I want to write a piece of software that simulates a colour television (well, monitor really). It would really be a filter &#8211; the input is a sampled, quantized composite (CVBS) signal at some sample rate and the output is a series of video frames scaled to some resolution. I&#8217;d want the composite-&gt;RGB transformation to be done at the same time as the horizontal scaling to maximize quality whilst minimizing computation time. That means dynamically generating the appropriate filter kernel for a particular pixel width and sample rate.<\/p>\n<p>Such a thing would be particularly useful for emulating old computers and consoles which generated a composite colour signal directly (including the demo machine of yesterday&#8217;s post). In particular, it would render colour artifacts and interlacing perfectly). It would also be useful for simulating (for example) how an image would look on a TV for applications like DVD mastering.<\/p>\n<p>This is the kind of image it will be able to generate (this mock-up was done at fixed resolution and not in real time):<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.reenigne.org\/misc\/lenna_ntsc.png\" alt=\"\" \/><\/p>\n<p>No high-frequency chroma filtering was done on this image, so you can see the chroma artifacts. I wanted to include an animation showing the dot-crawl effects, but animated GIFs don&#8217;t go up to 60fps. It does look uncannily like a TV screen though.<\/p>\n<p>Writing this filter might even inspire me to fix up the NTSC emulation in MESS and improve the video emulation of machines like CGA, Apple II, CoCo and Atari 400\/800.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I want to write a piece of software that simulates a colour television (well, monitor really). It would really be a filter &#8211; the input is a sampled, quantized composite (CVBS) signal at some sample rate and the output is a series of video frames scaled to some resolution. I&#8217;d want the composite-&gt;RGB transformation to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,23],"tags":[],"class_list":["post-511","post","type-post","status-publish","format-standard","hentry","category-emulation","category-video"],"_links":{"self":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/comments?post=511"}],"version-history":[{"count":0,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/511\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/media?parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/categories?post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/tags?post=511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}