English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 02 August 2017, 15:19   #1
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 3,130
glitch with interlace

Usually "remove interlace artifacts" works well...
... unless the screen is setup with an odd number of vertical lines, in that case bogus blinking extra data is shown after the last line (the display being otherwise fine).

Tested with 3.1.0. Same results with 3.5.0 downloaded from winuae.net a few mins before posting here.
Easy to reproduce, just open intuition screen with some strange size (my test image had 415 vertical pixels).
No display problem if the above option isn't set.
meynaf is offline  
Old 03 August 2017, 14:06   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,750
I think this may be "feature" of "remove interlace artifacts" that is not simple t fix. Anyway, test binary required, I am not going to do any test programs as usual
Toni Wilen is online now  
Old 03 August 2017, 14:34   #3
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 3,130
If what you need is a program showing it, then you can simply use my picture viewer on any image that has more than 256 lines and an odd number of them.
You can make simple A1200 config with some fastmem. Nothing special required.

My 2 cents guess : odd/even lines are stored in some way and for last line the other one doesn't exist and it reads past the memory.
meynaf is offline  
Old 03 August 2017, 14:56   #4
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,555
Well, I think this mimics what would happen on real hardware? How would you tell the hardware to change DIWSTOP every other frame?

Always create a screen an even number of lines if interlace, and show the picture on it?
Photon is offline  
Old 03 August 2017, 15:27   #5
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 3,130
Quote:
Originally Posted by Photon View Post
Well, I think this mimics what would happen on real hardware?
On real hardware it works with no problem.


Quote:
Originally Posted by Photon View Post
How would you tell the hardware to change DIWSTOP every other frame?
I do not tell anything about DIWSTOP, i'm just calling intuition.library's OpenScreenTagList() to open an interlace screen of given size.


Quote:
Originally Posted by Photon View Post
Always create a screen an even number of lines if interlace, and show the picture on it?
Why would I ? It works fine every time 'xcept with this option...
meynaf is offline  
Old 03 August 2017, 21:09   #6
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,555
Well, if the screen you open with OpenScreenTagList() has an odd height and you have checked on real hardware by loading something big into chipmem before opening it and still no garbage, then I agree that the emulator should follow suit.

It's just that for Intuition to do this correctly in hardware, it would have to create two Copper lists, which is unlikely since the OS needs both to build the stack of screens, or they would have to enable something in VBI that toggle the DIWSTOP in that particular portion of the system Copper. Which could be possible...maybe...?
Photon is offline  
Old 03 August 2017, 21:11   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,750
This discussion is pointless because real hardware won't magically make interlaced -> 50Hz progressive.

EDIT: last line flickering happens because this special mode has to emulate line pairs and when last line does not exist, it outputs whatever is located in memory.. It is not trivial fix.

Last edited by Toni Wilen; 03 August 2017 at 21:20.
Toni Wilen is online now  
Old 04 August 2017, 09:18   #8
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 3,130
Quote:
Originally Posted by Photon View Post
Well, if the screen you open with OpenScreenTagList() has an odd height and you have checked on real hardware by loading something big into chipmem before opening it and still no garbage, then I agree that the emulator should follow suit.
This is the case. There are a few bugs with screen opening this way (f.e. opening a one pixel high screen crashes the system) but this particular case works fine.


Quote:
Originally Posted by Photon View Post
It's just that for Intuition to do this correctly in hardware, it would have to create two Copper lists, which is unlikely since the OS needs both to build the stack of screens, or they would have to enable something in VBI that toggle the DIWSTOP in that particular portion of the system Copper. Which could be possible...maybe...?
IIRC the coplist simply changes COP2LC so there is one sub-list for even lines and one for odd lines. Nothing mysterious.


Quote:
Originally Posted by Toni Wilen View Post
This discussion is pointless because real hardware won't magically make interlaced -> 50Hz progressive.
Knowing what the OS does won't help in fixing the problem, but it's still interesting by itself.


Quote:
Originally Posted by Toni Wilen View Post
EDIT: last line flickering happens because this special mode has to emulate line pairs and when last line does not exist, it outputs whatever is located in memory.. It is not trivial fix.
Just my crystal ball but -- if you use some intermediate buffer on pc side then you could perhaps allocate one more empty line.
meynaf is offline  
Old 04 August 2017, 09:29   #9
Supamax
Da Digger :)

Supamax's Avatar
 
Join Date: Nov 2008
Location: Monza, Italy
Posts: 2,532
Quote:
Originally Posted by meynaf View Post
Quote:
Originally Posted by Toni Wilen View Post
EDIT: last line flickering happens because this special mode has to emulate line pairs and when last line does not exist, it outputs whatever is located in memory.. It is not trivial fix.
Just my crystal ball but -- if you use some intermediate buffer on pc side then you could perhaps allocate one more empty line.
I don't think it would be easy for the emulator to tell if the last line exists (contains real screen data) or not (the related memory location contains non-screen data).
Supamax is offline  
Old 04 August 2017, 12:01   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,750
It isn't that simple.

"Remove interlace artifacts" is a hack that first emulates single field normally, then it emulates same field again but using previous field's BPLPT values (to fill every other line with other field's current contents, creating artifact free true progressive display). It needs even number of lines, if last line is missing, it shows garbage there. There is no intermediate buffers. (Some probably very ugly extra hack is needed to handle the last "half-line")

Main core display emulation must not have these kinds of hacks.

EDIT: correction, it emulates current line, then resets state back to start of current line and emulates it again using previous line's BPLPT values.

Last edited by Toni Wilen; 04 August 2017 at 12:50.
Toni Wilen is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Interlace or not? Mclane support.WinUAE 8 14 July 2016 21:59
Interlace problem. obiwanken Coders. Asm / Hardware 17 19 February 2014 18:18
interlace a3k lost_loven support.Hardware 11 27 November 2011 16:16
Interlace question. Thorham Coders. General 5 24 November 2007 11:00
de-interlace algorythm VermillioN request.UAE Wishlist 4 15 August 2004 05:50

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06969 seconds with 13 queries