It is currently Fri Sep 21, 2018 7:08 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Fri Mar 15, 2013 12:09 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
Could you clarify your "no"? My understanding is that a proper interlaced signal basically has a flag every other frame (never mind how it's encoded) that causes the display to offset the field half a scanline vertically, and that these these offset and non-offset fields are referred to as even and odd (again, irrelevant which is which for this post). The NES doesn't set this flag every other field, and thus the TV always displays the same field every frame. Hence my comment, it shows the same field (even/odd, not relevant here which) every frame. The same field implies that its scanlines are always on the same physical position on the CRT face, since that's what the even/odd means.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 12:22 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
Scanlines at the same position each field is the definition of progressive. There are 240 of those lines, making the signal 240p. Yes, a given CRT will have more prominent space between the scanlines when displaying a 240p signal than when displaying a 480i signal. No, that doesn't make the signal any less 240p, just as a 350-line picture from a VGA card in full-screen EGA-compatible mode doesn't suddenly become 700p with every other line blank when displayed on a VGA monitor tuned for 768p.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 12:24 pm 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 659
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
There are no flags, only thing that causes interlaced signal is a half line. That half line causes a "restart" in the horizontal ramp generator. Ramp is fed to the deflection circuit and it moves the beam. Side effect of that half line is that new line will be half a line shifted down, and the newly coming lines will end up between the old ones. Remember that there is always a vertical ramp happening... it is smooth sawtooth like horizontal one, there are no "staircases" and this is the reason for the half a line vertical shift on the half length horizontal line. If the line is less or more than half then the new field will be shifted as much up or down.
If You omit that half line or have even number of them the new field will just go on top of other. Even number will result in equivalent of full lines.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 12:27 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
Half line offset in the vertical sync pulse is what is being called the "flag", as I understand it.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 12:50 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
And to a modern digital TV, it is nothing more than a really clunkily-encoded flag (assuming it even recognizes pseudo-progressive signals like the NES puts out). Sorry if this whole thread was too much of an exercise in abstract thinking. It stemmed from my insight that one reason that NES images are generally shown in a way that doesn't match the TV is that these implicit black spaces between scanlines aren't accounted for. By showing how the interlaced fields are effectively skipping lines (sorry, more abstract thinking), and that the NES shows only one kind of interlaced field, it's clearer how there is something more than just 240 scanlines if one is displaying it more how a TV would. For some reason I hadn't thought this all the way through before and hadn't fully registered this essential scanline spacing (even though it was painfully clear on larger CRT TVs how noticeable the black spaces were).


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 1:11 pm 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 659
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Modern TVs ignore them and deinterlace regardless of half lines, actually most of them are incapable of detecting the half lines in the first place (thus forced deinterlace, as most input is interlaced anyway). It is actually hard to detect them in a cheap and consistent manner in digital domain, mainly cheaply...

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 1:25 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7532
Location: Seattle
Another complicating factor is that the size of the electron beam is a function of brightness and CRT age—the brighter the setting and older the electron gun, the wider the electron beam. A brand new 480i CRT with the brightness turned down will have more more visible inter-scanline gaps than a tube that has the brightness turned up and been on for 100k hours.

But these problems would be true regardless of whether you were feeding the set 480i or 240p, so the empty interstices point is still true.

TmEE wrote:
It is actually hard to detect them in a cheap and consistent manner in digital domain, mainly cheaply...
Really? Isn't that the point of the double-rate serration Vsync, to identify interlaced content?


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 1:45 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
lidnariq wrote:
But these problems would be true regardless of whether you were feeding the set 480i or 240p, so the empty interstices point is still true.

When you feed the set 480i, it draws each field in the gaps between the other field's scanlines. Combined with persistence of vision, this results in an illusion of there being no gaps.

As for how this relates to a "scanlines" filter on an emulator, I have some ideas on how to implement that, involving a pixel shader with quadratic response.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 2:46 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
lidnariq wrote:
TmEE wrote:
It is actually hard to detect them in a cheap and consistent manner in digital domain, mainly cheaply...
Really? Isn't that the point of the double-rate serration Vsync, to identify interlaced content?

If a decoder couldn't detect which field was which, it wouldn't be able to reliably even decode an interlaced signal (half the time it'd get them wrong and look awful). So I'd say that even current digital TVs are decoding this flag reliably.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 3:21 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20562
Location: NE Indiana, USA (NTSC)
I wish I knew how to program GL/DX shaders so that I could make a more authentic-looking "scanlines" filter incorporating brightness-based bloom and other concepts expressed in this topic. What I could do is develop a reference implementation the filter in Python+PIL and AviSynth, make a video of it in action (as I did recently for superimposing NES video on an animated background), and then later have one of you implement it in an emulator. Should I?


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 3:50 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7532
Location: Seattle
Some people have put some effort into this:
http://filthypants.blogspot.com.au/2012 ... hader.html
http://ascii.textfiles.com/archives/3786

Neither of them seem to mention the non-linear instantaneous brightness->beam shape distortion, though.


Top
 Profile  
 
PostPosted: Fri Mar 15, 2013 11:36 pm 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 659
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
blargg wrote:
If a decoder couldn't detect which field was which, it wouldn't be able to reliably even decode an interlaced signal (half the time it'd get them wrong and look awful). So I'd say that even current digital TVs are decoding this flag reliably.

You can count loss of sync on the PLL, and then decide what field is what, but you won't get info when exactly was the sync lost. That is the reason why different fields have more half lines, and different amount between the two. It was mainly to help video editing apparatus the function more effectively. For a CRT TV it does not matter, it just works as a consequence, there is no way to mess up field order in any way, as long as there is at least one halfline you are guaranteed to have proper shift on the fields.
A friend of mine in working on an upscaler device aimed at retro game consoles and dealing with this problem really is not easy without complex techniques. But since it is retro aimed, it can assume all info is non-interlaced.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Sat Mar 16, 2013 12:23 am 
Offline
User avatar

Joined: Mon Jan 01, 2007 11:12 am
Posts: 205
In CRT TV all happens much easier. Who of you really know, how works vertical deflection system?
1. It's all start from sawtooth generator. It consist of capacitor, constant current generator (for capacitor charge) and capacitor discharge switch. Current generator guarantees linear charging of capacitor. All you need is use switch before the capacitor get full charge. Obviously switch used every VLBank.
2. Result of sawtooth generator feeds to amplifier, that drives vertical deflection coils. Nothing special, except very high requirements to linearity of amplifier. That's all.
3. TV standard describes different length of even and odd subframes by one scanline. So, VBlank period is a bit different between each other. Now, read back chapter 1: capacitor are same, charging current are stable, so in shorter subframe capacitor get a bit less charge, that cause less voltage on it. Amplifier works only with AC, that cause signal shift output signal relatively zero. This shift is interlace. Notice that if even subframe different by 2 scanlines, that cause only redraw almost all odd scanlines, except one on top and one on bottom. That's why must different be only by one scanline.
Image
Image
Ofcourse this cause jitter of vertical deflection frequency, but average frequency are stable. Thus, there are no "odd/even flag", and DSP are simple count scanlines between vertical sync. And I remind you my previous words: NES PPU generate every frame with constant scanline count. Is that clear? If you don't believe, you always can read TV standart drafts or even look at oscilloscope at broadcast signal.


Top
 Profile  
 
PostPosted: Sat Mar 16, 2013 1:20 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
There is an odd/even flag in an interlaced composite signal. A flag is just something that can be in one of two states; its representation can be anything, not just what one conventionally thinks of as a flag. This kind of flexible thinking allows application of patterns to more situations and thus greater mental abilities. It's true that the even/odd field differentiation wasn't thought of as a flag back when it was created, since it was basically driving the TV's deflection circuit in a sense, causing it to offset half a scanline height. This doesn't prevent us from seeing it as a flag now when reasoning about the signal in the abstract. For the SNES, which can do progressive or interlaced based on software control, it is little more than a flag. "If in interlaced mode, every other frame we need to output a special section in the video signal to tell the TV that it's the other field type."


Top
 Profile  
 
PostPosted: Sun Mar 17, 2013 4:53 am 
Offline
User avatar

Joined: Mon Jan 01, 2007 11:12 am
Posts: 205
blargg wrote:
For the SNES, which can do progressive or interlaced based on software control, it is little more than a flag. "If in interlaced mode, every other frame we need to output a special section in the video signal to tell the TV that it's the other field type."

There no "special section" in TV signal. Your flag is need only for control software to synchronize to video signal. It's generated by video processing device. TV doesn't require any flag. Analog TV get correct picture by natural method, digital TV - just by count scanlines between VSync signal (with additional postprocessing digital TV has output lag). Result of scanlines counting you can consider as your "flag".


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: compmike19, Google Adsense [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group