![]() |
![]() |
#1 |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Suggestion for alternative handling of interlaced frames (WinUAE)
I was already halfway through "Dark Seed" when those nasty artifacts started becoming increasingly annoying, then thought to myself, why leave it like this? WinUAE does an excellent job with static frames, but evidently it doesn't work out that well when there's motion, just like weave-deinterlaced 576i movies playing on progressive screens.
My take on the issue is quite simple; rather than try to deal with the deinterlacing artifacts, I went for an "Interlaced Screen Simulator" approach, employing the well known concepts of scanlines and field dominance. It all begins with you figuring out which field the game/application will draw first. It could be the Bottom Field or the Top Field, but for this example we'll just take a Full Frame, assume Bottom Field First and interlace it into 2 separate fields. ![]() Full Frame ![]() Bottom Field ![]() Top Filed Now all you gotta do is weave each of the aforementioned fields (320x200) with a new solid-black field of exactly the same size (320x200) into 2 new frames that we'll call "Bottom Frame" and "Top Frame" respectively. ![]() Black Field 1. For the Bottom Field: weave it with the Black Field so that the first bottom line of the resulting Bottom Frame belongs to the Bottom Field and not the Black Field. ![]() Bottom Frame 2. For the Top Field: weave it with the Black Field so that the first bottom line of the resulting Top Frame belongs to the Black Field and not the Top Field. ![]() Top Frame The procedure for "Top Field First" is essentially the inverse of what was done in step 1 and 2, not exactly rocket science but ask me if you must ![]() Well, that's pretty much all the magic there's to the effect (videos accurately demonstrating what it looks like can be found in INSCSI.7z, attached to this post) ![]() Result (APNG proved most unreliable for keeping a constant framerate, hence the black/white lines moving up and down, even with matching refresh rate (50.1hz), but you get the idea) Now, the "Black Field" doesn't really have to be exactly the same size, I'm simply suggesting that to help me get the point across by making the visual example easier to follow. Since WinUAE has it's own way of applying scanlines, all that matters at the end is that you avoid drawing the Bottom Field higher than the Top Field (for the Bottom Field First example, of course) and always keep 1 scanline of vertical separation, otherwise it's going to stutter like hell ![]() You may have noticed both the red and the cyan dots watermarking the lower left corner of each of the images posted here. Such allowed me to quickly identify and track down a given field, before, during and after the process. I have also included an alternative take (the video demonstration can also be found in INSCSI.7z, though should not be taken seriously) on the problem, this time combining the "Interlaced Screen Simulator" with a sort of pseudo-anaglyph thingy, bearing the advantage of completely removing the rather insignificant flicker also present in real Amiga monitors and SDTV's, at the cost of flashing bright colours (much less noticeable at 60 fields per second) or an epileptic seizure ![]() And last but not the least, the names of the more relevant files in the .7z start with a "_" Thanks for your time (and effort, if you ever consider implementing this ![]() |
![]() |
![]() |
#2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 48
Posts: 25,955
|
Whats wrong with current option that internally emulates interlaced as 576p 50fps? ("Remove interlace arfifacts" which is really bad name but I couldn't find any better..)
|
![]() |
![]() |
#3 |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Technically speaking, I don't know about the inner works of the feature so I can't tell, but granted, deinterlacing artifacts are still present with "Remove interlace arfifacts" on, at least in Dark Seed when there's something moving horizontally.
|
![]() |
![]() |
#4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 48
Posts: 25,955
|
Attach statefile please. (standard lazyness etc..)
|
![]() |
![]() |
#5 |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
![]() "Remove interlace artifacts" off ![]() "Remove interlace artifacts" on But the screenshots don't speak for what's actually visible when you play the game. It turns out that disabling "Remove interlace artifacts" works a lil better for Dark Seed than leaving it enabled. For instance, when it's on, moving sprites like your character, show nasty deinterlacing artifacts that are visible even when they're not moving! when it's off, deinterlacing artifacts only appear during motion. |
![]() |
![]() |
#6 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 48
Posts: 25,955
|
I said statefile, not screenshot
![]() |
![]() |
![]() |
#7 |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Sorry, I was still testing something else with a different config when I replied and could only post some screenshots I had already taken
![]() Last edited by Maren; 03 March 2010 at 20:16. |
![]() |
![]() |
#8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 48
Posts: 25,955
|
I still don't see any statefiles (aka "saved state" or something)
![]() (misc-panel, "save state"-button etc..) |
![]() |
![]() |
#9 |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Damnit, forgot to zip and got an "invalid file" error, but didn't notice (wouldn't hurt to add .uss as a valid extension, Admin)
Here's it anyways. |
![]() |
![]() |
#10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 48
Posts: 25,955
|
Ok, this is using some kind of double buffering which is not currently compatible with "remove interlace artifacts". Should be easy fix. Maybe.
|
![]() |
![]() |
#11 |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Great
![]() But regardless of the possibility of a fix for the current deinterlacing code, would you ever consider implementing the optional method described above? would it be that much of a hassle? it's actually more visually accurate than plain deinterlacing, which the Amiga couldn't even do without a scan doubler and probably some other trickery. Basically it looks like a real interlaced Amiga monitor, which helps build up that extra "authenticity" some fans like me are always looking forward to ![]() |
![]() |
![]() |
#12 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 48
Posts: 25,955
|
I am not interested in any kind of image processing, sorry
![]() |
![]() |
![]() |
#13 |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Sometimes it's soooo bloody frustrating not to be a programmer
![]() |
![]() |
![]() |
#14 |
Amiga user since 1990
Join Date: Aug 2004
Location: Kingsport, TN / USA
Age: 43
Posts: 295
|
That's a bad way to do it, anyway, since PC monitors tend to have lower image persistence than oldskool CRTs and scanlines are fatter than "between-scanlines" - your method will cause 50% brightness since the last field's lines will disappear before the next field's lines appear (real CRTs do not draw black scanlines, they just skip over the unused lines in a field and leave the previous image to naturally fade away). Best way to do it is to either interpolate the in-between lines (but keep the original lines where you have them) or just double them (possibly with some darkening but not black).
|
![]() |
![]() |
#15 | |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Quote:
I beg to completely disagree. Replacing scanlines with interpolation makes the image much more flickery and pixelated to the eye. See for yourself (same suggested viewing conditions as with the previous vids) The brightness drop can be easily corrected from the display panel or by making the scanlines brighter. |
|
![]() |
![]() |
#16 |
Amiga user since 1990
Join Date: Aug 2004
Location: Kingsport, TN / USA
Age: 43
Posts: 295
|
Well, I did raise the option of mere doubling, with a degree of darkening on the unused scanlines of a field. The proper CRT way of doing it would be if the original scanlines bled into the unused ones based on brightness somewhat, since a bright white scanline is thicker than a medium-gray one (and of course a black one is the same thickness as an unused scanline for the most part).
Part of the issue with this for many people is the same old 50/60Hz issue with modern displays (which of course goes out the window when the monitor runs at 50Hz). For example, my LCD runs at 60Hz, and thus your videos look like ass to me solely due to that. This type of effect really requires perfect vsync. Since this is a little more involved than Amber-style scandoubling or internal "fake-576p" emulation, it should really be implemented as a filter, like the existing PAL filter. It would also be interesting to see this idea and the PAL filter combined as an option. Last edited by LocalH; 25 August 2009 at 18:17. |
![]() |
![]() |
#17 | |
Banned
Join Date: Jul 2009
Location: *
Posts: 567
|
Quote:
The other thing I'd like to address is the brightness; if you're not ok with the slight dimming (much more noticeable in LCD screens because of the washed-out colours), you may NOT alter the brightness values but the gamma's, with the difference in luma ranges being the main reason. You can only increase the brightness for the scanlines by a maximum of 25%, and anything beyond that will result in a "smokey" image, so I'd rather discard such approach. The inconvenience of not having a CRT monitor is akin to the inconvenience of not having a real Amiga hard drive connected to the pc for WinAUE to boot from; you don't need to, it should be optional as the title of the thread suggests. I you have the right hardware, great, if you don't, then use deinterlacing ![]() Perfect vsync would not be absolutely necessary but convenient, and not any more than it is for regular non-interlaced games. The videos I posted do require perfect refresh rate match because you can't get a video player to vsync like WinUAE does, they simply can not alter the framerate to match your monitor's refresh rate ![]() |
|
![]() |
![]() |
#18 |
Moderator
![]() Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,383
|
Not more frustrating than being one!
![]() But I catch your drift. I thought "remove interlace artifacts" was just "twice the vertical resolution instead of "Double"/"Scanlines" on" + go 25 fps? Will have a look. |
![]() |
![]() |
#19 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 48
Posts: 25,955
|
No. This won't help at all with artifacts caused by moving objects.
|
![]() |
![]() |
#20 |
Moderator
![]() Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,383
|
Doh! of course not. Will give it a whirl and check.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatically disable Direct3D scanlines/mask during interlaced screens (WinUAE) | Maren | request.UAE Wishlist | 6 | 26 September 2010 09:14 |
Flickering when interlaced and non-interlaced highres screens "meet" | Maren | support.WinUAE | 12 | 27 November 2009 22:59 |
WinUAE handling of ECS:BPLCON1:DOFF flag | RedskullDC | support.WinUAE | 1 | 26 December 2007 17:12 |
WinUAE suggestion | Critter | support.WinUAE | 15 | 05 September 2003 02:33 |
|
|