View Full Version : DGDecIM: Frame-accurate Avisynth source filter for QuickSync
Pages :
1
2
3
4
5
[
6]
7
8
9
10
11
Guest
10th March 2014, 21:45
Would you be so kind as to have a look at a sample posted here:
http://forum.doom9.org/showthread.php?p=1672767#post1672767
The sample was a h264 SD .ts capture turned into a .mkv with MeGUI's HD streams extractor.
I can also post untouched .ts sample if you need it.
Thank you Specifically, what did you want me to look at? This thread is about DGDecIM and I don't see anything relevant in the post you linked.
The stream is recorded with very low bitrate and has field blending. A deblender will be more appropriate than a deinterlacer here, but the low bitrate will make it difficult to get good results, IMHO.
kalehrl
10th March 2014, 21:55
I just thought the sample was tricky because I didn't get good results deinterlacing it with handbrake or qstranscode using intel qsv.
Guest
10th March 2014, 22:08
Well, as I said it is not interlaced so deinterlacing is not the right thing. Still, it looks OK when deinterlaced using DGDecNV, albeit with major blending as expected. Just for fun, I will run it through QSV and see what I get. Your post in the other thread seems to indicate that the DirectShow filter did not even apply any deinterlacing. I don't know anything about the existing QSV-enabled DirectShow filters. How do you know you have enabled the deinterlacer using that script?
kalehrl
10th March 2014, 22:22
The file plays fine when using mpc with lav filters (CCCP codec pack).
The intel deinterlacer is applied and I don't see any combing artifacts.
When using directshow, the intel deinterlacer is not applied so I'm baffled why not.
I don't know how to enable it in the avisynth script.
I thought it should be applied automatically in the same way as during playback but it's not the case.
The combing artifacts are all over the place.
The lav filter tray icon appears in the right corner so I know lav filter is used by directshow.
Guest
10th March 2014, 22:29
It works fine for me using the Intel VPP sample processor. You need to talk to the author of your DirectShow filter, or wait for me to integrate this into DGDecIM (or use DGDecNV right now if possible). You may also want to revise your post to include the additional details you've given here. Ask them how to enable deinterlacing for the filter when invoking it through DirectShowSource().
Finally, you posted in a thread about Eric's filter but here you talk about LAV!
MeteorRain
11th March 2014, 06:58
I have been using DGDecIM in encoding several episodes of bluray contents without any problem, so far.
Couldn't be happier.
yup
11th March 2014, 07:25
Hi neuron2!
I am back to testing.
Script:
LoadPlugin("DGDecodeIM.dll")
DGSourceim("t.dgi",engine=1,debug=true)
Result O'k if see only forward from start to end script, but if try random access I see
https://www.dropbox.com/s/5giglbikuxeb0s6/dgim.png
For preview I am using Virtualdub 1.10.4.
Source file the same.
yup.
lansing
11th March 2014, 07:55
Hi, I encountered another problem. I have a tv recorded show that was mpeg2 30p, but because there was a 10 seconds telecined content at the start of the video, the entire show has been displayed as 30i in dgsourceim.
I tried loading the video with directshowsource and ffvideosource, both displayed the telecined content and the show as they are. And if I cut out a random part of the show, dgsourceim will be display correctly as well, which is 30p.
Guest
11th March 2014, 13:34
Hi neuron2!
I am back to testing.
Script:
LoadPlugin("DGDecodeIM.dll")
DGSourceim("t.dgi",engine=1,debug=true)
Result O'k if see only forward from start to end script, but if try random access I see
https://www.dropbox.com/s/5giglbikuxeb0s6/dgim.png
For preview I am using Virtualdub 1.10.4.
Source file the same.
yup. Are you not reading my responses to you? You have given me no source file named "t", which your script refers to, and the frame 6 in your screenshot does not match frame 6 in the stream you gave me. I cannot see any problem with the file you *did* give me. Can you please go back and read my last response to you and give me what I need to work on your issue:
http://forum.doom9.org/showthread.php?p=1672200#post1672200
Guest
11th March 2014, 13:47
Hi, I encountered another problem. I have a tv recorded show that was mpeg2 30p, but because there was a 10 seconds telecined content at the start of the video, the entire show has been displayed as 30i in dgsourceim.
I tried loading the video with directshowsource and ffvideosource, both displayed the telecined content and the show as they are. And if I cut out a random part of the show, dgsourceim will be display correctly as well, which is 30p. I don't understand your issue from your description and you have not provided a stream with your script and instructions. Please do so if you want any help from me.
I can't think of any way DGDecodeIM can change your progressive content to interlaced. Feel free to educate me by providing a stream etc.
Guest
11th March 2014, 13:47
I have been using DGDecIM in encoding several episodes of bluray contents without any problem, so far.
Couldn't be happier. Thank you for your feedback. Do you use BDRB, MEGUI, or do you do everything manually?
yup
11th March 2014, 16:50
Hi neuron2!
t.dgi made from h264 file which I uploaded using command line
dgindexim -i test.h264 -o t.dgi
yup.
yup
11th March 2014, 17:07
neuron2!
Problem solved!
dgi files generate old version DGIndexIM. When I make new, all O'k.
yup.
Guest
11th March 2014, 17:12
Problem solved!
dgi files generate old version DGIndexIM. When I make new, all O'k. Hi yup, thanks for the update and I'm glad it's solved for you!
lansing
11th March 2014, 17:31
I don't understand your issue from your description and you have not provided a stream with your script and instructions. Please do so if you want any help from me.
I can't think of any way DGDecodeIM can change your progressive content to interlaced. Feel free to educate me by providing a stream etc.
I've trimmed two stream using dgindex, trim1 include the 10 seconds telecine part followed by a transition animation that was displaying as interlace. Trim2 I took out the telecine part and leave only the transition animation, where it shows up as progressive.
trim1 (http://www.mediafire.com/download/v3quoxktcud2fnk/trim1.m2v)
trim2 (http://www.mediafire.com/download/5ar7f3cvanc752a/trim2.m2v)
Guest
11th March 2014, 18:09
Thank you for the samples. It's not a bug. It is acting correctly as designed. The start of the stream has soft pulldown and when you honor it you create a one-field phase shift that makes the rest of the stream appear to be interlaced. You can prove it to yourself by adding fieldop=2 to the DGDecodeIM() call.
The correct handling of the video to allow you to honor the pulldown and not create the phase shift is a matter for another thread. It will involve the strategic deletion of a single field. If you are clever you can do it by editing the index file. ;)
Sharc
11th March 2014, 21:09
@neuron2:
Playback of this hybrid (http://www.mediafire.com/download/1yv93pu01yorfc8/01054.track_4113.264)progressive/hard telecined clip is smooth until about frame 1300 when it begins to stutter.
(DGdecIM_b15, SW decoding).
Guest
11th March 2014, 21:34
I'm not seeing any problems with it here. How are you playing it?
Sharc
12th March 2014, 17:19
I play the script in MPC-HC.
Guest
12th March 2014, 17:26
Please try playing it in VirtualDub.
Also, please give your script.
Sharc
12th March 2014, 17:40
In VirtualDub playback is more fluent but I see some horizontal slices with horizontal displacement of the Picture.
Script:
LoadPlugin("c:\Program Files Video\AviSynth 2.5\plugins\DGDecodeIM.dll")
#The engine options chooses the decoding engine.
# engine = 0: Intel automatic (uses HW if available, otherwise uses SW)
# engine = 1: Intel HW
# engine = 2: Intel SW
Video=DGSourceIM("c:\Program Files Video\DGDecodeIM_Testing\01054.track_4113.dgi",engine=2,debug=false)
return video #.spline16resize(1280,720)
#assumefps(1000)
#info()
Guest
12th March 2014, 17:46
In VirtualDub playback is more fluent but I see some horizontal slices with horizontal displacement of the Picture. You see that with linear playback or random access? What frame number does it happen on?
Generally speaking, I am not a mind reader and you can help by being very specific about things. Tell me what I have to do to see what you see.
Sharc
12th March 2014, 18:04
Linear playback in VDub:
The horizontal slices are very obvious. e.g. frames 264 to 272 are sliced, or 337, 351, 352, 356, 357, 361, 362 to name just a few.
The .dgi was created with DGindexNV. Does this matter?
Edit: It seems that the interlaced frames of the telecined sections get predominantly sliced. Maybe it's just happening on my PC?
Guest
12th March 2014, 18:12
I'm not seeing any issues here as you describe. You can try changing the script to reference the 264 file directly and then let DGDecodeIM create the index. It shouldn't matter but you never know. Please make sure you actually run beta 15 and the associated libmfxsw32.dll.
EDIT: I just tried it with an index file created by DGIndexNV and still I do not see any issues.
Sharc
12th March 2014, 19:17
I think I found the cause:
The broad horizontal slices are caused by the scaling (vertical resize) for the PC monitor which happens to be just at a zoom factor which produces this pattern for the interlaced frames.
When I watch at original resolution I see the usual line-by-line interlaced frames, as expected. :rolleyes:
Sorry, never mind.
Guest
12th March 2014, 19:27
No problem, Sharc. That outcome is way better than any other. :)
And thanks for your testing and many other valuable contributions to Doom9.
Sharc
12th March 2014, 19:35
My pleasure :)
MeteorRain
13th March 2014, 02:13
Thank you for your feedback. Do you use BDRB, MEGUI, or do you do everything manually?
Locating source files by symbolic links.
Encoding using make (by makefile).
yup
13th March 2014, 07:07
Hi neuron2!
My investigation on 2 PC.
1. Windows 7 64 home ext. built Intel HD4000 no problem
2. Windows 7 64 professional built Intel HD and GTX 560
a. monitor connected to GTX560
When i try my source with issue I see block artifacts, if change engine to SW all O'k
progressive source O'k for both engine
b. monitor connected to Intel HD
all work fine.
Testing beta 15.
yup.
Guest
13th March 2014, 14:53
@yup
It's very difficult to help you without a stream, a script, and instructions to duplicate the issue.
yup
13th March 2014, 16:34
@yup
It's very difficult to help you without a stream, a script, and instructions to duplicate the issue.
neuron2!
It is not issue, but investigation. Stream the same which I uploaded and script also.
yup.
RedDwarf1
13th March 2014, 19:22
I don't think that Intel HD graphics works on Win 7 unless a monitor is connected to the onboard graphics. I had lots of issues getting the Intel HD graphics decoding video and it only worked properly with a monitor connected to the onboard graphics. LucidLogix is meant to allow Intel and a separate GPU to function but I could not get it working without a monitor connected to the onboard graphics, so LucidLogix was essentially useless. I have a nVidia card installed, no monitor connected and largely unused and intend removing it as soon as DGDecIM is finalized.
Guest
13th March 2014, 19:53
Good point, RedDwarf1!
@yup
If you read the thread carefully you will find possible workarounds:
http://forum.doom9.org/showthread.php?p=1672321#post1672321
MeteorRain
14th March 2014, 04:22
https://copy.com/Msd1BaOULQAv
death on opening
Guest
15th March 2014, 19:30
https://copy.com/Msd1BaOULQAv
death on opening Hmm, that's a weird one. The Intel SDK returns MFX_ERR_UNKNOWN from the DecodeFrameAsync() call. I'll have to try this with the decode sample and go from there.
Do you happen to have the x264 encode line you used to generate this stream, on the off chance that some specific setting is causing it?
I want to get a beta out with the deinterlacer enabled before I dive into this stream issue.
Guest
15th March 2014, 19:35
Here is an update on the HW deinterlacing support.
It wasn't trivial to port the sample VPP code to DGDecodeIM(). First, the decoding loop itself is structured differently, so I had to revise DGDecodeIM() to be the same. Second, the sample VPP code and DGDecodeIM() used different frame allocation methods and that made all the code not directly portable. So I had to revise the sample VPP code to use the same method as DGDecodeIM().
After all that, I was able to port the code and get things working. I need to do some cleanup and cover possible error cases and then I will make a beta, possibly today.
MeteorRain
15th March 2014, 22:22
Hmm, that's a weird one. The Intel SDK returns MFX_ERR_UNKNOWN from the DecodeFrameAsync() call. I'll have to try this with the decode sample and go from there.
Okey so basicly it's 10-bit and shouldn't be passed to HW decoder but the SW one.
The DGNV equivalent works fine but no engine information available with debug=true.
Not sure if 10-bit matters.
-----
Alright it fails on all(?) 10-bit files.
Guest
15th March 2014, 23:43
Thanks for reporting the cause, MeteorRain. QuickSync HW does not support 4:2:2 or 10-bit at this time. I will consider adding an error message.
The DGNV equivalent works fine but no engine information available with debug=true. DGDecNV has only a HW decoder; it cannot decode with SW.
Guest
16th March 2014, 01:09
I discovered something interesting. I have an AVC stream that is encoded as progressive but the content itself is interlaced. There doesn't seem to be a way to force the deinterlacer to work on it. Such streams are rare I suppose, so I will go ahead with a beta and follow up on this afterwards.
Guest
16th March 2014, 02:26
Here is beta 16 with HW deinterlacing (currently single rate only). I also implemented lansing's nice idea about index file naming, so don't get confused if things seem to have changed.
http://neuron2.net/misc/dgdecim_b16.zip
CarlPig
16th March 2014, 04:07
Will "deinterlace=1" add both hw decode and deinterlacing, or should i add hw decode too??
Guest
16th March 2014, 04:29
The engine parameter is auto by default, so if HW is present it will be used. deinterlace=1 is valid only if the active engine is the HW engine. Any attempt to use deinterlace=1 with the SW engine is ignored.
MeteorRain
16th March 2014, 09:29
Thanks for reporting the cause, MeteorRain. QuickSync HW does not support 4:2:2 or 10-bit at this time. I will consider adding an error message.
DGDecNV has only a HW decoder; it cannot decode with SW.
I pass engine=2 and it still cannot decode 10-bit.
And DGDecNV can decode 10-bit without any problem. Does that mean nvidia VP core can decode 10-bit in HW? Or was that an improper / fake decoding? (which i don't think so)
EDIT:
Okey I see artifacts when decoding 10-bit content with DGNV. I strongly suggest a warning message issued to users to prevent silent decoding errors and artifacts.
kalehrl
16th March 2014, 21:36
Can the license for this tool be bought?
Guest
17th March 2014, 02:10
While it is in the beta phase I am giving free licenses. Please send me a Pm with your valid email address.
lansing
17th March 2014, 19:18
with beta 16, I got an error "there is no function named "" " if I add any filter after the source filter when loading from mkv or ts
dgsourceim("abc.ts")
tfm()
And if I load it with dgi, no error occur.
dgsourceim("abc.ts.dgi")
tfm()
Guest
17th March 2014, 19:51
I cannot duplicate that, and those two follow identical code paths when the DGI file exists. Also, please see the last paragraph here:
http://forum.doom9.org/showthread.php?p=1668177#post1668177
lansing
17th March 2014, 21:05
It happens to all the files I have.
I ran a few test with different file path,
This one returns "there' is no function name "" ":
dgsourceim("F:\test2.mkv")
tfm()
this one returns "there is no function named "gi" ":
dgsourceim("F:\a\test2.mkv")
tfm()
this one returns "there is no function named "" ":
dgsourceim("F:\a\b\test2.mkv")
tfm()
this one returns "there is no function named "gi" ":
dgsourceim("F:\a\b\c\test2.mkv")
tfm()
Guest
17th March 2014, 21:11
I can't duplicate it. How are you opening the script? Just playing in VirtualDub? What version of Avisynth?
Post your DGI file.
Anybody else seeing this?
lansing
17th March 2014, 21:19
I save the script in the same folder as the video file, and then either drag it into avsmeter or virtualdub, both return the same error
And if I change the video filename to "test", and then put some random word in the next line, I'll get "I don't know what "dgi" means"
dgsourceim("F:\test.mkv")
randomletter
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.