[RESOLVED] 2036 cropping issue

Support forum for DGDecNV
Post Reply
DAE avatar
ZooStation
Posts: 3
Joined: Sat Oct 02, 2010 8:02 pm

[RESOLVED] 2036 cropping issue

Post by ZooStation »

Tried on an HD source and reproduced in the attached example. Cropping 6 6 6 6 results in 4 lines cropped top and left, and 8 bottom and right. Windows 7 x64.
Cheers
Attachments
Archive.7z
(4.83 KiB) Downloaded 435 times
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 2036 cropping issue

Post by admin »

Cr*p. I only tested DGIndexNV which simulates the GPU cropping, and it appears that the GPU cropping must be mod 4. I am confirming this with Nvidia, but if true, it means I have to back out the mod 2 change.

Thanks for alerting me to this.
DAE avatar
Didée
Posts: 22
Joined: Wed Oct 27, 2010 2:19 pm

Re: 2036 cropping issue

Post by Didée »

There is a good reason for this mod4 restriction - think about e.g. interlaced mpeg2 :evil:

This restriction can be loosened in several cases (horizontal-only cropping, progressive content, ...), but not universally. So, the easiest way to prevent the user from doing silly things is to impose a general mod4 restriction. Everything is good.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 2036 cropping issue

Post by admin »

Yes, I'm aware of all those cases. But it's quite valid to say "I have progressively sampled video; there's no reason to deny me a mod 2 top crop". So my idea was to allow it, just as Avisynth does. A warning is always useful, just as in the Avisynth documentation.

My basic position is that it's not my responsibility to stop users from being stupid. If I took that on as a mandate, things would become ridiculous very fast. Why penalize valid applications because there are stupid people out there?
DAE avatar
Didée
Posts: 22
Joined: Wed Oct 27, 2010 2:19 pm

Re: 2036 cropping issue

Post by Didée »

Perhaps it wasn't quite clear ... my comment wasn't targeting you, but only Nvidia. I perfectly understand them to allow only mod4, in order to avoid potential problems.

And after all, this is an Avisynth filter. A script has to be made anyway, and writing a crop() command manually is not a big deal. Is it?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: 2036 cropping issue

Post by admin »

Well, it's a big deal, because the crop usually comes before the resize, so if you want the resize done on the GPU, the crop must be done there too.

I know you can calculate things backwards but it's more difficult and unintuitive. And the resize coming first unnecessarily acts on more pixels, though that may be moot on the GPU.
Post Reply