View Full Version : Is there any way to fix this field blending
sonic41592
9th January 2021, 21:47
I know the field blending can't be fixed completely, but any suggestions on how to reduce it would be great.
Sample (https://mega.nz/file/tckQ0bIB#Vp2fs0xM33BClB24d5vnydTxQm3UdIoFlL5TI4LBjjI)
Sample2 (https://mega.nz/file/MA90UbrJ#rFEAvu_yltKJi1xGJkZ_Q8mEIIFM8DotIOmVrv73fxo)
I noticed that the lower parts of some frames have some weird kind of blending too occasionally. I've tried SRestore, but don't know much about how the options work together to get it to look the way it should.
ChaosKing
9th January 2021, 23:41
This is something I used for an old anime:
# converted from VS script
clip = YOUR_SOURCE
clip=last.QTGMC(Preset="very slow", TR2=1, Lossless=2, SourceMatch=3 ).SelectEven()
dd = clip.DFTTest(sigma=33, tbsize=3)
dd2 = dd.Crop(12,12,12,12)
clip = clip.Cdeblend(omode =3, bthresh =0.2, mthresh = 0.4, dclip = dd)
clip = clip.srestore(frate=23.976 )
return clip
Original Vapoursynth version
clip = core.lsmas.LWLibavSource(source=r"D:\Download\sample2.VOB")
clip = haf.QTGMC(clip, Preset='very slow', TR2=1, TFF=True, Lossless=2, SourceMatch=3 ).std.SelectEvery( cycle=2, offsets=0)
dd = clip.dfttest.DFTTest(sigma=33, tbsize=3)
dd2 = dd.std.Crop(12,12,12,12)
clip = muf.Cdeblend(clip, omode =3, bthresh =0.2, mthresh = 0.4, dclip = dd)
clip = haf.srestore(clip, frate=23.976 )
sonic41592
10th January 2021, 05:27
That did seem to get rid of most of the blending, but the result is very stuttery, and gives ~4 duplicate frames for most frames. Is the dd2 = dd.Crop(12,12,12,12) line necessary? That's the only time dd2 is used in the above script, so I wasn't sure of its purpose.
ChaosKing
11th January 2021, 19:44
You can try to feed cdblend the dd2 clip for potentially better blend detection/removal. Use Crop(16,16,16,16).
http://avisynth.nl/index.php/C_deblend
You should test also other omodes for cdeblend. omode=3 is a special mode for 12fps sources which would explain the stutter.
real.finder
12th January 2021, 08:18
you can try play with animeivtc, I did added many things for deal with field blending in mode22
ChaosKing
12th January 2021, 11:11
you can try play with animeivtc, I did added many things for deal with field blending in mode22
This actually looks very good with the sonic scene AnimeIVTC(2, bbob=1, mode22=3)
@real.finder btw in your changelog you say that mode22 is a bool mode22=true which is false :P
https://github.com/realfinder/AVS-Stuff/blob/79b533b5b2b915b97cbb618ef43f441e1818708a/avs%202.5%20and%20up/AnimeIVTC.avsi#L4
real.finder
12th January 2021, 14:29
@real.finder btw in your changelog you say that mode22 is a bool mode22=true which is false :P
https://github.com/realfinder/AVS-Stuff/blob/79b533b5b2b915b97cbb618ef43f441e1818708a/avs%202.5%20and%20up/AnimeIVTC.avsi#L4
it was, but later I change it https://github.com/realfinder/AVS-Stuff/blob/79b533b5b2b915b97cbb618ef43f441e1818708a/avs%202.5%20and%20up/AnimeIVTC.avsi#L41
StainlessS
12th January 2021, 15:40
If you are gonna change arg type in an established script/plugin filter, then should really make a 'big deal' that it is a script breaking change.
Ideally, you might try to avoid it, maybe add another arg to achieve your target behaviour [maintaining original behaviour by default].
EDIT: Another way to not break scripts [that I have used before], is to change the variable type to Val, and detect whether
caller used eg Bool or Int, and modify behaviour accordingly [its awkward but can work, you also have to detect if non Bool|Int is used and error if so].
Could eg, make False or 0 same, and True or 1 same, and add functionality as 2, 3, etc.
real.finder
12th January 2021, 16:10
If you are gonna change arg type in an established script/plugin filter, then should really make a 'big deal' that it is a script breaking change.
Ideally, you might try to avoid it, maybe add another arg to achieve your target behaviour [maintaining original behaviour by default].
EDIT: Another way to not break scripts [that I have used before], is to change the variable type to Val, and detect whether
caller used eg Bool or Int, and modify behaviour accordingly [its awkward but can work, you also have to detect if non Bool|Int is used and error if so].
Could eg, make False or 0 same, and True or 1 same, and add functionality as 2, 3, etc.
sure, I done all of these before, but the mode22 is special case since:- 1-it was added by me to the AnimeIVTC. 2-it wasn't famous.
sonic41592
12th January 2021, 19:16
This actually looks very good with the sonic scene AnimeIVTC(2, bbob=1, mode22=3)
I tried this script, but it doesn't output any frames. I'm using Animeivtc 2.34 2020-12-19 mod from real finders GitHub page, and avisynth+ v3.5 32bit. The code is just the source line and the Animeivtc line, so no other filters should be causing a problem.
ChaosKing
12th January 2021, 19:24
Are you using the latest avisynth+ version?
sonic41592
12th January 2021, 22:13
Just updated to Avisynth+ v3.7, still doesn't work. It's giving an error saying RequestLinear: internal error (frame not cached). I don't have any multithreading options in my avs script:
mpeg2source("title.d2v")
AnimeIVTC(2, bbob=1, mode22=3)
So I'm not sure what the problem is. Could I be missing a plug-in?
Emulgator
14th January 2021, 00:12
I would remoteguess: one or more old plugins.
sonic41592
14th January 2021, 03:07
I would remoteguess: one or more old plugins.
Finally had time to go through and update them all and it seems to be working, thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.