View Single Post
Old 13th July 2020, 10:32   #9  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,057
Finally I was able to build ResampleMT with VS2013 and made corrections and debug to functions more quickly. The most important was limiting support() member to 2 instead of 4 as in GaussFilter because 4 gives errors in following avisynth resampler. The param processing is now follows web-simulator T-value (no reciprocacity and 0.1 multiplication because todays avisynth good accepts float params values).
Current kernel func:
Code:
double SinPowFilter::f(double value)
{
	value = fabs(value);
	value *= M_PI / param;

	if (value<(M_PI / 2)) return pow(cos(value), 1.8);
	else
	{
		if (value<(M_PI)) return -(cos(value)*cos(value)) / (0.9*value);
		else return 0;
	}
}
In testing with typical videocamera frames with p-parameter = 2.5 it gives comparable sharpness with Lanczos4Resize() but with better conditioned anti-ringing. Parameter p<2.5 gives better sharpness but may cause more artifacts, p>2.5 gives less sharpness. Intendent for using for downsampling at anti-alizing processing and lower frame size rip creation.
Name of function SinPowResizeMT(), parameters are same as GaussResizeMT except for p-param as descriped above. Default p=2.5. Usable range of p-param is about 2..5 float. Internally limited to 1.0..10.0.

Currently only x64 build available because win32 config gives some errors.

As for sin^2 simple kernel: It gives very close to GaussResize results, so may be no any value for most users.
Attached Files
File Type: zip ResampleMT-master-src.zip (127.8 KB, 34 views)
File Type: zip ResampleMT_x64_SinPowReisize.zip (140.4 KB, 44 views)

Last edited by DTL; 13th July 2020 at 11:10. Reason: udpated sample script from p=7 to p=2.5
DTL is offline   Reply With Quote