Page 2 of 2

Re: PVBob() requiring mod8 height?

Posted: Mon May 04, 2020 10:41 am
by Sherman
The code is already repacking for the VPP. :scratch:

Re: PVBob() requiring mod8 height?

Posted: Mon May 04, 2020 10:47 am
by Rocky
Don't feel bad, Sherman. I can't figure it out either. The chroma is misaligned but why? Let's sleep on it.

Re: PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 2:26 am
by Sharc
Sherman wrote:
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...
In Avisynth converting to and from YV12 has 3 ChromaIn/OutPlacement options: "DV", "mpeg1" or "mpeg2". Does this matter for PVBob()?

Re: PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 5:57 am
by Rocky
Shouldn't matter. The chroma mispositioning (hundreds of pixels) is way higher than what you can control with those options.

Re: PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 8:27 am
by Sherman
Rocky! Bullwinkle!

I found the problem. I was reading the cuviddec.h header and this caught my attention:

unsigned int raw_input_pitch
pitch in bytes of raw YUV input (should be aligned appropriately)

So I was wondering what is "appropriately"? Anybody would think that mod64 for the pitch should be fine. But I decided to experiment. I learned about experimenting from Antoine Lavoisier when we went back in time to 1778 to learn about oxygen. Did you know:

"In 1794 Lavoisier was branded a traitor because of his involvement with taxation. He was also unpopular with revolutionaries because he had supported foreign scientists whom the revolutionaries wished to strip of their assets.

Lavoisier was sentenced to death by the revolutionaries. Trumped-up charges against him included stealing money from France’s Treasury and giving it to France’s enemies.

Antoine Lavoisier died by the guillotine at the age of 50 on May 8, 1794 in Paris. Marie-Anne’s father and 26 other people were executed on the same occasion.

At the end of 1795, in a U-turn, the French government found Lavoisier innocent of all charges. By then, of course, it was too late: he was just another innocent victim of the revolution’s Reign of Terror."

Anyway about that VPP pitch. I thought I would just experiment with increasing the mod from 64. I tried both 128 and 256. And they both eliminated the artifact! So in Sharc's cropping case, the calculated VPP pitch increased from 704 to 768. My opinion is that we should leave it at 256.

I promise you that Mr Peabody did not help me on this. I did it all by myself.

Now, I'm gonna go learn quantum mechanics and solve the measurement problem. :twisted:

Re: PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 8:33 am
by Bullwinkle
You're a good boy, Sherman.

I'll make you Moose Approved right away. But don't get your hopes up for mod. This town isn't big enough for both of us. :P

Re: PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 9:40 am
by Rocky
Thank you, Sherman, and congratulations. I'm going to port the THD fix to DGIndexNV and then release that together with your fix.

Re: PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 10:20 am
by Natasha
Ha ha. Sherman made Rocky look bad!

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 12:40 pm
by Curly
Not as bad as you, Natasha, nyuk, nyuk, nyuk!

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 12:42 pm
by Levi
Really great work, Sherman! We're all so proud of you. :salute:

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 12:55 pm
by Sherman
Mr Peabody and I are coming back to meet you Levi. Be ready!

Daddy, dial up the year 1966, Detroit, USA.

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 1:03 pm
by Sherman
Levi, what do you think of this cover?

https://www.youtube.com/watch?v=ZjpSvmH9BeE

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 1:05 pm
by Levi
It's a great high-energy version by a beloved sister and child of the divine. Gotta love it!

Unsung heroes are songwriters Brian Holland, Lamont Dozier, and Edward Holland, Jr. You should go back and talk to them!

Catch ya later Sherm. I'm working on an exciting new song. You'll be the first to hear it!

It will be great to meet you. I've invited Diana Ross, and the Temptations to join us. Diana did a great version too.

Soul is the heart.

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 1:08 pm
by Sherman
😂😂😂😂😂

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 2:04 pm
by Boris
Seen not heard.

Got big shipment Transylvania vodka. The best, low price. Low methanol. Don't miss it. Your grandma will faint when she sees it. Wife will swoon. Send PM.

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Tue May 05, 2020 2:54 pm
by Guest
Well done Sherman :hat:

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Wed May 06, 2020 8:37 am
by Sherman
Thank you, gonca. Even a little kid sometimes finds an acorn. ;)

Re: [RESOLVED] PVBob() requiring mod8 height?

Posted: Thu May 07, 2020 3:39 am
by Sharc
I just tested it and it works as expected. Thank you Sherman, you are a good apprentice :bravo: