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. |
|
|
Thread Tools | Search this Thread | Display Modes |
19th April 2020, 11:25 | #41 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
As in above EDIT:, I forced a refresh for it to appear in Update Manager.
Thanks for the info. EDIT: Maybe I have it set to install unstable packages or something [I remember I was looking for something that was unavailable as standard].
__________________
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 ??? |
19th April 2020, 12:32 | #42 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
|
|
19th April 2020, 17:21 | #43 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
@Are_
can you run a speed test for the latest gauss blur again? I have eliminated some frequent memory reallocations which could potentially be the performance bottleneck in earlier versions |
19th April 2020, 19:39 | #44 | Link |
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
|
Code:
(vsFilterScript) Output 100000 frames in 28.35 seconds (3527.91 fps) (c_filter) Output 100000 frames in 9.06 seconds (11036.62 fps) (Convolution) Output 100000 frames in 9.05 seconds (11045.38 fps) |
20th April 2020, 00:56 | #46 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Quote:
https://forums.linuxmint.com/viewtopic.php?t=317303 I'm pretty sure it was due to the ubuntu-toolchain-r PPA, not the distro. |
|
20th April 2020, 03:30 | #47 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yep mine was same problem, thanx qyot.
__________________
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 ??? |
20th April 2020, 06:44 | #48 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
I have pinpointed the performance bottleneck, it is the indirection (Plane::Proxy and Plane::Offset)
and it shouldn't be a problem unless the filter is ultra fast, like 3x3 gauss blur. it is a constant cost for a given format and should be negligible for slow filters like NLMeans. |
20th April 2020, 20:42 | #49 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
update:
revamped: Preprocess() is now replaced by RegisterInvokingSequence(), you may invoke a sequence of filters (including the very filter that is being defined, you may invoke this "self" filter via SelfInvoker) any way you like. basically, you get to write something like a vpy script in RegisterInvokingSequence and if this function is absent in your filter, it is assumed that the output is SelfInvoker() say you defined a 3x3 blurring filter in DrawFrame and you wanna repeat it 10 times: Code:
auto RegisterInvokingSequence(auto Core, auto&& SelfInvoker, auto Console) { for (auto _ : Range{ 10 }) InputClip = SelfInvoker("clip", InputClip); Console.Receive(InputClip); } Code:
auto RegisterInvokingSequence(auto Core, auto&& SelfInvoker, auto Console) { for (auto _ : Range{ 10 }) InputClip = SelfInvoker("clip", InputClip); InputClip = Core["fmtc"]["resample"]("clip", InputClip, "width", InputClip.Width * 2, "height", InputClip.Height * 2); Console.Receive(InputClip); } Code:
auto RegisterInvokingSequence(auto Core, auto&& SelfInvoker, auto Console) { InputClip = Core["std"]["Transpose"]("clip", InputClip); for (auto _ : Range{ 10 }) InputClip = SelfInvoker("clip", InputClip); InputClip = Core["fmtc"]["resample"]("clip", InputClip, "width", InputClip.Width * 2, "height", InputClip.Height * 2); Console.Receive(InputClip); } Last edited by feisty2; 21st April 2020 at 16:14. |
21st April 2020, 16:14 | #50 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
update:
revamped: you can now call SelfInvoker() with an argument list, the calling syntax is unified with external filters. However unlike external filters, SelfInvoker does not have any error handling capacity. It is the filter developer's responsibility to ensure that only valid arguments are passed to SelfInvoker since it represents the "self" filter and it's private to the developer. The behavior is undefined (you will most likely encounter a segfault) if you call SelfInvoker with invalid arguments. all above examples have been updated to reflect the new calling syntax. |
29th April 2020, 15:19 | #51 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
update:
Transpose is now replaced by the more interesting nnedi3_rpow2 example. center shift correction and other features that require resampling are however not implemented for the sake of simplicity. |
2nd June 2020, 22:15 | #53 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
new functionality: calling python functions, the syntax is the same as invoking filters (MATLAB function call syntax)
new functionality: Frame and Function can now be map items, all VSPropTypes are now supported. new functionality: PeekFrameFormat() for map items, if you need to convert a map item to a Frame and the PixelType of the Frame cannot yet be determined, use this function to peek the format before type conversion. a new ModifyFrame example is added to demonstrate the use of Function, a second order example for ModifyFrame is also provided. |
26th July 2020, 13:36 | #54 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
update:
new functionality: support for filters that return multiple clips, this also affects SelfInvoker. SelfInvoker now returns an std::vector<Clip> if the filter returns multiple clips, otherwise, it still returns a Clip. Console.Receive() now accepts a Clip or a sequence of clips stored in any iterable container. issue: support for calling external filters that return multiple clips is not yet implemented, this breaks the static type system of C++ since it is only known at runtime if an external filter returns a Clip or an std::vector<Clip>, I haven't figured out an elegant approach to deal with this issue. new example: Palette, this is a simple source filter showing you how to write filters that return multiple clips. it accepts an array of N numbers, and returns N blank clips, each filled with a shade of gray that corresponds to a number in the array. Code:
x, y, z = core.test.Palette([0, 0.5, 1]) # x is filled with black, y is filled with gray, and z is filled with white Last edited by feisty2; 26th July 2020 at 13:39. |
27th July 2020, 23:10 | #56 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
update:
new functionality: support for calling external filters with multiple outputs. support for filters that return multiple clips is now complete, to receive every clip returned by external filters with multiple outputs, you have to call ConfigureForMultipleOutputs(), otherwise it is assumed that the filter only has one output and only the first returned clip will be fetched. Code:
auto ffms2 = Core["ffms2"]["Source"].ConfigureForMultipleOutputs(); auto composite = ffms2("source", "something_with_alpha_channel.mov"); auto& content_clip = composite[0]; auto& alpha_channel = composite[1]; Code:
content_clip, alpha_channel = core.ffms2.Source("something_with_alpha_channel.mov") Last edited by feisty2; 28th July 2020 at 00:34. |
29th July 2020, 05:15 | #57 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
update:
revamped: various syntactic sugar for stuff dealing with multiple outputs, this affects both SelfInvoker() and the calling syntax of external filters. for SelfInvoker(): a) if RegisterVideoInfo() returns a VSVideoInfo scalar, it is assumed that the filter has only one output, and SelfInvoker() returns a Clip. b) if RegisterVideoInfo() returns a VSVideoInfo sequence stored in a container of dynamic length (something like std::vector), it is assumed that the filter has multiple outputs, and the number of outputs could not be determined at compile time, in this case SelfInvoler() returns an std::vector<Clip>. c) if RegisterVideoInfo() returns a VSVideoInfo sequence stored in a container of constexpr length N (something like std::array), it is assumed that the filter has N outputs and SelfInvoker() returns an std::array<Clip, N>, in this case you can unpack the returned clip array using a structural binding: Code:
auto [clip_1, clip_2, ..., clip_n] = SelfInvoker(...); for external filters: a) if the filter is obtained by Core["namespace"]["filter"], it is assumed that the filter has only one output, and filter() returns a Clip. b) if the filter is obtained by Core["namespace"]["filter"].ConfigureForMultipleOutputs(), it is assumed that the filter has multiple outputs, and the number of outputs could not be determined at compile time, in this case filter() returns an std::vector<Clip>. c) if the filter is obtained by Core["namespace"]["filter"].ConfigureForMultipleOutputs(N), where N is a compile time constant, it is assumed that the filter has N outputs and filter() returns an std::array<Clip, N>, in this case you can unpack the returned clip array using a structural binding: Code:
auto [clip_1, clip_2, ..., clip_n] = filter(...); the ffms2 example above could now be rewritten in a more pythonic manner: Code:
auto ffms2 = Core["ffms2"]["Source"].ConfigureForMultipleOutputs(2); auto [content_clip, alpha_channel] = ffms2("source", "something_with_alpha_channel.mov"); |
31st July 2020, 19:09 | #59 | Link |
Registered User
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
|
This looks really good:
Code:
Convolution: Output 100000 frames in 9.29 seconds (10769.29 fps) GaussBlur: Output 100000 frames in 27.54 seconds (3631.56 fps) GaussBlurFast: Output 100000 frames in 9.16 seconds (10917.06 fps) |
1st August 2020, 07:39 | #60 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
update:
revamped: you may now also directly pass arbitrary number of clips to Console.Receive() as its arguments, no need to manually wrap them in a container. removed: Buffer, it's not really that relevent and I might add it back later with various new utility stuff. new functionality: direct frame access. when you're done sketching the prototype of your filter and ready to optimize it for speed, you should enable direct access mode by specifying the DirectAccess template parameter whenever your filter reads a frame. this exposes raw pointer access to every row of every plane of a frame. out-of-bound access detection, automatic padding and the ability to create views will all be disabled and you have to manually take care of the corner cases. with direct access mode on, vsFilterScript provides only zero cost abstraction and the execution speed of your filter will be no different from filters written directly with the low level C API. A GaussBlurFast example is provided to demonstrate how to write filters with direct frame access, you can compare it to the earlier GaussBlur example which utilizes indirect access features like automatic padding and views for cleaner and more elegant code at the cost of slower execution speed. |
Thread Tools | Search this Thread |
Display Modes | |
|
|