[RESOLVED] DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

This is the home of QuickSync (aka Intel Media SDK) stuff.
Post Reply
User avatar
MeteorRain
Posts: 130
Joined: Fri Jul 25, 2014 4:04 pm
Location: New Jersey

[RESOLVED] DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by MeteorRain »

Code: Select all

nv = dgsource("xxx.dgi").reduceby2
im = dgsourceim("xxx.dgi").reduceby2
stackhorizontal(nv, im)
Suppose I have a script like this. xxx.dgi is the project file of a MPEG2-TS recorded from TV.

The image from nv appears to be 2 frames ahead of im. i.e. nv[100] == im[102]. Also nv[last] appears to be broken (above half correct below half random image) but im[last] is a good frame.

Is this considered a bug? Do I need to upload the source / project file? This issue appears on large number of TS sources and is not specific on a single sample.

VERSION: NV2048 IMBeta20HW. Debug=true shows the same Display/Coded frame number.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

Could be a bug, but I need a source stream that can be used to duplicate and debug the problem. Can you provide that for me please?
User avatar
MeteorRain
Posts: 130
Joined: Fri Jul 25, 2014 4:04 pm
Location: New Jersey

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by MeteorRain »

admin wrote:Could be a bug, but I need a source stream that can be used to duplicate and debug the problem. Can you provide that for me please?
https://www.dropbox.com/sh/3ewrv5l52upr ... tMa0a?dl=0

Here you go. I suppose a random sliced commercial does not involve any copyright problem and it should be enough to demonstrate the problem.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

Thank you. I have duplicated the issue and am investigating it.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

I found some time to look into this. Fortunately, it is definitely a problem in DGDecIM and not DGDecNV. I'll probably have to seek Intel support to solve this. Keep your fingers crossed...

Interestingly, the bug also explains a glitch at the start I find with double-rate deinterlacing.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

It's a problem in the older decode sample that I started with (surface management is screwed). The latest decode sample works fine and matches DGDecNV. So I am rebuilding DGDecIM based on the latest decode sample.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

Status update...

After some hair-raising moments, I was able to re-engineer DGDecIM to use the latest Intel decode sample code. So far I have implemented MPEG2 and VC1 support and tested the sample provided by MeteorRain. The output and random access now matches DGDecNV.

I find that the new Intel decode sample design allows not only for accurate random access but also for a simplified and more robust interface to the Avisynth filter code, definitely making it worth our while to proceed with the re-engineering. The remaining tasks are to implement AVC, and then add back deinterlacing support, etc.
User avatar
MeteorRain
Posts: 130
Joined: Fri Jul 25, 2014 4:04 pm
Location: New Jersey

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by MeteorRain »

:idea: Nice
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

Update: AVC video is working now. That's all the ES formats working. Next I have to test all the containers for each ES format, and then implement deinterlacing.

Update 2: All containers working. Moving on to implement the VPP.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

Here is a new beta for testing before starting the VPP support, beta 50:

http://rationalqm.us/misc/dgdecim_b50.zip

Random access should be correct and robust and it should match DGDecNV. Your test results will be greatly appreciated. Thank you.
DAE avatar
nixo
Posts: 1
Joined: Fri Mar 27, 2015 8:29 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by nixo »

Hi,

Thank you for this. I've been testing the x86 .dll with Avisynth+ and haven't had any issues.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

Great to hear, nixo, thank you for your test results. VPP support is going fine and you'll have deinterlacing, etc., soon.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

I successfully implemented the VPP, however, when I enable deinterlacing RunFrameVPPAsync() returns an error that crashes everything. It happens with the out-of-the-box sample code also. I have posted a query about this at the Intel forum, and hopefully a solution will be forthcoming.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

Oy, I thought things were looking up for Intel support but after their reply, I am having doubts again. OK, let's wait to see what "the team" says, but my experience is that when you get a reply like that, you're not going to hear from them again any time soon. I hope they prove me wrong about that! Sometimes it's good to be wrong. :P
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: DGDecodeNV <=> DGDecodeIM Different Frame On Same ID

Post by admin »

It doesn't look good for getting VPP functionality working any time soon, due to lack of Intel support. So I have linked b50 as the release version. I'm marking this thread as RESOLVED, however, because the mismatch with DGDecNV has been resolved.
Post Reply