OSSC (DIY video digitizer & scandoubler)

The place for all discussion on gaming hardware
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

guys, please. What's this nonsense about? Think about it!

@paulb_nl
As you are comparing the current field to previous field there is no frame of lag.
the moment the FIRST line from the 2nd field is coming in (and hence is available for ANY deinterlacing alorithm other than a single-field doubling like BOB) the 1st field has already been output first to last line by the source. So, comparing the output of the processor to the output of the source, you're already lagging behing a frame by this moment.

@ASDR
For the above to work we only need to buffer fields, which does not introduce any lag, and refer to past fields, which also does not introduce any lag.
same as above. the oldest field you're referencing with is always your base. If you're using any kind of motion adaptive deinterlacing, which retains information of the previous frame for creating the current one, your output will always lag at least by the time one field needs to be written to the buffer. Hence ANY information from that field, that is used for the current frame output, is at least 1/60s old by the time you start using it.

If you can't believe it, draw two timelines, one for the odd, one for the even fields and mark down the point the information is available for processing. That's the earliest point in time a fresh frame can be output.
Weaving the previous two fields together, retaining full resolution but creating combing artifacts with motion
pure weaving as in film mode deinterlacing isn't interesting for gaming content. And for movies you need more than a single field buffer because of the cadence breaks.
User avatar
orange808
Posts: 3196
Joined: Sat Aug 20, 2016 5:43 am

Re: OSSC (DIY video digitizer & scandoubler)

Post by orange808 »

With the OSSC I am getting 4:2:2, with this 1080p 4:4:4 test pattern here
http://abload.de/img/chromaresmzjib.png

source:
https://forum.doom9.org/showpost.php?p= ... ount=25082

This pattern works properly with my 1080p 4:4:4 display. I am pretty sure it's being displayed 1:1 on the PC and on the display.

It works properly using my DAC and the analog HD15 RGVHV input on my 1080p 4:4:4 display. It works fine plugged in directly over HDMI.

But, I don't get the results I expect when I pass the test pattern through the OSSC. The DAC output checks out fine plugged directly into the display. What's going wrong at the OSSC?

Can anybody else confirm my results, disprove my results, or tell me what I'm doing wrong?

In theory, I expected the OSSC to handle this test pattern.



--------

PS: Start a new thread for the deinterlacing thing.
Last edited by orange808 on Fri Feb 08, 2019 5:33 pm, edited 1 time in total.
We apologise for the inconvenience
User avatar
James-F
Posts: 87
Joined: Fri Mar 23, 2018 11:01 am

Re: OSSC (DIY video digitizer & scandoubler)

Post by James-F »

The short answer is the OSSC does not have automatic pixel clock and phase alignment, but your other VGA devices do.

To manually adjust the OSSC for perfect clock and phase, display a checkerboard test pattern and adjust till you have a uniform looking pattern without "waves" visible.
This is how FirebrandX makes his presets for various consoles.

Check this out:
https://www.youtube.com/watch?v=EBStHr4XCTg
Last edited by James-F on Fri Feb 08, 2019 5:38 pm, edited 2 times in total.
User avatar
orange808
Posts: 3196
Joined: Sat Aug 20, 2016 5:43 am

Re: OSSC (DIY video digitizer & scandoubler)

Post by orange808 »

James-F wrote:The short answer is the OSSC does not have automatic pixel clock alignment, but you other VGA devices do.
Thanks for the reply. I'll keep trying to get it dialed in. :)
We apologise for the inconvenience
paulb_nl
Posts: 340
Joined: Sat Feb 20, 2016 5:05 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by paulb_nl »

Fudoh wrote:the moment the FIRST line from the 2nd field is coming in (and hence is available for ANY deinterlacing alorithm other than a single-field doubling like BOB) the 1st field has already been output first to last line by the source. So, comparing the output of the processor to the output of the source, you're already lagging behing a frame by this moment.
With the method I am describing, not only has the 1st field already been output by the source but also by the deinterlacer so I don't agree that it is already lagging a frame behind.

The lagless BOB deinterlacing on the OSSC also outputs fields as they come in but just with linedoubling. With adaptive deinterlacer it would use information from the previous field to interpolate instead of simple linedoubling. Still no frame of lag.
nmalinoski
Posts: 1974
Joined: Wed Jul 19, 2017 1:52 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by nmalinoski »

paulb_nl wrote:
Fudoh wrote:the moment the FIRST line from the 2nd field is coming in (and hence is available for ANY deinterlacing alorithm other than a single-field doubling like BOB) the 1st field has already been output first to last line by the source. So, comparing the output of the processor to the output of the source, you're already lagging behing a frame by this moment.
With the method I am describing, not only has the 1st field already been output by the source but also by the deinterlacer so I don't agree that it is already lagging a frame behind.

The lagless BOB deinterlacing on the OSSC also outputs fields as they come in but just with linedoubling. With adaptive deinterlacer it would use information from the previous field to interpolate instead of simple linedoubling. Still no frame of lag.
Putting it a little differently, the deinterlace option only needs to keep maybe 3 lines in the linebuffer, then it saves copies of those lines in a framebuffer so they can be referenced later.

For example, a simple deinterlacing process might: (Please forgive my lack of knowledge here; I'm not certain if framebuffers can be used for simple storage, or if they're solely for loading up and outputting full frames.)
  1. Read a line (1) into the linebuffer
  2. Copy that line to its matching position in the framebuffer (1)
  3. Output the next line (2) from the framebuffer
    1. Or a black line if this is the first frame/framebuffer is empty
    2. Or, if the framebuffer is not capable of direct output like this, copy the line from the framebuffer to the linebuffer and then output it from the linebuffer
  4. Read the next line (3) into the linebuffer
  5. Rinse and repeat
Depending on the capabilities of the hardware, other options might be possible:
  • If the linebuffer can hold 2 or 3 lines, then more complex line blending operations are possible
  • Because we'd have a framebuffer that holds a composite image of the previous two fields, whole-frame transformations would be possible (at the obvious expense of N frames of lag)
  • Also because we'd have a framebuffer, we'd be able to do scaling, framerate conversion, rotation, and letter/pillar/windowboxing (at the obvious expense of N frames of lag)
    • Scaling and framerate conversion can be combined to enable seamless resolution transitions
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

With adaptive deinterlacer it would use information from the previous field to interpolate instead of simple linedoubling. Still no frame of lag.
what you say: it would use information from the previous frame. Hence PARTS of your current frame would be 1/60s old. That's the definition of a frame of lag.
Joelepain
Posts: 180
Joined: Wed Sep 12, 2012 7:40 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by Joelepain »

Fudoh wrote:guys, please. What's this nonsense about? Think about it!
...
Technically they're not totally wrong.
It's like you think as if the odd and even fields of the stream need to be deinterlace by pairs. That can be apply for "half-framerate progressive" content, like a game running at 30fps, with a framebuffer of 480p, splitted into a 480i@60hz video output.
But if the content is really generated at 60hz, then every field doesn't represent the same moment in time. So to double the resolution of a field n, you don't need to wait for field n+1 to begin.
I suppose that deinterlacers that introduce lag are doing is they do some spatial interpolation from field n, and some temporal interpolation from field n-1 and field n+1.
But in reality you don't need all that, but that's not temporal interpolation anymore, that's more like "prediction", and I suppose it's mathematically a lot more complex. But that's more or less what they do on PS4/Xbox One with their alternate checkerboard rendering to upscale 1080p/1440p to 4k.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

So to double the resolution of a field n, you don't need to wait for field n+1 to begin.
no, you don't, if you don't want to use information from the previous field (like the OSSC does it right now), but the whole question was what's required to provide a better kind of deinterlacing.
User avatar
ASDR
Posts: 825
Joined: Sat Aug 12, 2017 3:43 pm
Location: Europistan

Re: OSSC (DIY video digitizer & scandoubler)

Post by ASDR »

Fudoh wrote:
With adaptive deinterlacer it would use information from the previous field to interpolate instead of simple linedoubling. Still no frame of lag.
what you say: it would use information from the previous frame. Hence PARTS of your current frame would be 1/60s old. That's the definition of a frame of lag.
With that definition a CRT would have a frame of lag.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

a CRT doesn't display anything using sample and hold, so once you get your exposure time low enough, it will only render a line at a time.
Joelepain
Posts: 180
Joined: Wed Sep 12, 2012 7:40 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by Joelepain »

Fudoh wrote:
So to double the resolution of a field n, you don't need to wait for field n+1 to begin.
no, you don't, if you don't want to use information from the previous field (like the OSSC does it right now), but the whole question was what's required to provide a better kind of deinterlacing.
Yes but the OSSC is just doing bob deinterlacing, so literally copying data from one line to the next.
You can have interpolation by just buffering two lines and try to predict what was between them.
And you can keep the whole previous field in a buffer to make a better prediction (and even field n-2, n-3, etc, do some uber content analysis, motion prediction, etc... sky and processing power is the limit)
Still no "one frame of lag"
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

You can have interpolation by just buffering two lines and try to predict what was between them.
yes, you can. But you don't want that for videogaming content. It really doesn't look any good. There are several machines that offer the option (DVDO, Framemeister and others) and no, you don't :mrgreen: Interpolation in general is extremely problematic with anything related to pixel based graphics or lower-res polygonal graphics.
And you can keep the whole previous field in a buffer to make a better prediction (and even field n-2, n-3, etc, do some uber content analysis, motion prediction, etc... sky and processing power is the limit)
probably yes, but it's basically what motion interpolation does and look at all the artefacts it creates. There aren't many good motion adaptive deinterlacers out there that are suited for video game content and for the ones there are, it's pretty obvious what they do (allow a per pixel and per line decision between weaving and doubling) and that's basically what most users would want to see from a OSSC v2.
Last edited by Fudoh on Fri Feb 08, 2019 8:33 pm, edited 1 time in total.
User avatar
ASDR
Posts: 825
Joined: Sat Aug 12, 2017 3:43 pm
Location: Europistan

Re: OSSC (DIY video digitizer & scandoubler)

Post by ASDR »

Fudoh wrote:a CRT doesn't display anything using sample and hold, so once you get your exposure time low enough, it will only render a line at a time.
I just think the way you define lag is not useful at all. Of course an interlaced signal has a frame of lag at 60Hz according to your definition because you don't get 60 complete frames a second. A CRT or the OSSC doing bob deinterlacing will simply hope that the last two fields smear together on your retina or due to phosphor afterglow or LCD blur or whatever. Same thing. I think the more meaningful and useful metric to define lag is to see if any field data is ever delayed, which it isn't. All the information a high quality deinterlacer needs to output a row of pixels right now is in the past hence it can output pixels to the display right away with zero lag. Of course, any quality deinterlacing algorithm will use information from past fields, but that isn't lag added by the algorithm, that's just the nature of an interlaced signal.
Joelepain
Posts: 180
Joined: Wed Sep 12, 2012 7:40 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by Joelepain »

Fudoh wrote:
You can have interpolation by just buffering two lines and try to predict what was between them.
yes, you can. But you don't want that for videogaming content. It really doesn't look any good. There are several machines that offer the option (DVDO, Framemeister and others) and no, you don't :mrgreen:
I'm not saying it's giving good result (and the example you give are not really good, because they are in machines aimed for movie at first, with very limited processing power available)
I'm just saying that "in theory" a good deinterlacer doesn't HAVE to add lag.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

I'm just saying that "in theory" a good deinterlacer doesn't HAVE to add lag.
no, because a GOOD video mode needs the per pixel weaving with the previous frame. I agree that there are OTHER deinterlacing algorithms besides BOB that don't require a buffer or add lag, but I can't agree that any of these can really be called GOOD or could deliver what people expect from a OSSC successor.
Joelepain
Posts: 180
Joined: Wed Sep 12, 2012 7:40 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by Joelepain »

Fudoh wrote:probably yes, but it's basically what motion interpolation does and look at all the artefacts it creates. There aren't many good motion adaptive deinterlacers out there that are suited for video game content and for the ones there are, it's pretty obvious what they do (allow a per pixel and per line decision between weaving and doubling) and that's basically what most users would want to see from a OSSC v2.
I think the real problem is that most deinterlacers are aimed for movie content. And second, evolution of deinterlacers kind of stopped ~10-15 years ago when blu-ray came out and we began to not need them.
Just look at MadVR and all the processing power it can require from a GPU just to do a 720p=>1080p scaling + 4:2:0=>4:4:4 convertion.
Maybe we just scrached the surface with deinterlacers...
Maybe someone need to built something specifically aimed for game content, with modern hardware.
Last edited by Joelepain on Fri Feb 08, 2019 8:49 pm, edited 1 time in total.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

A CRT or the OSSC doing bob deinterlacing will simply hope that the last two fields smear together on your retina or due to phosphor afterglow or LCD blur or whatever. Same thing.
I don't think it's a good comparison since the OSSC will create full frames from those fields while displaying them.
I think the more meaningful and useful metric to define lag is to see if any field data is ever delayed, which it isn't. All the information a high quality deinterlacer needs to output a row of pixels right now is in the past hence it can output pixels to the display right away with zero lag.
I don't see it. If a high quality deinterlacer requires information from a previous frame (per-pixel weaving), that part of the data, that will be output in your current frame, is old.
Of course, any quality deinterlacing algorithm will use information from past fields, but that isn't lag added by the algorithm, that's just the nature of an interlaced signal.
but if you compare it to the result the OSSC gives you right now (which is no old data at all on your current frame), then the switch to any other HQ deinterlacing technique would introduce that old data and if you refer to my sample with the moving object from above then this will create a signal tha't lagging by 1/60s compared to your results right now.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

I think the real problem is that most deinterlacers are aimed for movie content.
video content - yes. Movie content was perfected pretty much in the late 90s.
And second, evolution of deinterlacers kind of stopped ~10-15 years ago when blu-ray came out and we began to not need them.
video deinterlacing in silicon took quite a leap about 4 or 5 years ago. Probably through the increased power of the ASICs available at the time.

There are torture test scenarios (like solid colored fields with alternating colors between the fields) that can't be properly deinterlaced without using the previous frame for weaving purposes).
User avatar
marqs
Posts: 1034
Joined: Sat Dec 15, 2012 12:11 pm
Location: Finland

Re: OSSC (DIY video digitizer & scandoubler)

Post by marqs »

In general case, a proper deinterlacer indeed needs to have the first field buffered before starting to output picture that uses information from it - for video created from 24/25/30Hz source content (e.g. film) this should be obvious. However, with video created from 50/60Hz sources it's certainly possible to do decent deinteracing just by blending output into previous field stored in the memory. For high-quality deinterlacing motion detection / compensation is still needed and then we're talking about latency of several fields.
ASDR wrote:
thebigcheese wrote:In either case, there is not enough memory available on the OSSC to store any of that information for any amount of time, AFAIK, so the point is moot.
https://www.anandtech.com/show/13940/xi ... 8k-support

Speaking of moot points, I wonder how much these are going to cost. Also, can anybody recommend a good 8k display that's 18x compatible (with the SNES)?
Even 4k capable FPGAs cost a lot. Also, design tools for these higher-end FPGAs are not typically free but cost thousands of dollars, and HDMI IP needed for outputting signal directly from FPGA transceivers can easily cost the same amount.
Joelepain
Posts: 180
Joined: Wed Sep 12, 2012 7:40 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by Joelepain »

I wonder what could be done with something like nVIDIA DLSS, but applied to deinterlacing instead of scaling.
You feed a neural network with some intentionnaly interlaced content and the progressive content as "ideal result", and see what it can learn and do to some genuine interlaced content.
User avatar
ASDR
Posts: 825
Joined: Sat Aug 12, 2017 3:43 pm
Location: Europistan

Re: OSSC (DIY video digitizer & scandoubler)

Post by ASDR »

Fudoh wrote:
A CRT or the OSSC doing bob deinterlacing will simply hope that the last two fields smear together on your retina or due to phosphor afterglow or LCD blur or whatever. Same thing.
I don't think it's a good comparison since the OSSC will create full frames from those fields while displaying them.
I think the more meaningful and useful metric to define lag is to see if any field data is ever delayed, which it isn't. All the information a high quality deinterlacer needs to output a row of pixels right now is in the past hence it can output pixels to the display right away with zero lag.
I don't see it. If a high quality deinterlacer requires information from a previous frame (per-pixel weaving), that part of the data, that will be output in your current frame, is old.
Of course, any quality deinterlacing algorithm will use information from past fields, but that isn't lag added by the algorithm, that's just the nature of an interlaced signal.
but if you compare it to the result the OSSC gives you right now (which is no old data at all on your current frame), then the switch to any other HQ deinterlacing technique would introduce that old data and if you refer to my sample with the moving object from above then this will create a signal tha't lagging by 1/60s compared to your results right now.
Of course you're right with the 1 frame of lag according to your metric, I just don't agree it's a useful one at all. When you look at a CRT, you don't see 60 frames where half of the lines are black. Because of persistence of vision the fields form full frames in your perception. Hence you'd say that what you're seeing has a frame of lag since you're seeing information from a old field as well. The OSSC bob deinterlace is truly zero lag according to every definition, but that doesn't mean it makes sense to claim any technique that incooperates data from prior fields adds lag. As long as a deinterlacer does not buffer and delay a new field it's zero lag to me. A new field does not specify a full frame so I would not expect a fully new frame on the display. The important part is that the new information contributed by the field is immediately displayed, I think that's a much more meaningful and useful metric. And of course there are many variations of motion adaptive deinterlacing which can prioritize motion response over resolution etc. It's not perfect, but it's a significant improvement over bob / weave / blend and still outputs fields with no lag.
User avatar
ASDR
Posts: 825
Joined: Sat Aug 12, 2017 3:43 pm
Location: Europistan

Re: OSSC (DIY video digitizer & scandoubler)

Post by ASDR »

Joelepain wrote:I wonder what could be done with something like nVIDIA DLSS, but applied to deinterlacing instead of scaling.
You feed a neural network with some intentionnaly interlaced content and the progressive content as "ideal result", and see what it can learn and do to some genuine interlaced content.
I'm pretty sure that could work spectacularly well. I've also been thinking for a while it might be worth trying to feed it with composite video and see if it could reconstruct RGB quality from it. Might put all those cable makes out of business, but then again you need a lot of processing power for training on a per-game basis :-)
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

@ASDR: In most parts (especially when it comes to relevance to real-life use) I agree with you, but those nitpicking about lag will measure it using my metric above. You know, the same people that can't accept 10ms of lag because it totally screws with their reactions times...
User avatar
orange808
Posts: 3196
Joined: Sat Aug 20, 2016 5:43 am

Re: OSSC (DIY video digitizer & scandoubler)

Post by orange808 »

That makes me cringe. Seems like mocking people for "nitpicking" things could be a slippery slope, that would--eventually--open up everyone here to ridicule (in one way or another).
We apologise for the inconvenience
User avatar
ASDR
Posts: 825
Joined: Sat Aug 12, 2017 3:43 pm
Location: Europistan

Re: OSSC (DIY video digitizer & scandoubler)

Post by ASDR »

Fudoh wrote:@ASDR: In most parts (especially when it comes to relevance to real-life use) I agree with you, but those nitpicking about lag will measure it using my metric above. You know, the same people that can't accept 10ms of lag because it totally screws with their reactions times...
I guess our disagreement is that I define lag by the newest information on screen but you do by the oldest. But a field is not meant to replace all information, it is a partial update. As long as the update is delivered without delay, I'm fully satisfied. I would only consider a deinterlacer to add lag if it actually required future fields for its algorithm or had meaningful processing time. If that's still too laggy then I guess any current digital display you could connect the video processor to would anyway not be satisfactory because it's sample and hold :/
User avatar
Xer Xian
Posts: 881
Joined: Sun Feb 06, 2005 3:23 pm
Location: Italy

Re: OSSC (DIY video digitizer & scandoubler)

Post by Xer Xian »

Interlaced video: still producing fuss in AD 2019

Let's hope the PS5 actually supports PS2 games and does it right.. so we can kiss it goodbye

(yeah it won't happen)
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: OSSC (DIY video digitizer & scandoubler)

Post by Fudoh »

But a field is not meant to replace all information, it is a partial update.
that's eventually for the deinterlacer to decide. On scene transitions (where the weaving any portion of the screen would fail) or when the original source wasn't meant to be deinterlaced (240p titles on 480i compilations) you want a full frame update.
User avatar
maxtherabbit
Posts: 1763
Joined: Mon Mar 05, 2018 4:03 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by maxtherabbit »

Xer Xian wrote:Interlaced video: still producing fuss in AD 2019

Let's hope the PS5 actually supports PS2 games and does it right.. so we can kiss it goodbye

(yeah it won't happen)
field rendering is going to be a part of those PS2 games (the ones that employ it anyway) until the end of time, it's the way they are written
RocketBelt
Posts: 194
Joined: Thu Sep 18, 2014 8:46 pm

Re: OSSC (DIY video digitizer & scandoubler)

Post by RocketBelt »

Konsolkongen wrote:I always thought that “burn in” was permanent and “image retention” was temporary. Maybe I’m wrong? :)
I've seen bob deinrerlacing cause image retention on my IPS tv after just a few minutes.
Although it is temporary, you certainly sweat it for a few hours because the panel looks completely broken until the effect has faded away. Seriously, first time it happened I thought the tv was toast. By lunchtime the next day it had gone though.

Anyway the ossc has an interlace pass-through mode, which totally solves the issue.
Post Reply