Log in

View Full Version : TxPlus : transition functions for avisynth+


vcmohan
8th March 2017, 12:42
TxPlus (http://www.avisynth.nl/users/vcmohan/TxPlus/index.html) is a plugin having over 20 transition functions. This is very similar to TransAll plugin for avisynth but support all bit depths and color formats (except stacked ones). The functions are all thread safe. I have tested this for a large number of input formats. However since it is very difficult to test for every possible situation, there can be bugs. Request report if any bugs are detected. Also suggestions for improvement are welcome.

althor1138
8th March 2017, 18:10
Thanks VCMohan! As a suggestion, I always thought having an avisynth plugin to handle the wipes that are used in star wars films would be pretty cool to have available. I've scripted a couple myself using animate and gramama plugins but having it as a plugin would probably be better I can imagine. Here are my attempts:

Function circlewipe(clip bottom, clip top, int "Duration", float "cirx", float "ciry", float "startsize", float "endsize", float "sharpness")
{
#Set Defaults
Duration=Default(Duration,24)
width=bottom.width()
height=bottom.height()
cirx=Default(cirx,width/2)
ciry=Default(ciry,height/2)
startsize=Default(startsize,70)
endsize=Default(endsize,9000)
sharpness=Default(sharpness,27)

#Make Mask and Overlay it onto clips
animatecircle=Animate(top,0,Duration,"gramama",1,1,cirx,ciry,startsize,1,1,cirx,ciry,endsize).spline64resize(width/10,height/10)\
.tweak(cont=sharpness).blur(1.58).blur(1.58).spline64resize(width,height)
circlemask=mask(top.converttorgb32(),animatecircle.converttorgb32())
circlemaskoverlay=overlay(top,bottom,mask=circlemask.showalpha(),opacity=1)
return(circlemaskoverlay)

}

Function clockwipe(clip bottom,clip top, int "Duration", float "blurriness")
{

width=bottom.width()
height=bottom.height()
wb=blankclip(bottom,duration,color=$FFFFFF)
bb=blankclip(bottom,duration,color=$000000).spline64resize(width/2,height/2)
hs=hshear(wb,0,$000000,0,duration/4,90)
vs=vshear(wb,0,$000000,0,duration/4,90)
topright=hs.crop(0,0,-width/2,-height/2).trim(0,duration/4-1) ++ bb
bottomright=blankclip(topright,length=duration/4,color=$FFFFFF) ++ vs.crop(width/2,0,0,-height/2).trim(0,duration/4-1) ++ bb
bottomleft=blankclip(topright,length=duration/2,color=$FFFFFF) ++ hs.crop(width/2,height/2,0,0).trim(0,duration/4-1) ++ bb
topleft=blankclip(topright,length=duration/4+duration/2,color=$FFFFFF) ++ vs.crop(0,height/2,-width/2,0).trim(0,duration/4-1) ++ bb
sh1=stackhorizontal(topleft,topright)
sh2=stackhorizontal(bottomleft,bottomright)
sv=stackvertical(sh1,sh2).trim(1,duration).spline64resize(width/10,height/10).blur(blurriness).blur(blurriness).blur(blurriness).blur(blurriness).blur(blurriness).spline64resize(width,height)
clockmask=mask(top.converttorgb32(),sv.converttorgb32())
clockoverlay=overlay(top,bottom,mask=clockmask.showalpha(),opacity=1)

return(clockoverlay)
}

vcmohan
9th March 2017, 11:51
Thanks for the suggestion. While I have not watched starwars wipes, I can imagine clockwipes. I will soon add this to TxPlus.

Reel.Deel
11th March 2017, 18:58
@vcmohan

Thanks for updating your plugins to support the additional colorspaces in AviSynth+. I tried downloading TxPlus but it seems there's a problem, file size is 0 kb. Also, on the TxPlus page the "To my index page" link is broken.

vcmohan
12th March 2017, 15:11
Looks my upload was broken. I re up loaded it. I am still to correct the link to my index page.

vcmohan
13th March 2017, 13:26
I have included clock type wipe in TxPlus wipe function. I have also added another function Bloom to TxPlus. Corrected link. Uploaded to day.

real.finder
17th May 2021, 14:35
Isn't better to pick another name for http://www.avisynth.nl/users/vcmohan/TxPlus/docs/Weave.html since there are http://avisynth.nl/index.php/Weave

ChaosKing
17th May 2021, 14:42
Yep. There is at least a way to ensure which one is called but it's very ugly and you need to know the file name of the plugin. http://avisynth.nl/index.php/Plugins#Plugin_Autoload_and_Conflicting_Function_Names

StainlessS
17th May 2021, 16:31
Weave(clip) # Builtin weave
Weave(clip,clip,float,string "weave") # vcmohan, 1st 3 compulsory args, so no Avisynth confusion with builtin single clip arg weave().

But potentially very confusing for the user, or eg script parsing apps, maybe AvsPMod or similar [now or in the future].
.

vcmohan
21st May 2021, 13:50
I did not notice these comments. I will after a few days ( may be a month) change the name to some other. It looks like weaving motion with cane strands. I need to think of another name.

Reel.Deel
21st May 2021, 14:00
Weaver() ?

kedautinh12
21st May 2021, 14:14
VCWave() or MWave()??

StainlessS
21st May 2021, 14:45
It looks like weaving motion with cane strands. I need to think of another name.
Maybe just Weaving().
[Nothing to do with Hugo. (Lord Elrond)]

GMJCZP
21st May 2021, 22:55
Maybe just Weaving().
[Nothing to do with Hugo. (Lord Elrond)]

Weaving(), interesting.

vcmohan
25th May 2021, 14:24
Thanks. I will use the name "weaving". But after some time. I am at present working on modification of vcm plugin for vapoursynth. What I thought a week will be enough, now looks will take a month as more ideas crop up after finishing. And so more changes. If I do not finish by this week end I will change name of weave and then resume vcm.

vcmohan
28th May 2021, 12:48
changed weave function name to weaving.

kedautinh12
28th May 2021, 12:57
Thanks

StainlessS
25th June 2021, 16:56
Just downloaded current TxPlus, and tried the demo script from index.html.
First comes up with something like "I dont know what b is".
Uncommented lines relating to b.

Produces at line 299 [or thereabouts]
Weaving: Type can be vert, hor, weave, jigsaw only,
line 299

for this line
last ++ Weaving(left,right,time,"Weave" ,open = x)
And arg in red seems not to be documented.

edison
28th June 2021, 14:43
Oh, There is a TXPlus thread here.
Hi, vcmohan, is it possilbe add a border settings(width and color) to the wipe effect ?

StainlessS
28th June 2021, 16:53
is it possilbe add a border settings
Where "Border" would be Wipe() separator indicating wipe postion as mentioned in this thread:- http://forum.doom9.org/showthread.php?t=182988

edison
29th June 2021, 15:57
Where "Border" would be Wipe() separator indicating wipe postion as mentioned in this thread:- http://forum.doom9.org/showthread.php?t=182988

Thanks a lot~ I will try it.

StainlessS
30th June 2021, 00:17
All I did was ask, maybe the magic did not as yet get done.
V.C.M. is probably a bit busy.

vcmohan
6th July 2021, 13:50
Sorry I did not see this post as I was busy updating EffectsPlus. Since there was another post after yours with long script, I thought it is no longer a requirement. OK. Now I will take up. But there is a small clarification needed. There are two other transitions, slide and push which can also be used to compare. Should an optional line demarcation be included for these also?

edison
8th July 2021, 12:57
Sorry I did not see this post as I was busy updating EffectsPlus. Since there was another post after yours with long script, I thought it is no longer a requirement. OK. Now I will take up. But there is a small clarification needed. There are two other transitions, slide and push which can also be used to compare. Should an optional line demarcation be included for these also?

hmm, I think wipe is enough for still image before/after compare.

vcmohan
11th July 2021, 14:17
Wipe function now has an optional separator line drawing capability. If any bugs found please inform. Will be grateful.

kedautinh12
11th July 2021, 14:25
Thanks

dma_k
25th May 2025, 13:14
Dear all,
I would like to cross-post the question originally posted here (https://forum.doom9.org/showthread.php?p=2018869), in particular this "simplified" script

file="20250523.mp4"
clip1=AudioDub(FFVideoSource(file), FFAudioSource(file))

img1=ImageSource("20250523.jpg", start=0, end=150, fps=30)
img1=AudioDub(img1, BlankClip(img1, audio_rate=targetAudioRate, channels=2, sample_type="float")).ConvertToYUV420()

Marbles(clip1, img1, 2) # works fine when replaced with clip1+img1

reports the problem:

ERROR: Marbles:Clips have differing pixel_types

however when I replace transformation in last line with

clip1+img1

the script works just fine, so AVS is able to join two clips.

ffprobe for the script that ends with "clip1" or "clip1+img1" reports:

Input #0, avisynth, from '20250523.avs':
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m/unknown/unknown), 1080x1920, 30 fps, 30 tbr, 30 tbn
Stream #0:1: Audio: pcm_f32le, 48000 Hz, 2 channels, flt, 3072 kb/s

Any idea how to debug that? Thanks in advance!

StainlessS
25th May 2025, 15:11
img1=AudioDub(img1, BlankClip(img1, audio_rate=targetAudioRate, channels=2, sample_type="float")).ConvertToYUV420()
What is targetAudioRate ???
Dont know how it got past that error.

Maybe try

file="20250523.mp4"
clip1=AudioDub(FFVideoSource(file), FFAudioSource(file)).ConvertToYUV420() # ConvertToYUV420 is NOP if already YUV420

img1=ImageSource("20250523.jpg", start=0, end=150).ConvertToYUV420() # Default 24.0fps
img1=img1.AssumeFPS(clip1) # Same FPS as clip1
img1=AudioDub(img1, BlankClip(clip1)) # Same type of audio as clip1
img1=img1.Trim(0,0) # EDIT: ADDED. Make img1 audio length as img1 video length (was default Blankclip length of 240 frames)
Marbles(clip1, img1, 2)


EDIT:
# EDIT: ADDED. Make img1 audio length as img1 video length (was default Blankclip length of 240 frames)
Actually, Blankclip default Length is 240 frames if both template clip arg and Length arg not provided,
but if template clip is provided, default Length is length of template clip.

dma_k
26th May 2025, 15:50
What is targetAudioRate ???
Dont know how it got past that error.

I have provided a "cut" version of the script, and hence I skipped the variable declaration (sorry if that caused a confusion). Overall, missing variable is not an issue.

Maybe try

file="20250523.mp4"
clip1=AudioDub(FFVideoSource(file), FFAudioSource(file)).ConvertToYUV420() # ConvertToYUV420 is NOP if already YUV420

img1=ImageSource("20250523.jpg", start=0, end=150).ConvertToYUV420() # Default 24.0fps
img1=img1.AssumeFPS(clip1) # Same FPS as clip1
img1=AudioDub(img1, BlankClip(clip1)) # Same type of audio as clip1
img1=img1.Trim(0,0) # EDIT: ADDED. Make img1 audio length as img1 video length (was default Blankclip length of 240 frames)
Marbles(clip1, img1, 2)



Does not help unfortunately...
If I replace ConvertToYUV420() with ConvertToRGB32() or with ConvertToYUV444(), then script works fine.
Full version of problematic script based on your advice:


SetLogParams("avisynth.log", LOG_INFO)

LoadPlugin("C:\Applications\Video\AviSynthPlus\plugins64+\ffms2.dll")
LoadPlugin("C:\Applications\Video\AviSynthPlus\plugins64+\TxPlus.dll")

file="20250523.mp4"
FFIndex(file)

clip1=AudioDub(FFVideoSource(file), FFAudioSource(file)).TurnRight().ConvertToYUV420()

img1=ImageSource("20250523.jpg", start=0, end=150).LanczosResize(1440, 1080).AddBorders((1920 - 1440) / 2, 0, (1920 - 1440) / 2, 0).TurnRight().ConvertToYUV420()
img1=img1.AssumeFPS(clip1)
img1=AudioDub(img1, BlankClip(clip1))
img1=img1.Trim(0,0)

#clip1+img1 # works fine in all cases / color spaces: opens fine with video player, and ffmpeg encodes it just fine

Marbles(clip1, img1, 2) # problem

Log:

INFO: ffms2_FFVideoSource() does not have any MT-mode specification. Because it is a source filter, it will use MT_SERIALIZED instead of the default MT mode.
ERROR: Marbles:Clips have differing pixel_types


TxPlus.dll has size 419840 bytes and version 3.0.1.0 1329+20 ad42af1
used with AviSynth+ 3.7.2 r3661 x64.

StainlessS
26th May 2025, 17:22
By the way, I usually use LSmashVideoSource/LSmashAudioSource for MP4 (is specifically for ISO formats incl MP4, 3GP, MOV, + more), and does not need indexing (mp4 has internal indexing).
EDIT:
ISO base media file format:- https://en.wikipedia.org/wiki/ISO_base_media_file_format
MP4 file format:- https://en.wikipedia.org/wiki/MP4_file_format

TxPlus.dll has size 419840 bytes and version 3.0.1.0 1329+20 ad42af1

I've got from x64 TxPlus.dll, 413,696 bytes (date in 7z file, 15 July 2021).
From here:- http://www.avisynth.nl/users/vcmohan/index.html
Date quoted in above page, 17 July 2021.

I dont know where you got the version number from (3.0.1.0 1329+20 ad42af1).
Mine just named TxPlus.7z.

From Bubbles.cpp [Points of note in blue.]

AVSValue __cdecl Create_Bubbles(AVSValue args, void * user_data, IScriptEnvironment * env)
{
char * Tname = "Bubbles";

#include "TransAll_Common_Param_Check.cpp"

return new Bubbles(args[0].AsClip(), // clip as LeftClip
args[1].AsClip(), // clip as RightClip
overlap, // overlap of clips. - ve time in seconds, + ve frames
args[3].AsBool(false), // static bubbles?
// args[4].AsInt(), // test index
env);
// Calls the constructor with the arguments provied.
}

Not as documented. (+ve seconds only)
[clickme]
https://i.postimg.cc/f3vrL2gX/Untitled-00.jpg (https://postimg.cc/f3vrL2gX)
Presume that Overlap arg is actually +ve frames, and semi-secret -ve in seconds.


from TransAll_Common_Param_Check.cpp

// TransAll common parameter checking code "TransAll_Common_Param_Check.cpp"
// char * Tname = "Trans----" name of function to be specified prior to this include
//-------------------------------------------------------------------------------------
const VideoInfo& vi = args[0].AsClip()->GetVideoInfo();
const VideoInfo& rvi= args[1].AsClip()->GetVideoInfo();
if (vi.pixel_type != rvi.pixel_type)
env->ThrowError("%s:Clips have differing pixel_types", Tname);

if( !vi.IsPlanar() && !vi.IsRGB() && !vi.IsYUY2() )
env->ThrowError("%s: This color format is not supported here",Tname);

if(!(vi.height==rvi.height) || !(vi.width == rvi.width))
env->ThrowError("%s: The heights/widths of clips are unequal", Tname);
if(!(vi.height & 3)==0 || !(vi.width & 3)==0)
env->ThrowError("%s: Height/width of frame are not multiple of 4", Tname);

int overlap = (int)((args[2].AsFloat() * vi.fps_numerator) / vi.fps_denominator);// number of seconds convert to frames
if(overlap>vi.num_frames || overlap> rvi.num_frames)
env->ThrowError("%s: Clip is shorter than overlap ", Tname);

if (overlap<2 )
env->ThrowError("%s: Overlap should be atleast %6.4f to cover 2 frames a minimum ",Tname, 2 / (vi.fps_numerator / vi.fps_denominator) );

if (vi.HasAudio() && rvi.HasAudio())
{

if (vi.AudioChannels() != rvi.AudioChannels())
env->ThrowError("%s: The number of audio channels in clips are not same",Tname);

if (vi.SamplesPerSecond() != rvi.SamplesPerSecond())
env->ThrowError("%s: The audio of the two clips have different samplerates! Use SSRC()/ResampleAudio()",Tname);

if (vi.sample_type != rvi.sample_type)
env->ThrowError("%s: The audio samples of clips are in different formats.",Tname);
if(vi.sample_type & SAMPLE_INT24)
env->ThrowError("%s: 24 bit audio format is not acceptable",Tname);
}
if(vi.HasAudio() ^ rvi.HasAudio())
env->ThrowError("%s:One of the clips has audio and other does not", Tname);


Show PixelType

colorbars.killaudio.ConvertToYUV420
s=PixelType # "YV12" # PixelType v2.60+
Subtitle(s,y=height-20) # print PixelType [YV12] at bottom of frame.
info # info at top.

[clickme]
https://i.postimg.cc/7b1phNfq/aaa-00.jpg (https://postimg.cc/7b1phNfq)

dma_k
27th May 2025, 20:29
By the way, I usually use LSmashVideoSource/LSmashAudioSource for MP4 (is specifically for ISO formats incl MP4, 3GP, MOV, + more), and does not need indexing (mp4 has internal indexing).

Thanks for that hint 🤝 I will certainly take a look, but from the start I have chosen FFVideoSource() because it supports multiple formats and works smoothly, more over it was updated recently (last release in 2024 (https://github.com/FFMS/ffms2/releases)). I don't care about initial indexing at all 🙃 If LSMASHVideoSource() (http://avisynth.nl/index.php/LSMASHSource/LSMASHVideoSource) needs L-SMASH demuxer (https://github.com/l-smash/l-smash) to be additionally installed, then it is less interesting to me.


I've got from x64 TxPlus.dll, 413,696 bytes (date in 7z file, 15 July 2021).
From here:- http://www.avisynth.nl/users/vcmohan/index.html
Date quoted in above page, 17 July 2021.

I dont know where you got the version number from (3.0.1.0 1329+20 ad42af1).
Mine just named TxPlus.7z.

Sorry, I have taken the version from a wrong place 🤯 Please ignore it (actually the version is empty, see attachment).
I have updated TxPlus.dll to be the same size of 413696 bytes, and the problem does not resolve 😭

Show PixelType

colorbars.killaudio.ConvertToYUV420
s=PixelType # "YV12" # PixelType v2.60+
Subtitle(s,y=height-20) # print PixelType [YV12] at bottom of frame.
info # info at top.


Actually a good idea! However why you bother with placing a text on a video clip – instead you can just log the necessary information:

clip1=AudioDub(FFVideoSource(file), FFAudioSource(file)).TurnRight().ConvertToYUV420()

img1=ImageSource("20250523_185014.jpg", start=0, end=150).LanczosResize(1440, 1080).AddBorders((1920 - 1440) / 2, 0, (1920 - 1440) / 2, 0).TurnRight().ConvertToYUV420()
img1=img1.AssumeFPS(clip1)
img1=AudioDub(img1, BlankClip(clip1))
img1=img1.Trim(0,0)

result=clip1+img1

LogMsg("clip1 pixel format: " + clip1.PixelType, LOG_INFO)
LogMsg("img1 pixel format: " + img1.PixelType, LOG_INFO)
LogMsg("result pixel format: " + result.PixelType, LOG_INFO)

Marbles(clip1, img1, 2)

And it produces:

INFO: ffms2_FFAudioSource() does not have any MT-mode specification. Because it is a source filter, it will use MT_SERIALIZED instead of the default MT mode.
INFO: clip1 pixel format: YV12
INFO: img1 pixel format: YV12
INFO: result pixel format: YV12
ERROR: Marbles:Clips have differing pixel_types

wonkey_monkey
27th May 2025, 23:33
IV420 and YUV420 have different pixel_type (as in the C++ bitfield integer, not the string available in an AviSynth script) values, even though they're basically the same. One has the U plane first (in memory, presumably), one has the V plane first. AviSynth filters are probably expected to use the helper functions to determine format instead of checking pixel_type directly.

For whatever reason, ffmpegsource2 returns I420. BestSource (https://forum.doom9.org/showthread.php?t=185408) returns "proper" YV12 and is also guaranteed to be frame accurate, which ffmpegsource2 isn't. Indexing takes a bit longer though, and it has some funny ideas about where to put its files and what a reasonable cache size is (I would set cachesize = 0 and cachemode = 4 for the fewest number of surprises). But the guarantee of frame accuracy massively outweighs those quirks for me.

Anyway, for ffmpegsource2, not sure if there's a better way but

clip1 = (img1 + clip1).Trim(img1.FrameCount, 0)

will fix it.

Out of curiosity, are you wanting the TxPlus Marbles effect specifically, or is that just the closest you've found to your ideal?

StainlessS
28th May 2025, 00:39
This is the actual problem,
For Avisynth it is all the same, YV12 or I420.
That's why VideoInfo::IsSameColorspace has a second test for colorspace. Both formats report "true" on IsYV12().
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/core/interface.cpp#L332

So, the proper way is not

if (vi.pixel_type!=vi2.pixel_type)

but

if (!vi.IsSameColorspace(vi2))

That's... logical... I'll change that.
I mean, if there is a IsSameColorspace function, using it is the proper way...;)
:thanks:

It is sometimes nice to be able to see the Baked code in the original v2.58 header, to give a clue about what its gonna do.
I'm not suggesting that you use same as v2.58 header, just taking a peek into the black box is sometimes informative.
Here is from v2.58 header

// Test for same colorspace
bool IsSameColorspace(const VideoInfo& vi) const {
if (vi.pixel_type == pixel_type) return TRUE;
if (IsYV12() && vi.IsYV12()) return TRUE;
return FALSE;
}


EDIT: Oops, shoulda posted this too.

bool IsYV12() const { return ((pixel_type & CS_YV12) == CS_YV12)||((pixel_type & CS_I420) == CS_I420); }



Whereas TxPLus uses [from TransAll_Common_Param_Check.cpp]

if (vi.pixel_type != rvi.pixel_type)
env->ThrowError("%s:Clips have differing pixel_types", Tname)


V.C.Mohan aint been around since about June 2024, so may never be fixed in TxPlus.

dma_k
28th May 2025, 17:12
IV420 and YUV420 have different pixel_type values, even though they're basically the same. One has the U plane first (in memory, presumably), one has the V plane first. AviSynth filters are probably expected to use the helper functions to determine format instead of checking pixel_type directly.

For whatever reason, ffmpegsource2 returns I420. BestSource (https://forum.doom9.org/showthread.php?t=185408) returns "proper" YV12 and is also guaranteed to be frame accurate, which ffmpegsource2 isn't. Indexing takes a bit longer though, and it has some funny ideas about where to put its files and what a reasonable cache size is (I would set cachesize = 0 and cachemode = 4 for the fewest number of surprises). But the guarantee of frame accuracy massively outweighs those quirks for me.

Great, I will certainly check BSSource() 🎉 That is true that I have frame rate issues with FFVideoSource() (e.g. issue #370 (https://github.com/FFMS/ffms2/issues/370)), but long time back there was no better alternative. And for short clips (~5 mins) audio/video desync is not an issue, but if the clip is large I am 😭


Anyway, for ffmpegsource2, not sure if there's a better way but

clip1 = (img1 + clip1).Trim(img1.FrameCount, 0)

will fix it.

I have no issue with img1 + clip1 → plus operator is implemented correctly. However TxPlus effects have difficulties.


Out of curiosity, are you wanting the TxPlus Marbles effect specifically, or is that just the closest you've found to your ideal?

I am not bound to Marbles() specifically, but I have tried Ripple() and VenetianBlinds() and they have the same issue (which is obvious as they share the same common code). Hence I have reported it to this thread.


So, the proper way is not

if (vi.pixel_type!=vi2.pixel_type)

but

if (!vi.IsSameColorspace(vi2))

V.C.Mohan aint been around since about June 2024, so may never be fixed in TxPlus.

Fantastic finding! Thank you! Now, of course, if this bug is not fixed, would switching to ConvertToYUV444() and then back to ConvertToYUV420() be a proper solution?

wonkey_monkey
28th May 2025, 18:28
I have no issue with img1 + clip1 → plus operator is implemented correctly. However TxPlus effects have difficulties.

No, what I'm saying is that the code I posted effectively returns clip1, but with img1's pixel_type. It will then work with Marbles.

StainlessS
28th May 2025, 21:37
@dma_k,
Perhaps you can coerce (nicely) someone into recompiling txPlus whotsit, only need fix in TransAll_Common_Param_Check.cpp (I think)
as called by all (#include'd ie same as AVS import) to check if clips are same.
Alas, I aint really even properley set up to use more than very basic Avs script, and not got any compiler/SDK etc setup.

[Perhaps Wonkey_Donkey would be good enough, but dont tell him that I suggested it <he can get vindictive>].

wonkey_monkey
28th May 2025, 22:41
[Perhaps Wonkey_Donkey would be good enough, but dont tell him that I suggested it <he can get vindictive>].

Why you little... :devil:

Unfortunately the TxPlus source seems to have not only some deprecated syntax which needs updating in many places, but also a few typos; some seem obvious (e.g. "for (int l = 0; w < len / 2; l++)" should probably be "for (int l = 0; l < len / 2; l++), but I can't be sure, and there's another typo that doesn't have an obvious correction.

Since coercing I420 to YV12 as shown above fixes the problem well enough to use the existing DLLs, I would just stick with that as a workaround.

StainlessS
29th May 2025, 07:51
I would just stick with that as a workaround.
Sounds reasonable.

vcmohan
3rd June 2025, 12:59
Sorry I just stumbled upon this thread. Since I was not getting any alert message I was occasionally looking into the forum. I was under impression that no one is interested in my plugins due to ttech advances. I will correct the code and post new dll. I could not locate the typos mentioned in a post above. In which source they are observed?

dma_k
4th June 2025, 09:35
I will correct the code and post new dll. I could not locate the typos mentioned in a post above. In which source they are observed?
On this (http://www.avisynth.nl/users/vcmohan/index.html) page, take TxPlus sources (http://www.avisynth.nl/users/vcmohan/TxPlus/TxPlus_src.7z), file TransAll_Common_Param_Check.cpp. Thanks for looking into that!

P.S. Maybe you could put all your sources to GitHub? Then there is a clean way to contribute to them and report issues. Thanks in advance!

vcmohan
4th June 2025, 12:26
Yes. I have seen the pixeltype check instead of colorspace. I will correct eventhough I am not fully convinced.
The typos mentioned I could not locate. Can you or anyone help me.
I will also be grateful if @stainless informs whether I should download visulstudio 2022 ver 17.14 and recompile as I used visualstudio 2019 ver 16.11.22 for existing dlls. @monkey-wonkey mentioned that I have deprecated code.

wonkey_monkey
4th June 2025, 12:59
No need to download VS 2022 if it compiles okay with 2019. The problems I found were:

Line 95 of DecimateResizer.h has a reference to a variable "breadth" which is not defined.

Line 135 of LineZ.h has "for (int l = 0; w < len / 2; l++)"; I think the w should be l.

Every instance of char * Tname="<...>"'; wouldn't compile for me, so I changed them to auto Tname="<...>"; If it still works with your setup, no need to fix.

vcmohan
6th June 2025, 12:39
I corrected and recompiled. But unable to upload as server is not answering.

StainlessS
6th June 2025, 12:44
Also, (I see you online VCM),
As Wonkey said, "for (int l = 0; w < len / 2; l++)"; I think the w should be l.

for (int l = 0; l < len / 2; l++)

Above, sometimes causes problems with some compilers if there are multiple for loops, with same for loop variable defined in each loop.
eg

for (int l = 0; l < len / 2; l++)
; ...
for (int l = 0; l < len / 2; l++)

Might complain about re-use of int l, needs instead of that, eg

int l;
for (l = 0; l < len / 2; l++)
; ...
for (l = 0; l < len / 2; l++)

avoid compiler complaints. [EDIT: IIRC, complains of "Re-definition of variable l"]

I dont know if that is a problem in your code/compiler, but it does happen with more recent compilers, where older ones worked just fine.

vcmohan
6th June 2025, 12:52
Thanks. I did not get such complaint. Yes older compi;ers used to compile. Now I could upload the newer version of TxPlus. May be checked for problems if any .

dma_k
8th June 2025, 15:04
Now I could upload the newer version of TxPlus. May be checked for problems if any .

I have tested the latest uploaded version and the problem with unmatched pixel format has gone 🎉 Thanks for fixing it! 🤝