Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th January 2021, 12:03   #781  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Hollola, Finland
Posts: 4,994
Quote:
Originally Posted by poisondeathray View Post
avsresize has chromaloc_op, so you change from one to another

Code:
- chromaloc_op (default left):
    ```
    "left" ("mpeg2") (0),
    "center" ("jpeg", "mpeg1") (1),
    "top_left" (2),
    "top" (3),
    "bottom_left" (4),
    "bottom" (5)

Format is" `"[locS]=>[locD]"`
Example JPEG to MPEG2: `"center=>left"`
Thank you, I didn't remember avsresize at all

So it basically means that I should use z_ConvertFormat(chromaloc_op="top_left=>mpeg2") right after loading the source with DGSource and z_ConvertFormat(chromaloc_op="mpeg2=>top_left") at the end of the filtering chain? I could change the parameter in x265 but I think it's safer to use the value that is considered standard.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 17th January 2021, 19:48   #782  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 164
Quote:
Originally Posted by FranceBB View Post
I think ffms2 and Lwlibav convert the chroma location from Type2 to the old MPEG-2 version, so from:...
Source filters doesn't change the chroma location. They are aware of the different chroma locations (ffmpeg is aware of).

Quote:
Originally Posted by Boulder View Post
Thank you, I didn't remember avsresize at all

So it basically means that I should use z_ConvertFormat(chromaloc_op="top_left=>mpeg2") right after loading the source with DGSource and z_ConvertFormat(chromaloc_op="mpeg2=>top_left") at the end of the filtering chain? I could change the parameter in x265 but I think it's safer to use the value that is considered standard.
If you're using filters that doesn't recognize chroma location top_left you can use what you wrote.
If you're using filters that are aware of chroma location top_left (I currently know only avsresize with frame properties) then you can omit these conversions.
StvG is offline   Reply With Quote
Old 23rd January 2021, 22:35   #783  |  Link
Kogarou
Registered User
 
Join Date: Oct 2020
Posts: 1
Does avs+ 3.7 have support for the CUDA filters made for the nekopanda fork? I noticed some of the fork's code got merged into mainline avs+ almost a year ago, yet it seems it doesn't work at all.
As one guy said before:
Quote:
Originally Posted by magnetite View Post
So I was experimenting with the CUDA version of Avisynth+ which was merged into the main Avisynth+ branch. It seems that it results in a memory leak. While using MeGUI, it gets stuck on the pre-processing phase, then the memory usage goes through the roof (99% RAM usage with 16 GB installed) before the app locks up.

(...)

The same script run under the Nekopanda version of Avisynth (r2827) is able to run just fine. The memory usage was around 1 GB or so on average.
IIRC I tried to do the same thing under 3.6.1, with the same result as this guy. Is there anything that needs to be changed for these scripts to run, or is the merge still a WIP?
Kogarou is offline   Reply With Quote
Old 24th January 2021, 10:20   #784  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,786
Quote:
Originally Posted by Kogarou View Post
Does avs+ 3.7 have support for the CUDA filters made for the nekopanda fork? I noticed some of the fork's code got merged into mainline avs+ almost a year ago, yet it seems it doesn't work at all.
As one guy said before:


IIRC I tried to do the same thing under 3.6.1, with the same result as this guy. Is there anything that needs to be changed for these scripts to run, or is the merge still a WIP?
Present Avisynth+ does not support CUDA. Since the existance of nekopanda fork was hidden (at least for me) for years, the two source base went apart and were different enough that even the integration of multithreading changes took me more than a month. Changes were so widespread that finally I was not able to import the fixes alone but I had to pull almost everything.
All I could do that I did not ruin and did not omit the existing CUDA parts from the source when I was porting back multithreading fixes and the new language elements (e.g. functions objects) from nekopanda fork.
So the code is there (I hope). But CUDA option is not enabled. I was trying to keep them behind #ifdef ENABLE_CUDA, thus never tested.
Nekopanda fork has special Avisynth interface. Avisynth+ interface was heavily changed on my side as well. Those cuda-special plugins would require complete rebuild after the necessary source changes (interface usage) as well.

EDIT: i was able to build Avisynth+ with the CUDA option, but it is only a necessary prequisite. I had a look at the supporting filters as well. Sources must be updated. Rebuild was not a straightforward task, starting with the easiest problem that since 2018 CUDA SDK stepped to 11.2 from 8.0, and of course using again the "classic" avisynth+ headers. Still there are filters with build errors which I'm gonna fix later this week, just for curiosity.

Last edited by pinterf; 24th January 2021 at 21:13.
pinterf is offline   Reply With Quote
Old 25th January 2021, 01:55   #785  |  Link
patul
Registered User
 
Join Date: Sep 2005
Posts: 96
Wow pinterf, you never cease to amaze me, I wish I have a small fraction of your skills, curiosity, adaptability and the ability to read other people's code with ease.. I was a programmer myself during my younger days, but no where near the required level even just to understand the code.

Thank you for keep doing what you do best.
patul is offline   Reply With Quote
Old 27th January 2021, 11:55   #786  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,786
I have encountered a serious obstacle.
On my main PC I have no NVidia CUDA, only an Intel HD630. My other PC has a historical hardware. Processor-wise it is an Intel i7-860 which would be O.K. but the video card is a GeForce GTX460 which is simply too old. NVidia do not make new drivers for it, End Of Life was 2018. The latest CUDA SDK which can produce code for GTX460 is version 9.1. (now NVidia have v11.2). But unfortunately CUDA 9.1 SDK is incompatible with VS2019, neither could I make it work with a VS2017 (consistent 0xC0000005 during the build process). So this project and my curiousity is stopped here, since I do not want to invest into a GT 1030 level card which I think is a minimum even for this fun project. The other choice I was consireding was a GT 730 since it is a bit cheaper - but still over my budget - I dropped the idea since it is slower than my old 9 years old card.
pinterf is offline   Reply With Quote
Old 27th January 2021, 12:27   #787  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,060
Any consideration for OpenCL? Open standard, supported on more hardware, supported by Nvidia via CUDA...
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 27th January 2021, 12:31   #788  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,786
Quote:
Originally Posted by wonkey_monkey View Post
Any consideration for OpenCL? Open standard, supported on more hardware, supported by Nvidia via CUDA...
No-no. I just want to look at what Nekopanda created some years ago. And as a side effect, to look into another new technology.
pinterf is offline   Reply With Quote
Old 27th January 2021, 13:30   #789  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,858
2nd user NVidia might be worth consideration.
Here a bunch o' guys I use all the time.
[Known in the UK as CEX, branches in several other countries, site domain Webuy.com ] https://uk.webuy.com/search?stext=NV...&sortOrder=asc
Many of those are Out-Of-Stock, but give and idea of what might be out there and the gelt involved.
You can click on (RHS) In Stock Online, AND In Stock In Store - to see what is currently available.
EDIT: Above sorted in ascending order by price.

There are other Used Part sellers too of course.

Or maybe someone has a 'spare card' gathering dust.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 27th January 2021 at 14:03.
StainlessS is online now   Reply With Quote
Old 27th January 2021, 13:42   #790  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 1,282
Ask the community? I'm sure someone must have a spare old NVIDIA card somewhere to give you and I'm sure they'll be happy to give it to you if we're gonna have CUDA support.
I do have an old card with CUDA, but it's buried somewhere at my parents place, so more than 160 miles from where I live and I'm not planning to get there anytime soon considering that we're still in the middle of a pandemic.
Anyway, I'm sure there's gonna be someone with an NVIDIA card willing to help you (and therefore the entire community) out.
I mean, people give gamers those kind of things for silly stuff, so they might give you, the last real Avisynth developer, a card for these far more serious stuff!

Last edited by FranceBB; 27th January 2021 at 13:44.
FranceBB is offline   Reply With Quote
Old 27th January 2021, 14:00   #791  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,858
I hear that there is a pretty good postal service in Deutschland, if only you knew where it was. [EDIT: The card, not Deutschland]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 27th January 2021 at 14:05.
StainlessS is online now   Reply With Quote
Old 27th January 2021, 14:05   #792  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,786
Haha, or I'm gonna ask my son for his 1660Super OC. University tasks, Fortnite and Ethereum mining can wait I bought him a PC with this card in October, video card prices have almost doubled since then.
EDIT 1030 is on the way.

Last edited by pinterf; 27th January 2021 at 15:28.
pinterf is offline   Reply With Quote
Old 27th January 2021, 16:29   #793  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 1,282
Quote:
Originally Posted by StainlessS View Post
I hear that there is a pretty good postal service in Deutschland, if only you knew where it was. [EDIT: The card, not Deutschland]
The conversation would be like:

"Mum, do you know where the GPU of my old computer is?"

- What is a GPU?

And that would be the deal breaker xD

Quote:
Originally Posted by pinterf View Post
Haha, or I'm gonna ask my son for his 1660Super OC. University tasks, Fortnite and Ethereum mining can wait
"University tasks"... suuuuure... That's how I used to get my parents buying me stuff back in the days hahahaha
Sadly, it doesn't work anymore since I'm a "grown man with a job who lives on his own and should buy things himself" xD

Still, with a living legend as Ferenc as a father, I wonder why that young lad isn't interested in encoding...

Quote:
Originally Posted by pinterf View Post
1030 is on the way.
yay, we're gonna have CUDA!!

FranceBB is offline   Reply With Quote
Old 27th January 2021, 16:41   #794  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,858
Quote:
yay, we're gonna have CUDA!!
"It ain't necessarily so ...":- https://www.youtube.com/watch?v=vMYM75JFrIY

Quote:
Originally Posted by pinterf View Post
No-no. I just want to look at what Nekopanda created some years ago. And as a side effect, to look into another new technology.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 27th January 2021 at 16:48.
StainlessS is online now   Reply With Quote
Old 27th January 2021, 17:15   #795  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,786
Quote:
Originally Posted by FranceBB View Post
Still, with a living legend as Ferenc as a father, I wonder why that young lad isn't interested in encoding...
Oh, there are hundreds of similarly interesting topics at Computer Science Engineering. Two of them are studying there. I wish I were young again, now the only thing I was able to help in was C/C++ (but finally I was lost there as well )
pinterf is offline   Reply With Quote
Old 28th January 2021, 08:33   #796  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,505
Quote:
now the only thing I was able to help in was C/C++
you may help with introductory programming language theory if you know C++ reasonably well. C++'s type system is powerful enough to express all 3 extensions to the simply typed lambda calculus on the lambda cube. It even allows you to play with some undecidable problems like type inference for polymorphic recursive functions since the type system itself is Turing complete.
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 28th January 2021, 10:09   #797  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,505
Quote:
I wonder why that young lad isn't interested in encoding...
because writing video processing scripts is not a terminal interest. The initial interest in stuff like avisynth shifts over time, that's how curiosity works, once you get the hang of something, your interest moves on to a more fundamental topic cuz you wanna know how things work under the hood, you wanna know why. this process won't stop until your interest reaches the boundary of human knowledge.

in the case of avisynth, there're many possible paths how your interest may evolve. one may wonder why applying a certain avisynth filter produces certain "effects" -> image processing algorithms -> low level computer vision -> applied machine learning / information theory -> theoretical machine learning / information geometry -> … and the chain goes on. you may have obtained a PhD in a seemingly unrelated field long before your interest stabilizes.
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 28th January 2021, 12:07   #798  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,786
The biggest difference between me and the youngs that they learn things on courses, in didactic units. I follow a heuristic method of learning, only random fragments of the actual problem are reaching me. I'm solving these problems after seeing examples which I'm trying to understand with more or less success.

Having this new GT1030 toy made the progress a bit quicker than having no CUDA at all I have made Nekopanda's CUDA things work with my actual Avisynth+ (work in progress). KTGMC is 4 timer quicker than the similarly parameterized QTGMC, though their output is not identical. Note that KTGMC is not a replacement for QTGMC, it has much less working parameters. So stay tuned.
pinterf is offline   Reply With Quote
Old 28th January 2021, 12:22   #799  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 1,282
Quote:
Originally Posted by feisty2 View Post
in the case of avisynth, there're many possible paths how your interest may evolve. one may wonder why applying a certain avisynth filter produces certain "effects" -> image processing algorithms -> low level computer vision -> applied machine learning / information theory -> theoretical machine learning / information geometry -> … and the chain goes on. you may have obtained a PhD in a seemingly unrelated field long before your interest stabilizes.
True. In my case, Avisynth led me to understand more of what was behind encoding, so working in the frequency domain, working with transforms, so Z-Transform, Laplace Transform, Fourier Transform, Discrete Cosine Transform, Wavelet Transform, Hadamard Transform, Karnhunen-Loeve Transform etc. The more I knew about this world, the more I wanted to know, so my passion shifted from merely applying filters in Avisynth to Linear Algebra to Control Systems to Digital Signal Processing, but always related to encoding. I mean, in the end, it's my day-by-day job, it's my passion and it's what I wanted to do when I began studying at university and what I'm still doing (and what I plan to keep doing in the future). I'm still doing a master degree in Computer Science Engineering while I'm working for Sky (in Europe, unlike in the U.S, you don't "pick" master degree vs PhD, you first get the master degree, THEN you get your PhD) and I'm studying lots of unrelated things which are indeed interesting and might turn out to be useful, but that I never thought I would have been studying. I mean, I'm never going to use Verilog or VHDL or design rugged devices, directly control FPGAs etc. I mean, it was interesting, but not what I wanted to see and study...

Quote:
Originally Posted by pinterf View Post
Having this new GT1030 toy made the progress a bit quicker than having no CUDA at all I have made Nekopanda's CUDA things work with my actual Avisynth+ (work in progress). KTGMC is 4 timer quicker than the similarly parameterized QTGMC, though their output is not identical. Note that KTGMC is not a replacement for QTGMC, it has much less working parameters. So stay tuned.
That's really cool!

Last edited by FranceBB; 28th January 2021 at 12:25.
FranceBB is offline   Reply With Quote
Old 29th January 2021, 13:24   #800  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 1,635
Quote:
Originally Posted by FranceBB View Post
so more than 160 miles from where I live
When a european man uses imperial units, a CUDA core of his video card core dies.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.