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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#3361 | Link |
|
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,378
|
Can I ask which version of SoundTouch was linked to TimeStretch when it was compiled?
SoundTouch version 2.4.0 was released on April 6th 2025 while Avisynth 3.7.5 was released on Apr 21st 2025, so I expected it to be using that one, however I'm getting some weird results, so I'm worried that version 2.3.3 from March 29th 2024 might have been used instead. It would make sense, given that Avisynth 3.7.5 is just a "tiny" update from Avisynth 3.7.4 which was released on Mar 24th 2025, so before the SoundTouch 2.4.0 official release. If that's the case, if someone has a bit of time and everything setup already, can you recompile TimeStretch against SoundTouch 2.4.0? Otherwise I'll try to do it when I'm back later next week. |
|
|
|
|
|
#3363 | Link |
|
Registered User
Join Date: Jan 2014
Posts: 2,531
|
In case we're still around to read the next round of birthday greetings (50th), we should definitely plan a BBQ somewhere halfway between our homes. Good wine will surely help the celebration—while my grandchildren will probably have to help me get to the party spot.
|
|
|
|
|
|
#3364 | Link |
|
Registered User
Join Date: Mar 2011
Posts: 5,062
|
Is it by design that when you specify a chroma placement for a resizer and it differs from the chroma location in frame properties, the frame property isn't updated to reflect the chroma placement used for resizing? It's the same for ResampleMT when using the placement argument. For example:
# Frame property chroma = "left" Spline36Resize(960,540, placement="center") # Frame property chroma = "left" Also, I just want to confirm... As it's not possible to change the chroma location with the Avisynth resizers, is this a legit way to do it (for a YV12 source)? ConvertToYV12(ChromaInPlacement="top_left", ChromaOutPlacement="center") |
|
|
|
|
|
#3365 | Link | |
|
Registered User
Join Date: Jan 2014
Posts: 2,531
|
Quote:
https://avisynthplus.readthedocs.io/...rs/resize.html Section: placement |
|
|
|
|
|
|
#3366 | Link |
|
Registered User
Join Date: Dec 2008
Posts: 2,400
|
I did some tests of Unicode string support.
I use Avisynth+ 3.7.5 and save scripts in UTF-8. Code:
FFVideoSource("Утка_Πάπια_오리.mkv")
Code:
FFVideoSource("Утка_Πάπια_오리.mkv")
Subtitle("Утка_Πάπια_오리")
Code:
FFVideoSource("Утка_Πάπια_오리.mkv")
Subtitle("Утка_Πάπια_오리", utf8=true)
Code:
MessageClip("Утка_Πάπια_오리")
1. Is it possible to make any string parameters interpreted as UTF-8 strings? So that users don't have to write "utf8=true" for UTF-8 scripts. 2. Will the MessageClip function support UTF-8 in the future?
__________________
MPC-BE 1.8.9 and Nightly builds | VideoRenderer | ImageSource | ScriptSource | BassAudioSource |
|
|
|
|
|
#3367 | Link |
|
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,501
|
AviSynth+ (and classic AviSynth, for that matter) are dependent on the system codepage/locale. Some plugins (and with utf8=true, internal functions) allow for converting between UTF8 and other string formats, but it's not automatic. Largely, it's handled outside of AviSynth+:
A) Set the Windows codepage to UTF-8. By far the easiest way to accomplish it, but some users get scared away from the 'Beta' language that the option uses in the config dialog. I can't remember if Win11 changed this to more neutral wording or even enables it by default now. B) Set the client application to UTF-8 using that app manifest thing, whereby AviSynth(+) should probably inherit the changed locale. AFAIK, libraries can't have those manifests attached to them, only application binaries can. This is not something I've really tested, since I just went with A) about 6 or 7 years ago on Windows 10 and never looked back. Just relying on the system setting is also why it can happily ingest/display UTF8 characters on all the non-Windows OSes, which all do default to UTF-8 and have for like, the last 20 years or so. Something to point out, though, is that you need to use a font that contains the Unicode characters as well. On Windows, MessageClip uses Arial, which should then select Arial Unicode and display them (when talking about the system/application being set on UTF8, I mean). Everywhere else, MessageClip defaults to Terminus, which unfortunately does not contain all of the Unicode characters (from the example, it contains just Cyrillic and Greek, but not Hangul - and probably not the other CJK sets either); Subtitle/Text can load external fonts, so you could see it work if you give it GNU Unifont, for example. That one has all the glyphs, and it displays correctly for Text(), just with much wider spacing. MessageClip should probably have the font_filename option added to it as well. This is one reason why there needs to be a Freetype2 backend, as that would allow for using Fontconfig to select TrueType and OpenType fonts that have the full range of glyphs and not be limited to bitmapped fonts with specific sizes. Local tests below MessageClip() per example: ![]() Text() and Version(), with Text being provided an external BDF font file to provide the correct glyphs: ![]() Ditto, but in VirtualDub2:
|
|
|
|
|
|
#3369 | Link |
|
Registered User
Join Date: Jan 2014
Posts: 2,531
|
@qyot27
1.) "if you give it GNU Unifont, for example. That one has all the glyphs, and it displays correctly for Text(), just with much wider spacing. MessageClip should probably have the font_filename option added to it as well." Regarding the wider spacing: I suppose that BDF rendering rule implemention is missing something. I did not implement all features. EDIT: (reason for visual gap found) Regarding the wider spacing in Unifont, this is due to how FONTBOUNDINGBOX is interpreted during rendering. In Unifont's BDF header, FONTBOUNDINGBOX is set to 16 pixels wide. This causes all glyphs, regardless of their actual width, to be rendered with 16 pixel spacing in Avisynth's Text() function, resulting in visible gaps for narrower characters. While Unifont is conceptually monospaced, it technically includes variable-width glyphs. Many Latin characters have DWIDTH 8, but others (like U+007F or CJK characters) use DWIDTH 16. Thus the global FONTBOUNDINGBOX must be 16 pixels wide. In a fully BDF-compliant renderer, the per-character DWIDTH and BBX values can override the global bounding box for spacing and alignment. However, Avisynth's BDF renderer does not implement this override behavior. It uses the global FONTBOUNDINGBOX width as a constant for the whole rendered text line. So far I’ve only encountered BDF fonts where FONTBOUNDINGBOX, DWIDTH, and BBX were consistent across all glyphs. Unifont breaks this assumption, which in turn revealed a limitation in my implementation. 2.) The (C) (Copyright) character is missing on your system, why? Last edited by pinterf; 16th June 2025 at 11:02. Reason: gap reason found |
|
|
|
|
|
#3370 | Link |
|
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,501
|
That's the one side-effect I've encountered in the AviSynth+ core of switching the system codepage to UTF-8. On Ubuntu it displays the Copyright symbol just fine, but because Windows has to take a far more convoluted path to get there, that's probably where the issue lies.
|
|
|
|
|
|
#3371 | Link | |
|
Registered User
Join Date: Jan 2014
Posts: 2,531
|
Quote:
Code:
#define AVS_COPYRIGHT "\n\xA9 2000-2015 Ben Rudiak-Gould, et al.\nhttp://avisynth.nl\n\xA9 2013-2025 AviSynth+ Project" EDIT: and we returned to the problematic non-utf8 aware MessageClip Code:
return Create_MessageClip(
#ifdef AVS_POSIX
AVS_FULLVERSION AVS_DEVELOPMENT_BUILD AVS_DEVELOPMENT_BUILD_GIT AVS_COPYRIGHT_UTF8
#else
AVS_FULLVERSION AVS_DEVELOPMENT_BUILD AVS_DEVELOPMENT_BUILD_GIT AVS_COPYRIGHT
#endif
, w, h, i_pixel_type, shrink, textcolor, halocolor, bgcolor, fps_numerator, fps_denominator, num_frames, env);
Which in turn is using the non-changeable env->ApplyMessage, which has no utf8 parameter, and cannot even have one, without breaking the IScriptInterface. EDIT3: Version (C) symbol now works when Windows codepage is utf8, MessageClip utf8 bool parameter added; env->ApplyMessageEx added as a new v12 interface function. Now it needs a code cleanup, but before it I'd like to implement the Unifont 8-16 pixel fixed-variable width feature.
Last edited by pinterf; 16th June 2025 at 14:34. Reason: Features implemented. |
|
|
|
|
|
|
#3372 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
All of that there weird UTF8, Unicode, code pages etc, terrifies and fills me with despair.
I blame foreigners, hangin's too good for them. Everybody should use English, if its good enough for God, it should be good enough for them
__________________
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 ??? |
|
|
|
|
|
#3373 | Link | |
|
Registered User
Join Date: Jan 2014
Posts: 2,531
|
Quote:
|
|
|
|
|
|
|
#3374 | Link |
|
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,637
|
@pinterf
Is the AVX2 resample code in the current branch ok, or are you still working on it ? Just to avoid to implement the new code in my ResampleMT and re-doing things later if it's for changing later. No big deal, i am absolutely not in hurry.
__________________
My github. |
|
|
|
|
|
#3375 | Link |
|
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,637
|
@pinterf
I have a different result with my pure "C" 8bits and yours for the vertical part, and i don't see what's wrong... ![]() Is it possible that there is something wrong in your pure "C" vertical ?
__________________
My github. |
|
|
|
|
|
#3376 | Link |
|
Registered User
Join Date: Jul 2018
Posts: 1,480
|
In June 2025 there were another big update on resampling engines (SIMD) and possible new resample function (H+V for each plane with single temp buf) for planar formats. But to the end of June there were no news from pinterf and what of the suggested updates will be transfered to main AVS+ branch is unknown. You can see latest news and commits about resamplers at this pull request - https://github.com/AviSynth/AviSynthPlus/pull/440 . Though some may be treated as performance tech demos and may be not safe for end of line and even end of buffer memory access.
For AVX512 many resizers somehow done too (at least all verticals ?) and only left 8 and 16bit H-resizers. Also you can see some performance optimization updates for AVX2 (mostly float32 resizers). Also main new design idea on H-resizers (transposition of H-resize task to V and process with SIMD-friendly V-fma) cause possibility to design several more faster processing functions but limited to the filter support size (kernel size). This may make performance benefit for small-kernel resizers like Bilinear/Bicubic(?)/some small support Gauss and may be some others (like sinc-based with taps=2) but solution is not one for all H-resize function as exist in 3.7.5 AVS+ and before. Also different SIMD architectures supports different size load and transposition with better performance (AVX512 is best as expected). This makes resampling engine more complex (and more complex to maintain) and may be not accepted by current very limited amount of developers resources. Though some more simple optimizations may be included. |
|
|
|
|
|
#3377 | Link |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,818
|
The examples for env->invoke with multiple parameters are all of this form:
Code:
AVSValue up_args[3] = { child, 384, 288 };
PClip resized = env->Invoke(upsizerString, AVSValue(up_args,3)).AsClip(); // up_args is AVSValue[1], but is effectively also AVSValue*(?)
Code:
std::vector<AVSValue> up_args; up_args.push_back(clip); up_args.push_back(384); up_args.push_back(288); PClip resized = env->Invoke(upsizerString, AVSValue(up_args.data(), up_args.size())).AsClip(); // up_args.data() is AVSValue* Is there any way to do what I'm trying to do? Or do I have to use a fixed size array allocated on the stack? ------------------ Also, I'm trying to catch any exceptions from call to invoke. But I can't work out what type is thrown. I can catch generally with (...) but AvisynthError and std::exception don't work. Last edited by wonkey_monkey; 19th July 2025 at 20:13. |
|
|
|
|
|
#3378 | Link |
|
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,637
|
@pinterf
Hi. Now that i have updated to the new SSE code, i have a crash i didnt' have before. I happens in resize_v_sse2_planar on the following line: Code:
if (notMod2)
{ // do last odd row
// Load a single coefficients as a single packed value and broadcast
__m128i coeff = _mm_set1_epi16(*reinterpret_cast<const short*>(current_coeff[sizeMod2])); // 0|co|0|co|0|co|0|co
__________________
My github. Last edited by jpsdr; 20th July 2025 at 11:14. |
|
|
|
|
|
#3379 | Link |
|
Registered User
Join Date: Jul 2018
Posts: 1,480
|
Current AVS+ repository lists for void resize_v_sse2_planar() https://github.com/AviSynth/AviSynth...L231C1-L231C27
https://github.com/AviSynth/AviSynth...e_sse.cpp#L296 // Process the last odd row if needed if (notMod2) { // Load a single coefficients as a single packed value and broadcast __m128i coeff = _mm_set1_epi16(*reinterpret_cast<const short*>(current_coeff + i)); // 0|co|0|co|0|co|0|co May you got wrong text somewhere ? Also you change function somehow - i counter used in loop and as pointer to the last index: int i = 0; for (; i < kernel_size_mod2; i += 2) {} - after loop exit i+=2 always and if (notMod2) { // Load a single coefficients as a single packed value and broadcast __m128i coeff = _mm_set1_epi16(*reinterpret_cast<const short*>(current_coeff + i)); // 0|co|0|co|0|co|0|co - reads last coef indexed by i from current_coef array (vector) In your text you use if (notMod2) { // do last odd row // Load a single coefficients as a single packed value and broadcast __m128i coeff = _mm_set1_epi16(*reinterpret_cast<const short*>(current_coeff[sizeMod2])); // 0|co|0|co|0|co|0|co sizeMod2 may be not equal in all cases to i+=2 in the AVS+ current core version ? Last edited by DTL; 20th July 2025 at 16:39. |
|
|
|
|
|
#3380 | Link |
|
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,637
|
Code:
SetMaxCPU("SSE2")
ColorBars(720,480).KillAudio()
Spline36ResizeMT(1280,720,src_left=17.2,src_width=680,src_top=-8.7,src_height=440)
DeSpline36ResizeMT(720,480,src_left=17.2,src_width=680,src_top=-8.7,src_height=440,accuracy=0,order=0)
Edit: Script edited...
__________________
My github. Last edited by jpsdr; 20th July 2025 at 17:04. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|