Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th December 2016, 14:46   #1  |  Link
Soulvomit
Registered User
 
Join Date: May 2012
Posts: 25
Can the bobbing process be perfectly derived from a bobbed video?

Can the process used for the interpolated fields of a bobbed frame be perfectly derived in order to create a script to mimic that process? Below is a YV12 frame from a decoder which created the bottom fields using the top ones.

Sample 1 Interlaced
Sample 1 Deinterlaced
Sample 2 Interlaced
Sample 2 Deinterlaced

Last edited by Soulvomit; 1st January 2017 at 07:46.
Soulvomit is offline   Reply With Quote
Old 30th December 2016, 18:03   #2  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,860
Can you feed your own input? It's not hard to make a test signal to derive the resizing kernel.
jmac698 is offline   Reply With Quote
Old 30th December 2016, 21:35   #3  |  Link
Soulvomit
Registered User
 
Join Date: May 2012
Posts: 25
I can, however, this is coming from an MPEG-2 decoder so the input can only be in that format for it to be decoded and bobbed the same way and I'm not sure how ideal a lossy step such as that would be.
Soulvomit is offline   Reply With Quote
Old 31st December 2016, 07:25   #4  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 351
Quote:
Originally Posted by Soulvomit View Post
Can the process used for the interpolated fields of a bobbed frame be perfectly derived in order to create a script to mimic that process?
No.

Someone may know how this chip does it, or they may be able to take a stab at the human thinking processes behind it, but mathematically there are an infinite number of ways that it could have been achieved.
kuchikirukia is offline   Reply With Quote
Old 31st December 2016, 23:08   #5  |  Link
Soulvomit
Registered User
 
Join Date: May 2012
Posts: 25
As far as I can tell it's just averaging the fields like VirtualDub's deinterlace filter set to bob, the only difference being the sharpness of the fields used isn't lost in the interpolated ones by the decoder's method, which I prefer. 'Dub does exactly (1 + 1) / 2, or 0.5 + 0.5, so what could it be doing? 1 + 1 or (0.5 + 0.5) * 2? Its DLL(s) or installer (official URL) from which they can easily be extracted can be provided if someone's willing to take a peek.
Soulvomit is offline   Reply With Quote
Old 31st December 2016, 23:19   #6  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,331
A single very blocky frame isn't enough to go on. At the very least a before (interlaced) and after is needed.

Edit: or maybe not. Running Photoshop's deinterlace makes only tiny differences to the image, suggesting it is just averaging the lines above and below.

I have no idea what VirtualDub does, so I don't really know "the sharpness of the fields used isn't lost" means.
__________________
My AviSynth filters / I'm the Doctor

Last edited by davidhorman; 31st December 2016 at 23:42.
davidhorman is offline   Reply With Quote
Old 1st January 2017, 01:14   #7  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,860
you can compress test images perfectly in mpeg2, I've done it lots of times and checked the results pixel by pixel. Not only that, you can average results over a whole frame, or just mask the decoded version with the pixel values you want.

Are mpeg2 decoders bit accurate? I mean decode in the same way? I think there's that guarantee for something.. hmmm
jmac698 is offline   Reply With Quote
Old 1st January 2017, 02:22   #8  |  Link
Soulvomit
Registered User
 
Join Date: May 2012
Posts: 25
Quote:
Originally Posted by davidhorman View Post
A single very blocky frame isn't enough to go on. At the very least a before (interlaced) and after is needed.

Edit: or maybe not. Running Photoshop's deinterlace makes only tiny differences to the image, suggesting it is just averaging the lines above and below.

I have no idea what VirtualDub does, so I don't really know "the sharpness of the fields used isn't lost" means.
Yeah, it's just averaging them. What I meant by what you cited was when VirtualDub does it, the new lines aren't as crisp as the ones used to create them. Try using its deinterlace filter set to "Interpolate using bob algorithm" TFF, then separating that into fields and see for yourself. Frame 1, consisting entirely of new lines, will appear dull compared to frame 0, consisting entirely of the original ones. This won't be the case separating the sample I provided into fields.

VirtualDub gives:

T 1
B 0.5
T 1

The decoder gives:

T 1
B 1
T 1

All 1s look and make better sense to me. I've also edited my original post to include more samples, this time both interlaced and deinterlaced, even though, yeah, only one set of fields is ever taken into account for the bobbing. Regarding the blockiness, it's just how the DVD was released.

Quote:
Originally Posted by jmac698 View Post
you can compress test images perfectly in mpeg2, I've done it lots of times and checked the results pixel by pixel. Not only that, you can average results over a whole frame, or just mask the decoded version with the pixel values you want.

Are mpeg2 decoders bit accurate? I mean decode in the same way? I think there's that guarantee for something.. hmmm
I'm more than willing to try it if you are. Bring them on. My only concern was the test not being able to be entirely lossless. But I suppose depending on how simple the image is and with enough bit rate, it could remain bit-identical to its source after being compressed.

And no, they aren't. The output will always vary between MPEG-2 decoders due to the different IDCTs each of them uses.

Last edited by Soulvomit; 1st January 2017 at 07:38.
Soulvomit is offline   Reply With Quote
Old 1st January 2017, 14:08   #9  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,331
Right, got it wrong before. VirtualDub is just averaging them; Photoshop isn't. It's probably using bicubic interpolation, and so probably is your MPEG2 decoder.

It's averaging the nearest lines in the "good" field, then subtracting a bit of the next nearest lines to act as a sharpener.
__________________
My AviSynth filters / I'm the Doctor

Last edited by davidhorman; 1st January 2017 at 14:10.
davidhorman is offline   Reply With Quote
Reply

Tags
bob field interpolation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 +1. The time now is 06:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.