[RESOLVED] PVBob() requiring mod8 height?

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
Sharc
Moose Approved
Posts: 231
Joined: Thu Sep 23, 2010 1:53 pm

[RESOLVED] PVBob() requiring mod8 height?

Post by Sharc » Sat Apr 25, 2020 4:08 am

Hi,
Maybe I am missing something, but PVBob (standalone) seems to require that the picture height must be mod8, otherwise the bobbed picture gets messed up.
I didn't find the mod8 requirement in the documentation of DGDecodeNV, so maybe it is a driver issue on my side only.
Any thoughts? Thanks.

Windows 10
GeForce GTX 1050Ti
Driver Version: 26.21.14.3630 (GeForce 436.30)

User avatar
Rocky
Moose Approved
Posts: 1052
Joined: Fri Sep 06, 2019 12:57 pm

Re: PVBob() requiring mod8 height?

Post by Rocky » Sat Apr 25, 2020 5:26 am

Close to zero chance of a driver issue or of you missing something. I'll check it after I get DGDemux squared away for THD. Thank you for your report, Sharc.

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sun Apr 26, 2020 7:15 am

My initial attempt to duplicate this didn't show any problems. Can you please provide a sample file, your script, and a screenshot of the problem? Thanks!

Does it fail the same way with bundled DGBob() also?

Sharc
Moose Approved
Posts: 231
Joined: Thu Sep 23, 2010 1:53 pm

Re: PVBob() requiring mod8 height?

Post by Sharc » Sun Apr 26, 2020 2:03 pm

Sample and screenshot:
https://www.mediafire.com/file/6or2nege ... 2.zip/file

Script:

Code: Select all

v1=AVISource("sample.avi")  #YUV422
YV12=v1.converttoYV12(interlaced=true)
YV12cropped=YV12.crop(16,4,-24,-8)
bob=YV12cropped.PVBob()
Return bob
The problem depends on the horizontal and vertical cropping values

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sun Apr 26, 2020 3:02 pm

Thank you, Sharc! That is super weird. Investigating...

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sun Apr 26, 2020 4:29 pm

Probably a width versus pitch bug, given there is a crop in the picture (get it?). Who would code like that?

Daddy taught me all about puns. Bullwinkle is really good at word mirroring. For example, "me meanie", "take over while he takes cover". He's brilliant. And I am not just saying that because I want to be Moose Approved.
Last edited by Sherman on Sun Apr 26, 2020 4:42 pm, edited 2 times in total.

User avatar
Natasha
Mosquito
Posts: 58
Joined: Wed Nov 20, 2019 12:11 pm

Re: PVBob() requiring mod8 height?

Post by Natasha » Sun Apr 26, 2020 4:31 pm

When you learn C/C++ you'll figure it out.
Last edited by Natasha on Sun Apr 26, 2020 4:35 pm, edited 1 time in total.

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sun Apr 26, 2020 4:32 pm

Thanks Natasha. I don't believe a word they say about you.

Mr Peabody is teaching me binary right now.

User avatar
Bullwinkle
Moose Approved
Posts: 159
Joined: Thu Sep 05, 2019 6:37 pm

Re: PVBob() requiring mod8 height?

Post by Bullwinkle » Sun Apr 26, 2020 4:47 pm

The thing about puns is you should never say "get it?". You got it?

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sun Apr 26, 2020 4:51 pm

Got it, Bullwinkle! Cuz if you have to say "get it?" the pun wasn't good enough. Stupid people won't get it, right?

If you chose one out of 8 dresses how many yes/no questions would I need to ask to know which one you are wearing?

User avatar
Bullwinkle
Moose Approved
Posts: 159
Joined: Thu Sep 05, 2019 6:37 pm

Re: PVBob() requiring mod8 height?

Post by Bullwinkle » Sun Apr 26, 2020 4:56 pm

Nice try. I don't wear dresses, Sherman. Still wanna be Moose Approved?

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sun Apr 26, 2020 5:04 pm

Oh, right, sorry Bullwinkle. :oops:

In case you didn't know, the answer is 3. That's log base 2 of 8!

Do I get credit for a workaround? The user could crop after PVBob().

User avatar
Bullwinkle
Moose Approved
Posts: 159
Joined: Thu Sep 05, 2019 6:37 pm

Re: PVBob() requiring mod8 height?

Post by Bullwinkle » Sun Apr 26, 2020 5:05 pm

Partial credit. We don't want people to have to work around our bugs. Go for perfection!

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sun Apr 26, 2020 5:13 pm

Mr Peabody said we're gonna go back in time and meet George Boole. Not only did he invent Boolean numbering and logic but he also anticipated some of the Bell inequalities, at least the simple 3-term ones, the ones without auxiliary hypotheses. They're tautologies, really. Later inequalities involve locality assumptions, etc. Like CH and CHSH.

User avatar
Bullwinkle
Moose Approved
Posts: 159
Joined: Thu Sep 05, 2019 6:37 pm

Re: PVBob() requiring mod8 height?

Post by Bullwinkle » Sun Apr 26, 2020 5:16 pm

Stick to Sharc's problem until you solve it. Don't get sidetracked.

Sharc
Moose Approved
Posts: 231
Joined: Thu Sep 23, 2010 1:53 pm

Re: PVBob() requiring mod8 height?

Post by Sharc » Sun Apr 26, 2020 5:27 pm

Sherman wrote:
Sun Apr 26, 2020 5:04 pm
Oh, right, sorry Bullwinkle. :oops:

In case you didn't know, the answer is 3. That's log base 2 of 8!

Do I get credit for a workaround? The user could crop after PVBob().
The user could also add black borders back after cropping. Do I get credit for this workaround?

User avatar
Bullwinkle
Moose Approved
Posts: 159
Joined: Thu Sep 05, 2019 6:37 pm

Re: PVBob() requiring mod8 height?

Post by Bullwinkle » Sun Apr 26, 2020 5:34 pm

Full credit Sharc, you've been Moose Approved for donkeys' years.

Sherman's gonna fix it for sure.

It's not just about alliteration. Look for the deeper structure. Singing from the heart, as our dear friend Levi might say. Rest in peace all dear departed.

https://youtu.be/mxhIK7rUeqI?t=190

User avatar
Curly
Moose Approved
Posts: 69
Joined: Sun Mar 15, 2020 11:05 am

Re: PVBob() requiring mod8 height?

Post by Curly » Sun Apr 26, 2020 7:43 pm

Divine energy will flow through you, if you allow it.

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Mon Apr 27, 2020 5:51 pm

Making good progress. I understand for loops now but pointers are blowing my mind. :(

User avatar
Bullwinkle
Moose Approved
Posts: 159
Joined: Thu Sep 05, 2019 6:37 pm

Re: PVBob() requiring mod8 height?

Post by Bullwinkle » Mon Apr 27, 2020 5:52 pm

Don't give up! You're almost there.

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Fri May 01, 2020 8:17 am

I don't see any obvious coding errors. It's really interesting.

Crop only the sides:

crop(0,4,-0,-8) # NO PROBLEM
PVBob()

Crop only the top/bottom:

crop(16,0,-24,-0) # NO PROBLEM
PVBob()

Crop all around:

crop(16,4,-24,-8) # FAILS
PVBob()

Here's the kicker. We can try to eliminate width/pitch issues by sourcing with BlankClip():

blankclip(240,640,576,pixel_type="YV12",color=$0000ff) # NO PROBLEM
PVBob()

blankclip(240,680,576,pixel_type="YV12",color=$0000ff) # FAILS
PVBob()

Everything is mod8 for both of them. :?

Still investigating...

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Fri May 01, 2020 9:43 am

Guys, I might have found something!

The code that uploads the U and V planes to the VPP on the GPU assumes that the UV pitch is half the Y pitch. Well, in tracing I find that is not true for the failing cases. Gonna try fixing it...

Does the VPP even allow for UV pitch != Y pitch / 2 ? We'll see.

BTW, I'm a bit confused about modulo. What is 256 mod 0? :?

User avatar
Curly
Moose Approved
Posts: 69
Joined: Sun Mar 15, 2020 11:05 am

Re: PVBob() requiring mod8 height?

Post by Curly » Sat May 02, 2020 6:52 am

If the VPP is limited as you suggest, you'll have to re-pack things on the way up.

If you write:

int x = 256, y;
y = x % 0;

Your computer will explode. Don't do it!

jpsdr
Moose Approved
Posts: 182
Joined: Tue Sep 21, 2010 4:16 am

Re: PVBob() requiring mod8 height?

Post by jpsdr » Sat May 02, 2020 8:46 am

Sherman wrote:
Fri May 01, 2020 9:43 am
BTW, I'm a bit confused about modulo. What is 256 mod 0? :?
It is not what they call a singularity in quantum mechanical...? :mrgreen:

User avatar
Sherman
Moose Approved
Posts: 121
Joined: Mon Jan 06, 2020 11:19 pm

Re: PVBob() requiring mod8 height?

Post by Sherman » Sat May 02, 2020 8:57 am

You could be right, jpsdr. I haven't learned quantum mechanics yet, maybe next week.

I'm shopping for a new PC...Curly was right. :shock:

Post Reply