[RESOLVED] GPU Deinterlacing

Support forum for DGDecNV
Sharc
Distinguished Member
Distinguished Member
Posts: 206
Joined: Thu Sep 23, 2010 1:53 pm

[RESOLVED] GPU Deinterlacing

Post by Sharc » Wed Feb 20, 2019 6:47 pm

Here an interlaced file:
http://www.mediafire.com/file/tquq8uc9o ... .m2ts/file

I can deinterlace or bob it with the switch in DGSource(………..,deinterlace=2), for example. The result is clean.
However, when I do the same with the standalone version of DGBob (or DGTelecide), I am getting a blended mess.
Why are the results different? :scratch:

User avatar
gonca
Distinguished Member
Distinguished Member
Posts: 698
Joined: Sun Apr 08, 2012 6:12 pm

Re: GPU Deinterlacing

Post by gonca » Wed Feb 20, 2019 8:23 pm

With
DGTelecide(mode=1, dthresh=3.5)
it looks okay to me, however I am not that good at seeing those fine details.
What settings did you use for DGTelecide?

Just tried using
LoadPlugin("C:/Program Files (Portable)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
DGSource("I:\W2gutoff.dgi", fieldop=0)
AssumeTFF()
SeparateFields()
and the resulting pattern appears to be a,a,b,b,c,c, etc

User avatar
admin
Site Admin
Posts: 4382
Joined: Thu Sep 09, 2010 3:08 pm

Re: GPU Deinterlacing

Post by admin » Wed Feb 20, 2019 9:09 pm

gonca's got it right.

First, it is not interlaced; the content is progressive. So don't deinterlace it!

It does have a one-field phase shift, so this will work fine:

dgsource("D:\tmp\Sharc deinterlacing\W2gutoff.dgi")
separatefields().trim(1,0).weave()

Or, if you want to field match:

dgsource("D:\tmp\Sharc deinterlacing\W2gutoff.dgi")
DGTelecide()

While you should not deinterlace this clip, be aware that applying different deinterlacing algorithms to progressive content may yield different results. I can't see any problem here.

Sharc
Distinguished Member
Distinguished Member
Posts: 206
Joined: Thu Sep 23, 2010 1:53 pm

Re: GPU Deinterlacing

Post by Sharc » Thu Feb 21, 2019 3:14 am

Thanks guys

I tried your suggestions, but still the only way to get something useful is via the "deinterlace=" switch in DGSource. All other methods produce blended crap. Even when I separate the fields, all fields are blended. Maybe something is broken in avisynth here. I'll reinstall it from scratch.

Thanks for the hint about field shifted pseudo-interlace. Actually that file was produced by VEGAS. The original source was a progressive .mp4 VFR "by name" clip, 1920x1080p29.97 (nominal). For blu-ray compliance VEGAS has to convert this to interlaced. Apparently VEGAS did this by producing a field-shifted pseudo-interlace clip. I was wondering why it did it this way, but perhaps something is broken here. On the other hand I am aware that these "VFR by name" footage can produce problems with NLEs.

Is there a way to convert VFR to CFR without re-enoding the video?


Edit:

Frame view:
a) Decoding with DirectShowSource() returns clear frames at rate 59.94 as aabbccddee…… (repeated clear frames at double rate)
b) Decoding with DGSource() returns blended frames at rate 29.97 fps (all blended at single rate)
c) Decoding with DGSource(......, deinterlace=1) returns clear frames at 29.97fps as abcdefg.... (clear frames at single rate)

Field view:
a1) Decoding with DirectShowSource() followed by separatefields() returns clear fields at rate 119.88 fields per second as aaaabbbbccccddddeeee..... (clear repeated fields at 4-fold rate = double field rate)
b1) Decoding with DGSource() followed by separatefields() returns blended fields at rate 59.94 as abcdefg....... (all fields blended at field rate)
c1) Decoding with DGSource(....., deinterlace=1) followed by separatefields() returns clear fields at rate 59.94 as aabbccddee ...… (repeated fields at field rate)

Obviously the 2 Source filters do not produce the same results. With DGSource I can obtain unblended output with the internal "deinterlace=" switch only, it seems.
The field shift correction with separatefields().trim(1,0).weave() works with the DSS filter but fails with DGSource. :?

User avatar
admin
Site Admin
Posts: 4382
Joined: Thu Sep 09, 2010 3:08 pm

Re: GPU Deinterlacing

Post by admin » Thu Feb 21, 2019 11:17 am

Please start a new thread for your VFR stuff.

Can you please post a screenshot of this "blended crap" together with the script that creates it? I don't see how Avisynth could be doing this.

Sharc
Distinguished Member
Distinguished Member
Posts: 206
Joined: Thu Sep 23, 2010 1:53 pm

Re: GPU Deinterlacing

Post by Sharc » Thu Feb 21, 2019 2:45 pm

Picture of a blended field attached

Script:
DGSource("W2gutsmart.dgi")
assumeTFF().separatefields()
Attachments
Blended_field.PNG
Blended_field.PNG (1.96 MiB) Viewed 638 times

User avatar
admin
Site Admin
Posts: 4382
Joined: Thu Sep 09, 2010 3:08 pm

Re: GPU Deinterlacing

Post by admin » Thu Feb 21, 2019 3:02 pm

What player are you using to display and grab the screenshot? What frame number is it (after separatefields)? What version of Avisynth+ is it?

Does it show like that in DGIndexNV (Zoom=1) or only after serving?

I don't see anything like that.

Sharc
Distinguished Member
Distinguished Member
Posts: 206
Joined: Thu Sep 23, 2010 1:53 pm

Re: GPU Deinterlacing

Post by Sharc » Thu Feb 21, 2019 4:25 pm

Player:
- The one which is in AvsPmod
- MPC-HC
- VirtualDub2

Frame number:
I get this with any frame/field, perhaps a bit more pronounced in the 2nd half of the clip. With the exception of pictures without movement

Avisynth Version:
AviSynth+ 0.1 (r2772, MT, i386)
I am getting the same with AviSynth 260

I see the blended frames (not fields) with interlace scanlines in DGIndexNV, Zoom=1. And also with PureVideo Deinterlacer set to Single Rate or Double Rate.

NVIDIA GeForce GT 730 (GK208) [ASUS]; Drivers 418.91.
Last edited by Sharc on Thu Feb 21, 2019 4:50 pm, edited 1 time in total.

User avatar
gonca
Distinguished Member
Distinguished Member
Posts: 698
Joined: Sun Apr 08, 2012 6:12 pm

Re: GPU Deinterlacing

Post by gonca » Thu Feb 21, 2019 4:48 pm

LoadPlugin("C:/Program Files (Portable)/dgdecnv/x64 Binaries/DGDecodeNV.dll")
DGSource("I:\W2gutoff.dgi", fieldop=0)
AssumeTFF()
SeparateFields()
This produces
First half
W2gutoff.png
W2gutoff.png (1.69 MiB) Viewed 620 times
Second half
W2gutoff2.png
W2gutoff2.png (1.71 MiB) Viewed 620 times
Edit
Using 64 bit apps

Sharc
Distinguished Member
Distinguished Member
Posts: 206
Joined: Thu Sep 23, 2010 1:53 pm

Re: GPU Deinterlacing

Post by Sharc » Thu Feb 21, 2019 4:54 pm

Such clear pictures as gonca's I am only getting with DSS or with DGSource(…….,deinterlace=1), or DGSource(…….,deinterlace=2) for bobbing.
Confused………. It looks like something is out of step here.

I am also getting clean pictures when I extract the fields with ffmpeg and reencode with x264 (I didn't find a way with ffmpeg without reencoding)

Post Reply