[RESOLVED] CLIP + cropping

Support forum for DGDecNV
User avatar
admin
Site Admin
Posts: 4191
Joined: Thu Sep 09, 2010 3:08 pm

Re: CLIP + cropping

Post by admin » Mon Dec 03, 2018 1:18 pm

Thanks, that's really strange. I did establish that the AVC display_area is 638 x 398, so it is in fact mod 2. I'll investigate why I cannot get 0 2 0 2. But it's moot if I get rid of all the CLIP stuff. Still, I like to know what is going on.

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

Re: CLIP + cropping

Post by admin » Mon Dec 03, 2018 1:19 pm

Ah, it's CLI! Now it all makes sense.

Zathor
Distinguished Member
Distinguished Member
Posts: 88
Joined: Sun Nov 28, 2010 6:06 am

Re: CLIP + cropping

Post by Zathor » Mon Dec 03, 2018 1:24 pm

Sorry for not writing that sooner. MeGUI is always about CLI :oops:

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

Re: CLIP + cropping

Post by admin » Mon Dec 03, 2018 1:52 pm

Yes, but I should have realized that too. :oops:

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

Re: CLIP + cropping

Post by admin » Tue Dec 04, 2018 10:59 am

Zathor wrote:

"Why is DGSource() without crop values able to crop something that crop cannot do?"

Ah, this is the key question. When you have no cropping specified by parameters, then the decoder honors the stream's configured VUI display_area, even when the area is mod 2. However, when you set up a crop with parameters then the create decoder call is passed a user-configured display_area structure. Now, when this is configured identically to the stream's display_area structure, it works only for mod 4. So this appears to be an NVDec limitation. I will confirm it with nVidia, but this appears to be what is happening and why we must enforce mod 4 for configured cropping.

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

Re: CLIP + cropping

Post by admin » Tue Dec 04, 2018 12:09 pm

nVidia replies "There indeed used to be a mod4 restriction, but I believe recent drivers should have eliminated this restriction. Which driver version were you using ? (if it's still there, it should be considered a bug)"

It's still there in 417.01, so it will be treated as a bug. I will probably allow mod 2 with a warning that it may work properly only after a future driver revision.

Zathor
Distinguished Member
Distinguished Member
Posts: 88
Joined: Sun Nov 28, 2010 6:06 am

Re: CLIP + cropping

Post by Zathor » Tue Dec 04, 2018 1:15 pm

Thank you very much for your work!
So I will force mod4 for the moment as well.

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

Re: CLIP + cropping

Post by admin » Thu Dec 06, 2018 5:30 pm

It turns out that mod 2 is broken only for top and left cropping. It works fine for right and bottom. nVidia says it is on the TO DO list to fix top and left. So my plan is to allow mod 2 cropping but with a warning that top and left mod 2 crops may not work until fixed in a future driver version.

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

Re: CLIP + cropping

Post by admin » Fri Dec 07, 2018 11:42 am

Watch me pull a rabbit out of my hat!

Here is a 64-bit test version for the cropping redesign. You should be able to figure things out from the revised documents. Note the renaming of the DGSource() cropping and resize parameters. Less typing is a good thing, am I wrong? Feedback from any interested users on the binaries and docs will be gratefully received so I can shake this out before slipstreaming it. This test version also includes the fix for the FPS detection for MKV/MP4 streams.

http://rationalqm.us/misc/CropRedesign.rar

@Zathor

If possible, please enforce (or warn) mod-4 only for top and left crops. I will inform you if and when that gets fixed. Thank you for your support of DGDecNV in MeGUI.

User avatar
DJATOM
Distinguished Member
Distinguished Member
Posts: 42
Joined: Fri Oct 16, 2015 6:14 pm

Re: CLIP + cropping

Post by DJATOM » Fri Dec 07, 2018 3:15 pm

DGSource("project.dgi", resize_w=1280, resize_h=720) <-- leftovers in the examples part of manual.

Post Reply