Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: configurable Version properties #261

Open
qyot27 opened this issue Feb 6, 2022 · 6 comments
Open

Feature request: configurable Version properties #261

qyot27 opened this issue Feb 6, 2022 · 6 comments

Comments

@qyot27
Copy link
Member

qyot27 commented Feb 6, 2022

Version() is often used as a test for whether the AviSynth environment is working. But for some types of tests (like colorspaces or I/O tests) you need to chain other functions together to get the necessary input in line with what the test requires. BlankClip can be configured in several ways that Version can't, but to have any actual content in BlankClip, once again you have to resort to using other functions (like Overlay).

So it would make sense if we make Version more configurable than it is currently. The Wiki provides an example function that fuses it with BlankClip and Overlay to make it more configurable, but having that sort of configurability (including, notably, setting a length argument so Version isn't limited to just 240 frames) in the base implementation would be a value-add.

@Reel-Deal
Copy link
Member

Not exactly what you're asking for but MessageClip(VersionString) returns:

messageclip-versionstring

With MessageClip you can change the dimensions and the font and background color but it is still limited to 240 frames.

@pinterf
Copy link

pinterf commented Feb 9, 2022

length, width, height, pixel_type could be new parameters like for BlankClip.
Or an additional sample_clip parameter from which the above mentioned format settings can be obtained?

@qyot27
Copy link
Member Author

qyot27 commented Feb 9, 2022

Having both the ability to get the settings from a source clip (maybe have it possible to derive just one setting from a source clip? Like matching only the width or only the height of a source clip so that StackHorizontal/Vertical can work correctly without having to figure out what Version's current width/height is, since it changes with the length of the message and Windows/non-Windows due to the font differences) and set them individually for the filter itself would be optimal.

I've thought about the lack of configurability of Version in the past, but the thing that finally motivated me to open this issue was that I was testing with/without GCC's optimizations and the effect of multithreading on a Power Mac G5 Quad and Raspberry Pi 4B, and comparing against both each other and against my main setup, a standard PC with an i5-9400 that I built a bit less than three years ago.

The numbers for the G5 Quad and Pi 4 were reasonable, considering their age or power/performance efficiency ratio, so the numbers reported by avs2yuv for throughput didn't get crazy (the Quad topped out at ~830fps, the Pi at ~611fps). Even the unoptimized build on the i5 was reasonable on the single-threaded test (also ~830fps). But the instant I tried using the optimized build on the i5 (or MT on the unoptimized build), the I/O numbers were so high that the clip has to be significantly longer to get reliable testing numbers from it under multiple runs.

Then there was also the thing from #216 where Version exposed unaligned memory access when I tried using it on a SPARC VM. While ultimately it was Version that had the issue, at first I couldn't tell whether it was necessarily that or the fact I had to convert to YUV so that avs2yuv could ingest it without using -raw mode. Being able to generate Version instantly in the correct pixel format would eliminate that, so we could get more direct numbers instead of also having to judge the performance of the Convert* functions too.

@Reel-Deal
Copy link
Member

If not too much trouble, can a global flag be added to force all of the filters that use overlaid text to use the Text filter instead of Subtitle? Bitmap fonts can sometimes look better.

@pinterf
Copy link

pinterf commented Mar 3, 2022

For the first part of the request pls check
3.7.2 test11, see txt inside.
https://drive.google.com/uc?export=download&id=14vsnBe6iSqp_JKnPy9YmpjrvWuJigYDw

@qyot27
Copy link
Member Author

qyot27 commented Mar 4, 2022

Yes, that works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants