[RESOLVED] PVBob() requiring mod8 height?
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: PVBob() requiring mod8 height?
Nice try. I don't wear dresses, Sherman. Still wanna be Moose Approved?
Re: PVBob() requiring mod8 height?
Oh, right, sorry Bullwinkle.
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().
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().
Sherman Peabody
Director of Linux Development
Director of Linux Development
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: PVBob() requiring mod8 height?
Partial credit. We don't want people to have to work around our bugs. Go for perfection!
Re: PVBob() requiring mod8 height?
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.
Sherman Peabody
Director of Linux Development
Director of Linux Development
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: PVBob() requiring mod8 height?
Stick to Sharc's problem until you solve it. Don't get sidetracked.
Re: PVBob() requiring mod8 height?
The user could also add black borders back after cropping. Do I get credit for this workaround?
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: PVBob() requiring mod8 height?
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
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
Re: PVBob() requiring mod8 height?
Divine energy will flow through you, if you allow it.
Curly Howard
Director of EAC3TO Development
Director of EAC3TO Development
Re: PVBob() requiring mod8 height?
Making good progress. I understand for loops now but pointers are blowing my mind.
Sherman Peabody
Director of Linux Development
Director of Linux Development
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: PVBob() requiring mod8 height?
Don't give up! You're almost there.
Re: PVBob() requiring mod8 height?
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...
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...
Sherman Peabody
Director of Linux Development
Director of Linux Development
Re: PVBob() requiring mod8 height?
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?
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?
Sherman Peabody
Director of Linux Development
Director of Linux Development
Re: PVBob() requiring mod8 height?
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!
If you write:
int x = 256, y;
y = x % 0;
Your computer will explode. Don't do it!
Curly Howard
Director of EAC3TO Development
Director of EAC3TO Development
Re: PVBob() requiring mod8 height?
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.
I'm shopping for a new PC...Curly was right.
Sherman Peabody
Director of Linux Development
Director of Linux Development
Re: PVBob() requiring mod8 height?
The code is already repacking for the VPP.
Sherman Peabody
Director of Linux Development
Director of Linux Development
Re: PVBob() requiring mod8 height?
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?
In Avisynth converting to and from YV12 has 3 ChromaIn/OutPlacement options: "DV", "mpeg1" or "mpeg2". Does this matter for PVBob()?Sherman wrote: ↑Fri May 01, 2020 8:17 amI 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...
Re: PVBob() requiring mod8 height?
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?
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.
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.
Sherman Peabody
Director of Linux Development
Director of Linux Development
- Bullwinkle
- Posts: 338
- Joined: Thu Sep 05, 2019 6:37 pm
Re: PVBob() requiring mod8 height?
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.
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.
Re: PVBob() requiring mod8 height?
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?
Ha ha. Sherman made Rocky look bad!
Re: [RESOLVED] PVBob() requiring mod8 height?
Not as bad as you, Natasha, nyuk, nyuk, nyuk!
Curly Howard
Director of EAC3TO Development
Director of EAC3TO Development
Re: [RESOLVED] PVBob() requiring mod8 height?
Really great work, Sherman! We're all so proud of you.